[Selenium] Update 'GitSsh' E2E typescript test (#19077)
Add changes to stabilize 'GitSsh' e2e test7.28.x
parent
8d91b7bbcf
commit
946162f61a
|
|
@ -11,11 +11,6 @@
|
|||
export const TimeoutConstants = {
|
||||
// -------------------------------------------- INSTALLING AND STARTUP --------------------------------------------
|
||||
|
||||
/**
|
||||
* Timeout in milliseconds waiting for install Eclipse Che by OperatorHub UI, "600 000" by default.
|
||||
*/
|
||||
TS_SELENIUM_INSTALL_ECLIPSE_CHE_TIMEOUT: Number(process.env.TS_SELENIUM_START_WORKSPACE_TIMEOUT) || 600_000,
|
||||
|
||||
/**
|
||||
* Wait between workspace started and IDE ready to be used, "20 000" by default.
|
||||
*/
|
||||
|
|
@ -153,9 +148,9 @@ export const TimeoutConstants = {
|
|||
TS_GIT_CONAINER_INTERACTION_TIMEOUT: Number(process.env.TS_GIT_CONAINER_INTERACTION_TIMEOUT) || 20_000,
|
||||
|
||||
/**
|
||||
* Timeout for toolbars interaction, "20 000" by default
|
||||
* Timeout for toolbars interaction, "30 000" by default
|
||||
*/
|
||||
TS_SELENIUM_TOOLBAR_TIMEOUT: Number(process.env.TS_SELENIUM_TOOLBAR_TIMEOUT) || 20_000,
|
||||
TS_SELENIUM_TOOLBAR_TIMEOUT: Number(process.env.TS_SELENIUM_TOOLBAR_TIMEOUT) || 30_000,
|
||||
|
||||
/**
|
||||
* Timeout for clicking on visible item, "3 000" by default
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ export class DebugView {
|
|||
* Click on "Threads" view title.
|
||||
*/
|
||||
async clickOnThreadsViewTitle() {
|
||||
Logger.debug(`Click on "Threads" view title`)
|
||||
|
||||
Logger.debug(`Click on "Threads" view title`);
|
||||
|
||||
const threadsViewTitleLocator: By = By.xpath('//div[@id="debug:view-container:-1--debug:threads:-1"]/*/span[@title="Threads"]');
|
||||
await this.driverHelper.waitAndClick(threadsViewTitleLocator);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ export class Ide {
|
|||
await this.driverHelper.waitAndClick(By.xpath(yesButtonLocator));
|
||||
}
|
||||
|
||||
async waitWorkspaceAndIde(timeout: number = TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT) {
|
||||
async waitWorkspaceAndIde(timeout: number = TimeoutConstants.TS_SELENIUM_START_WORKSPACE_TIMEOUT) {
|
||||
|
||||
Logger.debug('Ide.waitWorkspaceAndIde');
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import { GitHubUtil } from '../../utils/VCS/github/GitHubUtil';
|
|||
import { TestWorkspaceUtil } from '../../utils/workspace/TestWorkspaceUtil';
|
||||
import { TopMenu } from '../../pageobjects/ide/TopMenu';
|
||||
import { TimeoutConstants } from '../../TimeoutConstants';
|
||||
import { Dashboard } from '../../pageobjects/dashboard/Dashboard';
|
||||
|
||||
const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
|
||||
const ide: Ide = e2eContainer.get(CLASSES.Ide);
|
||||
|
|
@ -37,23 +38,26 @@ const cheGitAPI: CheGitApi = e2eContainer.get(CLASSES.CheGitApi);
|
|||
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
|
||||
const gitPlugin: GitPlugin = e2eContainer.get(CLASSES.GitPlugin);
|
||||
const testWorkspaceUtils: TestWorkspaceUtil = e2eContainer.get<TestWorkspaceUtil>(TYPES.WorkspaceUtil);
|
||||
const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard);
|
||||
|
||||
|
||||
suite('Git with ssh workflow', async () => {
|
||||
const workspacePrefixUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/dashboard/#/ide/${TestConstants.TS_SELENIUM_USERNAME}/`;
|
||||
const wsNameCheckGeneratingKeys = 'checkGeneraringSsh';
|
||||
const wsNameCheckGeneratingKeys = 'checkGeneratingSsh';
|
||||
const wsNameCheckPropagatingKeys = 'checkPropagatingSsh';
|
||||
const committedFile = 'README.md';
|
||||
|
||||
suiteSetup(async function () {
|
||||
const wsConfig = await testWorkspaceUtils.getBaseDevfile();
|
||||
wsConfig.metadata!.name = wsNameCheckGeneratingKeys;
|
||||
await driverHelper.navigateToUrl(TestConstants.TS_SELENIUM_BASE_URL);
|
||||
await loginPage.login();
|
||||
await testWorkspaceUtils.createWsFromDevFile(wsConfig);
|
||||
});
|
||||
|
||||
test('Login into workspace and open tree container', async () => {
|
||||
await dashboard.waitPage();
|
||||
await driverHelper.navigateToUrl(workspacePrefixUrl + wsNameCheckGeneratingKeys);
|
||||
await loginPage.login();
|
||||
await ide.waitWorkspaceAndIde();
|
||||
await projectTree.openProjectTreeContainer();
|
||||
await driverHelper.wait(TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT);
|
||||
|
|
@ -98,7 +102,10 @@ suite('Git with ssh workflow', async () => {
|
|||
|
||||
data.metadata!.name = wsNameCheckPropagatingKeys;
|
||||
await testWorkspaceUtils.createWsFromDevFile(data);
|
||||
// update view of dashboard, it's related to https://github.com/eclipse/che/issues/19020
|
||||
await driverHelper.reloadPage();
|
||||
await driverHelper.navigateToUrl(workspacePrefixUrl + wsNameCheckPropagatingKeys);
|
||||
await dashboard.waitPage();
|
||||
await ide.waitWorkspaceAndIde();
|
||||
await projectTree.openProjectTreeContainer();
|
||||
await driverHelper.wait(TimeoutConstants.TS_SELENIUM_LOAD_PAGE_TIMEOUT);
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ suite('Validation of debug functionality', async () => {
|
|||
} catch (err) {
|
||||
Logger.debug('Workaround for the https://github.com/eclipse/che/issues/18034 issue.');
|
||||
await debugView.clickOnThreadsViewTitle();
|
||||
|
||||
|
||||
await debugView.waitForDebuggerToConnect();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue