Browse Source

fix: failing calendar tests (#8242)

pull/8245/head
Anbarasu 3 months ago committed by GitHub
parent
commit
d5a318c16e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      tests/playwright/pages/Dashboard/Calendar/CalendarDayDateTime.ts
  2. 4
      tests/playwright/tests/db/views/viewCalendar.spec.ts

6
tests/playwright/pages/Dashboard/Calendar/CalendarDayDateTime.ts

@ -21,14 +21,14 @@ export class CalendarDayDateTimePage extends BasePage {
const recordContainer = this.getRecordContainer();
const recordCard = recordContainer.getByTestId(`nc-calendar-day-record-${record}`);
const toDay = this.get().getByTestId('nc-calendar-day-hour').nth(hourIndex);
await this.get().getByTestId('nc-calendar-day-hour').nth(0).scrollIntoViewIfNeeded();
const cord = await toDay.boundingBox();
await recordCard.scrollIntoViewIfNeeded();
await recordCard.hover();
await this.rootPage.mouse.down();
// Bit Flaky
await this.rootPage.waitForTimeout(500);
await this.rootPage.mouse.move(cord.x + cord.width / 2, cord.y + cord.height / 2, {
steps: 10,
});

4
tests/playwright/tests/db/views/viewCalendar.spec.ts

@ -288,7 +288,7 @@ test.describe('Calendar View', () => {
await dashboard.viewSidebar.deleteView({ title: 'Calendar' });
});
test.skip('Calendar Drag and Drop & Undo Redo Operations', async () => {
test('Calendar Drag and Drop & Undo Redo Operations', async () => {
test.slow();
await dashboard.treeView.openBase({ title: `xcdb${context.workerId}` });
@ -350,7 +350,7 @@ test.describe('Calendar View', () => {
await calendar.toolbar.calendarViewMode.changeCalendarView({ title: 'day' });
await dashboard.rootPage.waitForTimeout(5000);
await dashboard.rootPage.waitForTimeout(2000);
await calendar.calendarDayDateTime.dragAndDrop({
record: 'Team Catchup',

Loading…
Cancel
Save