Browse Source

fix(nc-gui): fix calendar tests

pull/7995/head
DarkPhoenix2704 3 months ago
parent
commit
82cc98711e
  1. 4
      packages/nc-gui/components/smartsheet/calendar/index.vue
  2. 2
      tests/playwright/pages/Dashboard/Sidebar/index.ts
  3. 2
      tests/playwright/pages/Dashboard/ViewSidebar/index.ts

4
packages/nc-gui/components/smartsheet/calendar/index.vue

@ -192,8 +192,8 @@ const headerText = computed(() => {
<NcDropdown v-model:visible="calendarRangeDropdown" :auto-close="false" :trigger="['click']">
<NcButton :class="{ '!w-22': activeCalendarView === 'year' }" class="w-45" full-width size="small" type="secondary">
<div class="flex px-2 w-full items-center justify-between">
<div class="flex gap-1 text-brand-500">
<span class="font-bold text-center" data-testid="nc-calendar-active-date">{{
<div class="flex gap-1 text-brand-500" data-testid="nc-calendar-active-date">
<span class="font-bold text-center">{{
activeCalendarView === 'month' ? headerText.split(' ')[0] : headerText
}}</span>
<span v-if="activeCalendarView === 'month'">

2
tests/playwright/pages/Dashboard/Sidebar/index.ts

@ -113,8 +113,6 @@ export class SidebarPage extends BasePage {
} else if (type === ViewTypes.GALLERY) {
createViewTypeButton = this.rootPage.getByTestId('sidebar-view-create-gallery');
} else if (type === ViewTypes.CALENDAR) {
// TODO: Remove this once the easter egg is removed
await this.rootPage.waitForTimeout(4500);
createViewTypeButton = this.rootPage.getByTestId('sidebar-view-create-calendar');
}

2
tests/playwright/pages/Dashboard/ViewSidebar/index.ts

@ -205,7 +205,7 @@ export class ViewSidebarPage extends BasePage {
}
private async createView({ title, type }: { title: string; type: ViewTypes }) {
await this.rootPage.waitForTimeout(1000);
await this.rootPage.waitForTimeout(500);
await this.dashboard.sidebar.createView({ title, type });
}

Loading…
Cancel
Save