Browse Source

feat(testing): Minor cleanup of page objects

pull/3848/head
Muhammed Mustafa 2 years ago
parent
commit
baf3fc986d
  1. 9
      scripts/playwright/pages/Dashboard/ExpandedForm/index.ts
  2. 1
      scripts/playwright/pages/Dashboard/Form/index.ts
  3. 2
      scripts/playwright/pages/Dashboard/Gallery/index.ts
  4. 1
      scripts/playwright/pages/Dashboard/Grid/index.ts
  5. 3
      scripts/playwright/pages/Dashboard/Import/Airtable.ts
  6. 1
      scripts/playwright/pages/Dashboard/Import/ImportTemplate.ts
  7. 3
      scripts/playwright/pages/Dashboard/Kanban/index.ts
  8. 1
      scripts/playwright/pages/Dashboard/SurveyForm/index.ts
  9. 2
      scripts/playwright/pages/Dashboard/WebhookForm/index.ts
  10. 1
      scripts/playwright/pages/Dashboard/index.ts
  11. 1
      scripts/playwright/pages/LoginPage/index.ts
  12. 1
      scripts/playwright/pages/ProjectsPage/index.ts
  13. 3
      scripts/playwright/pages/SharedForm/index.ts
  14. 3
      scripts/playwright/pages/SignupPage/index.ts

9
scripts/playwright/pages/Dashboard/ExpandedForm/index.ts

@ -1,8 +1,6 @@
// playwright-dev-page.ts
import { expect, Locator } from '@playwright/test';
import BasePage from '../../Base';
import { DashboardPage } from '..';
// import clipboard from "clipboardy";
export class ExpandedFormPage extends BasePage {
readonly dashboard: DashboardPage;
@ -88,13 +86,6 @@ export class ExpandedFormPage extends BasePage {
await this.get().locator('button:has-text("Cancel")').last().click();
}
// async getClipboardText() {
// const clipboard = (await import("clipboardy")).default;
// let clipText = await clipboard.read();
// console.log(clipText);
// return clipText;
// }
async openChildCard(param: { column: string; title: string }) {
const childList = await this.get().locator(`[pw-data="nc-expand-col-${param.column}"]`);
await childList.locator(`.ant-card:has-text("${param.title}")`).click();

1
scripts/playwright/pages/Dashboard/Form/index.ts

@ -1,4 +1,3 @@
// playwright-dev-page.ts
import { expect, Locator } from '@playwright/test';
import { DashboardPage } from '..';
import BasePage from '../../Base';

2
scripts/playwright/pages/Dashboard/Gallery/index.ts

@ -1,5 +1,3 @@
// playwright-dev-page.ts
import { expect, Locator } from '@playwright/test';
import { DashboardPage } from '..';
import BasePage from '../../Base';
import { ToolbarPage } from '../common/Toolbar';

1
scripts/playwright/pages/Dashboard/Grid/index.ts

@ -1,4 +1,3 @@
// playwright-dev-page.ts
import { expect, Locator } from '@playwright/test';
import { DashboardPage } from '..';
import BasePage from '../../Base';

3
scripts/playwright/pages/Dashboard/Import/Airtable.ts

@ -1,5 +1,4 @@
// playwright-dev-page.ts
import { expect, Locator } from '@playwright/test';
import { Locator } from '@playwright/test';
import BasePage from '../../Base';
import { DashboardPage } from '..';

1
scripts/playwright/pages/Dashboard/Import/ImportTemplate.ts

@ -1,4 +1,3 @@
// playwright-dev-page.ts
import { expect, Locator } from '@playwright/test';
import BasePage from '../../Base';
import { DashboardPage } from '..';

3
scripts/playwright/pages/Dashboard/Kanban/index.ts

@ -1,5 +1,4 @@
// playwright-dev-page.ts
import { expect, Locator } from '@playwright/test';
import { expect } from '@playwright/test';
import { DashboardPage } from '..';
import BasePage from '../../Base';
import { ToolbarPage } from '../common/Toolbar';

1
scripts/playwright/pages/Dashboard/SurveyForm/index.ts

@ -1,4 +1,3 @@
// playwright-dev-page.ts
import { expect, Locator, Page } from '@playwright/test';
import BasePage from '../../Base';

2
scripts/playwright/pages/Dashboard/WebhookForm/index.ts

@ -1,9 +1,7 @@
// playwright-dev-page.ts
import { expect, Locator } from '@playwright/test';
import BasePage from '../../Base';
import { DashboardPage } from '..';
import { ToolbarPage } from '../common/Toolbar';
// import clipboard from "clipboardy";
export class WebhookFormPage extends BasePage {
readonly dashboard: DashboardPage;

1
scripts/playwright/pages/Dashboard/index.ts

@ -1,4 +1,3 @@
// playwright-dev-page.ts
import { expect, Locator, Page } from '@playwright/test';
import BasePage from '../Base';
import { GridPage } from './Grid';

1
scripts/playwright/pages/LoginPage/index.ts

@ -1,4 +1,3 @@
// playwright-dev-page.ts
import { expect, Page } from '@playwright/test';
import BasePage from '../Base';

1
scripts/playwright/pages/ProjectsPage/index.ts

@ -1,4 +1,3 @@
// playwright-dev-page.ts
import { expect, Page } from '@playwright/test';
import BasePage from '../Base';
import { DashboardPage } from '../Dashboard';

3
scripts/playwright/pages/SharedForm/index.ts

@ -1,5 +1,4 @@
// playwright-dev-page.ts
import { expect, Locator, Page } from '@playwright/test';
import { expect, Page } from '@playwright/test';
import BasePage from '../Base';
import { CellPageObject } from '../Dashboard/common/Cell';

3
scripts/playwright/pages/SignupPage/index.ts

@ -1,5 +1,4 @@
// playwright-dev-page.ts
import { expect, Page } from '@playwright/test';
import { Page } from '@playwright/test';
import BasePage from '../Base';
import { ProjectsPage } from '../ProjectsPage';

Loading…
Cancel
Save