diff --git a/e2e-tests/playwright/e2e/catalog-scaffoldedfromLink.spec.ts b/e2e-tests/playwright/e2e/catalog-scaffoldedfromLink.spec.ts index 9869a9ae2..acc32e664 100644 --- a/e2e-tests/playwright/e2e/catalog-scaffoldedfromLink.spec.ts +++ b/e2e-tests/playwright/e2e/catalog-scaffoldedfromLink.spec.ts @@ -1,6 +1,6 @@ import { Page, test } from '@playwright/test'; import { UIhelper } from '../utils/UIhelper'; -import { Common, setupBrowser } from '../utils/Common'; +import { Common } from '../utils/Common'; import { CatalogImport } from '../support/pages/CatalogImport'; import { APIHelper } from '../utils/APIHelper'; import { githubAPIEndpoints } from '../utils/APIEndpoints'; @@ -25,9 +25,7 @@ test.describe.serial('Link Scaffolded Templates to Catalog Items', () => { ).toString('utf8'), // Default repoOwner janus-qe }; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; - + test.beforeAll(async () => { common = new Common(page); uiHelper = new UIhelper(page); catalogImport = new CatalogImport(page); diff --git a/e2e-tests/playwright/e2e/catalog-timestamp.spec.ts b/e2e-tests/playwright/e2e/catalog-timestamp.spec.ts index be037291c..0990e25ee 100644 --- a/e2e-tests/playwright/e2e/catalog-timestamp.spec.ts +++ b/e2e-tests/playwright/e2e/catalog-timestamp.spec.ts @@ -1,6 +1,6 @@ import { Page, expect, test } from '@playwright/test'; import { UIhelper } from '../utils/UIhelper'; -import { Common, setupBrowser } from '../utils/Common'; +import { Common } from '../utils/Common'; import { CatalogImport } from '../support/pages/CatalogImport'; import { UIhelperPO } from '../support/pageObjects/global-obj'; @@ -13,9 +13,7 @@ test.describe('Test timestamp column on Catalog', () => { const component = 'https://github.com/janus-qe/custom-catalog-entities/blob/main/timestamp-catalog-info.yaml'; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; - + test.beforeAll(async () => { common = new Common(page); uiHelper = new UIhelper(page); catalogImport = new CatalogImport(page); diff --git a/e2e-tests/playwright/e2e/custom-theme.spec.ts b/e2e-tests/playwright/e2e/custom-theme.spec.ts index 9e32f7515..9ce273659 100644 --- a/e2e-tests/playwright/e2e/custom-theme.spec.ts +++ b/e2e-tests/playwright/e2e/custom-theme.spec.ts @@ -1,5 +1,5 @@ import { test, Page, TestInfo, expect } from '@playwright/test'; -import { Common, setupBrowser } from '../utils/Common'; +import { Common } from '../utils/Common'; import { ThemeVerifier } from '../utils/custom-theme/theme-verifier'; import { customTabIcon, @@ -12,8 +12,7 @@ test.describe('CustomTheme should be applied', () => { let common: Common; let themeVerifier: ThemeVerifier; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; + test.beforeAll(async () => { common = new Common(page); themeVerifier = new ThemeVerifier(page); diff --git a/e2e-tests/playwright/e2e/github-happy-path.spec.ts b/e2e-tests/playwright/e2e/github-happy-path.spec.ts index 8e23bd5e3..26c990276 100644 --- a/e2e-tests/playwright/e2e/github-happy-path.spec.ts +++ b/e2e-tests/playwright/e2e/github-happy-path.spec.ts @@ -1,6 +1,6 @@ import { test, expect, Page } from '@playwright/test'; import { UIhelper } from '../utils/UIhelper'; -import { Common, setupBrowser } from '../utils/Common'; +import { Common } from '../utils/Common'; import { resources } from '../support/testData/resources'; import { BackstageShowcase, @@ -18,9 +18,7 @@ test.describe.serial('GitHub Happy path', () => { const component = 'https://github.com/janus-idp/backstage-showcase/blob/main/catalog-entities/all.yaml'; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; - + test.beforeAll(async () => { uiHelper = new UIhelper(page); common = new Common(page); catalogImport = new CatalogImport(page); diff --git a/e2e-tests/playwright/e2e/github-integration-org-fetch.spec.ts b/e2e-tests/playwright/e2e/github-integration-org-fetch.spec.ts index 31797907b..5b40ae22f 100644 --- a/e2e-tests/playwright/e2e/github-integration-org-fetch.spec.ts +++ b/e2e-tests/playwright/e2e/github-integration-org-fetch.spec.ts @@ -1,14 +1,13 @@ import { test, Page } from '@playwright/test'; import { UIhelper } from '../utils/UIhelper'; -import { Common, setupBrowser } from '../utils/Common'; +import { Common } from '../utils/Common'; let page: Page; test.describe.serial('GitHub integration with Org data fetching', () => { let common: Common; let uiHelper: UIhelper; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; + test.beforeAll(async () => { uiHelper = new UIhelper(page); common = new Common(page); await common.loginAsGithubUser(); diff --git a/e2e-tests/playwright/e2e/plugins/acr.spec.ts b/e2e-tests/playwright/e2e/plugins/acr.spec.ts index 0fc71e8d6..d536a3f73 100644 --- a/e2e-tests/playwright/e2e/plugins/acr.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/acr.spec.ts @@ -1,6 +1,6 @@ import { test } from '@playwright/test'; import { UIhelper } from '../../utils/UIhelper'; -import { Common, setupBrowser } from '../../utils/Common'; +import { Common } from '../../utils/Common'; let page; test.describe('Test ACR plugin', () => { @@ -8,9 +8,7 @@ test.describe('Test ACR plugin', () => { let common: Common; const dateRegex = /(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s\d{1,2},\s\d{4}/gm; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; - + test.beforeAll(async () => { uiHelper = new UIhelper(page); common = new Common(page); await common.loginAsGuest(); diff --git a/e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts b/e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts index 49fc241e4..bea9a3a19 100644 --- a/e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/bulk-import.spec.ts @@ -1,6 +1,6 @@ import { expect, Page, test } from '@playwright/test'; import { UIhelper } from '../../utils/UIhelper'; -import { Common, setupBrowser } from '../../utils/Common'; +import { Common } from '../../utils/Common'; import { APIHelper } from '../../utils/APIHelper'; import { BulkImport } from '../../support/pages/BulkImport'; import { @@ -33,9 +33,7 @@ test.describe.serial('Bulk Import plugin', () => { labels: `bulkimport1: test1;bulkimport2: test2`, repoUrl: `github.com/janus-test/${newRepoName}`, }; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; - + test.beforeAll(async () => { uiHelper = new UIhelper(page); common = new Common(page); bulkimport = new BulkImport(page); @@ -244,9 +242,7 @@ test.describe repoName: 'janus-test-2-bulk-import-test', url: 'https://github.com/janus-test/janus-test-2-bulk-import-test/blob/main/catalog-info.yaml', }; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; - + test.beforeAll(async () => { uiHelper = new UIhelper(page); common = new Common(page); bulkimport = new BulkImport(page); @@ -289,9 +285,7 @@ test.describe let page: Page; let uiHelper: UIhelper; let common: Common; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; - + test.beforeAll(async () => { uiHelper = new UIhelper(page); common = new Common(page); await common.loginAsGithubUser(); diff --git a/e2e-tests/playwright/e2e/plugins/frontend/sidebar.spec.ts b/e2e-tests/playwright/e2e/plugins/frontend/sidebar.spec.ts index 1f964ed28..c3bba5d09 100644 --- a/e2e-tests/playwright/e2e/plugins/frontend/sidebar.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/frontend/sidebar.spec.ts @@ -1,6 +1,6 @@ import { Page, test, expect } from '@playwright/test'; import { UIhelper } from '../../../utils/UIhelper'; -import { Common, setupBrowser } from '../../../utils/Common'; +import { Common } from '../../../utils/Common'; let page: Page; @@ -8,8 +8,7 @@ test.describe('Validate Sidebar Navigation Customization', () => { let uiHelper: UIhelper; let common: Common; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; + test.beforeAll(async () => { uiHelper = new UIhelper(page); common = new Common(page); diff --git a/e2e-tests/playwright/e2e/plugins/ocm.spec.ts b/e2e-tests/playwright/e2e/plugins/ocm.spec.ts index 52510134f..f3e51fb69 100644 --- a/e2e-tests/playwright/e2e/plugins/ocm.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/ocm.spec.ts @@ -1,5 +1,5 @@ import { Page, test } from '@playwright/test'; -import { Common, setupBrowser } from '../../utils/Common'; +import { Common } from '../../utils/Common'; import { UIhelper } from '../../utils/UIhelper'; import { Clusters } from '../../support/pages/Clusters'; @@ -21,9 +21,7 @@ test.describe.serial('Test OCM plugin', () => { let clusters: Clusters; let common: Common; - test.beforeAll(async ({ browser }, testInfo) => { - page = (await setupBrowser(browser, testInfo)).page; - + test.beforeAll(async () => { common = new Common(page); uiHelper = new UIhelper(page); clusters = new Clusters(page); diff --git a/e2e-tests/playwright/e2e/plugins/tekton/tekton.spec.ts b/e2e-tests/playwright/e2e/plugins/tekton/tekton.spec.ts index 43df909ee..e78bdecba 100644 --- a/e2e-tests/playwright/e2e/plugins/tekton/tekton.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/tekton/tekton.spec.ts @@ -1,5 +1,5 @@ import { test } from '@playwright/test'; -import { Common, setupBrowser } from '../../../../playwright/utils/Common'; +import { Common } from '../../../../playwright/utils/Common'; import { UIhelper } from '../../../../playwright/utils/UIhelper'; import { Tekton } from '../../../utils/tekton/tekton'; import { Catalog } from '../../../support/pages/Catalog'; @@ -16,9 +16,8 @@ test.describe('Test Tekton plugin', () => { let tekton: Tekton; let catalog: Catalog; - test.beforeAll(async ({ browser }, testInfo) => { - const page = (await setupBrowser(browser, testInfo)).page; - common = new Common(page); + test.beforeAll(async () => { + const common = new Common(page); await common.loginAsGuest(); uiHelper = new UIhelper(page); tekton = new Tekton(page);