diff --git a/tests/e2e/specs/factory/Factory.spec.ts b/tests/e2e/specs/factory/Factory.spec.ts index a7bfbf7b57b..0443e634995 100644 --- a/tests/e2e/specs/factory/Factory.spec.ts +++ b/tests/e2e/specs/factory/Factory.spec.ts @@ -39,6 +39,7 @@ import { BASE_TEST_CONSTANTS } from '../../constants/BASE_TEST_CONSTANTS'; import { FACTORY_TEST_CONSTANTS } from '../../constants/FACTORY_TEST_CONSTANTS'; import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil'; import { Dashboard } from '../../pageobjects/dashboard/Dashboard'; +import { CreateWorkspace } from '../../pageobjects/dashboard/CreateWorkspace'; suite( `Create a workspace via launching a factory from the ${FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER} repository ${BASE_TEST_CONSTANTS.TEST_ENVIRONMENT}`, @@ -53,6 +54,7 @@ suite( const oauthPage: OauthPage = e2eContainer.get(CLASSES.OauthPage); const testWorkspaceUtil: ITestWorkspaceUtil = e2eContainer.get(TYPES.WorkspaceUtil); const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard); + const createWorkspace: CreateWorkspace = e2eContainer.get(CLASSES.CreateWorkspace); let projectSection: ViewSection; let scmProvider: SingleScmProvider; @@ -72,6 +74,7 @@ suite( }); test('Navigate to the factory URL', async function (): Promise { await browserTabsUtil.navigateTo(FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_URL()); + await createWorkspace.performTrustAuthorPopup(); }); if (OAUTH_CONSTANTS.TS_SELENIUM_GIT_PROVIDER_OAUTH) { diff --git a/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts b/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts index 4ee2548cca3..cc4eb8ecb62 100644 --- a/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts +++ b/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts @@ -40,6 +40,7 @@ import { FACTORY_TEST_CONSTANTS, GitProviderType } from '../../constants/FACTORY import { OAUTH_CONSTANTS } from '../../constants/OAUTH_CONSTANTS'; import { BASE_TEST_CONSTANTS } from '../../constants/BASE_TEST_CONSTANTS'; import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil'; +import { CreateWorkspace } from '../../pageobjects/dashboard/CreateWorkspace'; suite( `Create a workspace via launching a factory from the ${FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER} repository without PAT/OAuth setup ${BASE_TEST_CONSTANTS.TEST_ENVIRONMENT}`, @@ -54,6 +55,7 @@ suite( const workspaces: Workspaces = e2eContainer.get(CLASSES.Workspaces); const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests); const testWorkspaceUtil: ITestWorkspaceUtil = e2eContainer.get(TYPES.WorkspaceUtil); + const createWorkspace: CreateWorkspace = e2eContainer.get(CLASSES.CreateWorkspace); let projectSection: ViewSection; let scmProvider: SingleScmProvider; @@ -83,6 +85,7 @@ suite( test(`Navigate to the ${isPrivateRepo} repository factory URL`, async function (): Promise { await browserTabsUtil.navigateTo(FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_URL()); + await createWorkspace.performTrustAuthorPopup(); }); if (FACTORY_TEST_CONSTANTS.TS_SELENIUM_IS_PRIVATE_FACTORY_GIT_REPO) { diff --git a/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts b/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts index bf7499666ce..defa44c0b9a 100644 --- a/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts +++ b/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts @@ -39,6 +39,7 @@ import { BASE_TEST_CONSTANTS } from '../../constants/BASE_TEST_CONSTANTS'; import { FACTORY_TEST_CONSTANTS, GitProviderType } from '../../constants/FACTORY_TEST_CONSTANTS'; import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil'; import { Dashboard } from '../../pageobjects/dashboard/Dashboard'; +import { CreateWorkspace } from '../../pageobjects/dashboard/CreateWorkspace'; suite( `Create a workspace via launching a factory from the ${FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER} repository and deny the access ${BASE_TEST_CONSTANTS.TEST_ENVIRONMENT}`, @@ -53,6 +54,7 @@ suite( const oauthPage: OauthPage = e2eContainer.get(CLASSES.OauthPage); const testWorkspaceUtil: ITestWorkspaceUtil = e2eContainer.get(TYPES.WorkspaceUtil); const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard); + const createWorkspace: CreateWorkspace = e2eContainer.get(CLASSES.CreateWorkspace); let projectSection: ViewSection; let scmProvider: SingleScmProvider; @@ -76,6 +78,7 @@ suite( test(`Navigate to the ${isPrivateRepo} repository factory URL`, async function (): Promise { await browserTabsUtil.navigateTo(FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_URL()); + await createWorkspace.performTrustAuthorPopup(); }); test(`Authorize with a ${FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER} OAuth and deny access`, async function (): Promise { diff --git a/tests/e2e/specs/miscellaneous/WorkspaceWithParent.spec.ts b/tests/e2e/specs/miscellaneous/WorkspaceWithParent.spec.ts index c7fd451905e..af9d736a91e 100644 --- a/tests/e2e/specs/miscellaneous/WorkspaceWithParent.spec.ts +++ b/tests/e2e/specs/miscellaneous/WorkspaceWithParent.spec.ts @@ -25,6 +25,7 @@ import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil'; import { DriverHelper } from '../../utils/DriverHelper'; import { TIMEOUT_CONSTANTS } from '../../constants/TIMEOUT_CONSTANTS'; import { FACTORY_TEST_CONSTANTS } from '../../constants/FACTORY_TEST_CONSTANTS'; +import { CreateWorkspace } from '../../pageobjects/dashboard/CreateWorkspace'; suite(`Workspace using a parent test suite ${BASE_TEST_CONSTANTS.TEST_ENVIRONMENT}`, function (): void { const projectAndFileTests: ProjectAndFileTests = e2eContainer.get(CLASSES.ProjectAndFileTests); @@ -38,6 +39,7 @@ suite(`Workspace using a parent test suite ${BASE_TEST_CONSTANTS.TEST_ENVIRONMEN CLASSES.KubernetesCommandLineToolsExecutor ); const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper); + const createWorkspace: CreateWorkspace = e2eContainer.get(CLASSES.CreateWorkspace); let podName: string = ''; @@ -56,6 +58,7 @@ suite(`Workspace using a parent test suite ${BASE_TEST_CONSTANTS.TEST_ENVIRONMEN : BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL + '/dashboard/#/' + FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_REPO_URL; await dashboard.waitPage(); await browserTabsUtil.navigateTo(factoryUrl); + await createWorkspace.performTrustAuthorPopup(); await workspaceHandlingTests.obtainWorkspaceNameFromStartingPage(); registerRunningWorkspace(WorkspaceHandlingTests.getWorkspaceName()); await projectAndFileTests.waitWorkspaceReadinessForCheCodeEditor(); diff --git a/tests/e2e/tests-library/WorkspaceHandlingTests.ts b/tests/e2e/tests-library/WorkspaceHandlingTests.ts index 2c2a2df8f1b..e92702b725e 100644 --- a/tests/e2e/tests-library/WorkspaceHandlingTests.ts +++ b/tests/e2e/tests-library/WorkspaceHandlingTests.ts @@ -77,8 +77,6 @@ export class WorkspaceHandlingTests { } async obtainWorkspaceNameFromStartingPage(): Promise { - await this.createWorkspace.performTrustAuthorPopup(); - const timeout: number = TIMEOUT_CONSTANTS.TS_SELENIUM_START_WORKSPACE_TIMEOUT; const polling: number = TIMEOUT_CONSTANTS.TS_SELENIUM_DEFAULT_POLLING; const attempts: number = Math.ceil(timeout / polling);