From 03266b7885e162791585082f60cdd77919e8bc67 Mon Sep 17 00:00:00 2001 From: Aleksandr Shmaraiev Date: Thu, 30 Oct 2025 20:07:41 +0200 Subject: [PATCH 1/2] Fix up 'factory' E2E tests --- tests/e2e/index.ts | 2 +- .../e2e/specs/factory/NoSetupRepoFactory.spec.ts | 16 +++++++++------- .../specs/factory/RefusedOAuthFactory.spec.ts | 14 ++++++++------ 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/tests/e2e/index.ts b/tests/e2e/index.ts index 3a44bfb7d97..72c2834aa0f 100644 --- a/tests/e2e/index.ts +++ b/tests/e2e/index.ts @@ -31,9 +31,9 @@ export * from './pageobjects/dashboard/Workspaces'; export * from './pageobjects/git-providers/OauthPage'; export * from './pageobjects/ide/CheCodeLocatorLoader'; export * from './pageobjects/ide/CommandPalette'; -export * from './pageobjects/ide/GitHubExtensionDialog'; export * from './pageobjects/ide/ExplorerView'; export * from './pageobjects/ide/ExtensionsView'; +export * from './pageobjects/ide/GitHubExtensionDialog'; export * from './pageobjects/ide/NotificationHandler'; export * from './pageobjects/ide/RestrictedModeButton'; export * from './pageobjects/ide/SourceControlView'; diff --git a/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts b/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts index 5139f10e8f2..61fa9463c56 100644 --- a/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts +++ b/tests/e2e/specs/factory/NoSetupRepoFactory.spec.ts @@ -33,7 +33,7 @@ import { DriverHelper } from '../../utils/DriverHelper'; import { Dashboard } from '../../pageobjects/dashboard/Dashboard'; import { Logger } from '../../utils/Logger'; import { LoginTests } from '../../tests-library/LoginTests'; -import { FACTORY_TEST_CONSTANTS } from '../../constants/FACTORY_TEST_CONSTANTS'; +import { FACTORY_TEST_CONSTANTS, GitProviderType } from '../../constants/FACTORY_TEST_CONSTANTS'; import { BASE_TEST_CONSTANTS } from '../../constants/BASE_TEST_CONSTANTS'; import { UserPreferences } from '../../pageobjects/dashboard/UserPreferences'; import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil'; @@ -221,12 +221,14 @@ suite( await gitHubExtensionDialog.closeDialog(); } - // wait for the user name input to appear and create an InputBox to enter the user name - Logger.debug('Waiting for username input to appear'); - const inputUsername: InputBox = await InputBox.create(TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT); - Logger.debug(`Setting username: "${OAUTH_CONSTANTS.TS_SELENIUM_GIT_PROVIDER_USERNAME}"`); - await inputUsername.setText(OAUTH_CONSTANTS.TS_SELENIUM_GIT_PROVIDER_USERNAME); - await inputUsername.confirm(); + if (FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER !== GitProviderType.BITBUCKET_CLOUD_OAUTH2) { + // wait for the user name input to appear and create an InputBox to enter the user name + Logger.debug('Waiting for username input to appear'); + const inputUsername: InputBox = await InputBox.create(TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT); + Logger.debug(`Setting username: "${OAUTH_CONSTANTS.TS_SELENIUM_GIT_PROVIDER_USERNAME}"`); + await inputUsername.setText(OAUTH_CONSTANTS.TS_SELENIUM_GIT_PROVIDER_USERNAME); + await inputUsername.confirm(); + } // wait for password input to appear after username confirmation Logger.debug('Waiting for password input to appear'); diff --git a/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts b/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts index fa4ea6baf89..fb878035a54 100644 --- a/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts +++ b/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts @@ -262,12 +262,14 @@ suite( await gitHubExtensionDialog.closeDialog(); } - // wait for the user name input to appear and create an InputBox to enter the user name - Logger.debug('Waiting for username input to appear'); - const inputUsername: InputBox = await InputBox.create(TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT); - Logger.debug(`Setting username: "${OAUTH_CONSTANTS.TS_SELENIUM_GIT_PROVIDER_USERNAME}"`); - await inputUsername.setText(OAUTH_CONSTANTS.TS_SELENIUM_GIT_PROVIDER_USERNAME); - await inputUsername.confirm(); + if (FACTORY_TEST_CONSTANTS.TS_SELENIUM_FACTORY_GIT_PROVIDER !== GitProviderType.BITBUCKET_CLOUD_OAUTH2) { + // wait for the user name input to appear and create an InputBox to enter the user name + Logger.debug('Waiting for username input to appear'); + const inputUsername: InputBox = await InputBox.create(TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT); + Logger.debug(`Setting username: "${OAUTH_CONSTANTS.TS_SELENIUM_GIT_PROVIDER_USERNAME}"`); + await inputUsername.setText(OAUTH_CONSTANTS.TS_SELENIUM_GIT_PROVIDER_USERNAME); + await inputUsername.confirm(); + } // wait for password input to appear after username confirmation Logger.debug('Waiting for password input to appear'); From 26a1daf5e9f374888b9321bd8323015a1008e2d3 Mon Sep 17 00:00:00 2001 From: Aleksandr Shmaraiev Date: Thu, 30 Oct 2025 20:08:44 +0200 Subject: [PATCH 2/2] Fix up --- tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts b/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts index fb878035a54..2e61be7f5e6 100644 --- a/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts +++ b/tests/e2e/specs/factory/RefusedOAuthFactory.spec.ts @@ -35,7 +35,7 @@ import { StringUtil } from '../../utils/StringUtil'; import { Logger } from '../../utils/Logger'; import { LoginTests } from '../../tests-library/LoginTests'; import { BASE_TEST_CONSTANTS } from '../../constants/BASE_TEST_CONSTANTS'; -import { FACTORY_TEST_CONSTANTS } from '../../constants/FACTORY_TEST_CONSTANTS'; +import { FACTORY_TEST_CONSTANTS, GitProviderType } from '../../constants/FACTORY_TEST_CONSTANTS'; import { UserPreferences } from '../../pageobjects/dashboard/UserPreferences'; import { ITestWorkspaceUtil } from '../../utils/workspace/ITestWorkspaceUtil'; import { Dashboard } from '../../pageobjects/dashboard/Dashboard';