Browse Source

fix: Fixed issue with test

pull/6498/head
Muhammed Mustafa 1 year ago
parent
commit
e6cf24996f
  1. 3
      tests/playwright/pages/Dashboard/index.ts
  2. 8
      tests/playwright/tests/db/columns/columnAttachments.spec.ts

3
tests/playwright/pages/Dashboard/index.ts

@ -189,8 +189,11 @@ export class DashboardPage extends BasePage {
async signOut() {
await this.sidebar.userMenu.click();
await this.rootPage.waitForTimeout(1000);
await this.rootPage.getByTestId('nc-sidebar-user-logout').waitFor({ state: 'visible' });
await this.sidebar.userMenu.clickLogout();
await this.rootPage.waitForTimeout(1000);
await this.rootPage.locator('[data-testid="nc-form-signin"]:visible').waitFor();
await new Promise(resolve => setTimeout(resolve, 150));

8
tests/playwright/tests/db/columns/columnAttachments.spec.ts

@ -31,6 +31,9 @@ test.describe('Attachment column', () => {
columnHeader: 'testAttach',
filePath: filepath,
});
await dashboard.rootPage.waitForTimeout(500);
await dashboard.grid.cell.attachment.verifyFile({
index: i,
columnHeader: 'testAttach',
@ -41,6 +44,9 @@ test.describe('Attachment column', () => {
columnHeader: 'testAttach',
filePath: [`${process.cwd()}/fixtures/sampleFiles/sampleImage.jpeg`],
});
await dashboard.rootPage.waitForTimeout(1000);
await dashboard.grid.cell.attachment.verifyFile({
index: 4,
columnHeader: 'testAttach',
@ -74,7 +80,7 @@ test.describe('Attachment column', () => {
filePath: [`${process.cwd()}/fixtures/sampleFiles/1.json`],
});
await sharedForm.rootPage.waitForTimeout(500);
await sharedForm.rootPage.waitForTimeout(1000);
await sharedForm.submit();
await sharedForm.verifySuccessMessage();
await newPage.close();

Loading…
Cancel
Save