Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/e2e/pageobjects/ide/RestrictedModeButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { Logger } from '../../utils/Logger';
@injectable()
export class RestrictedModeButton {
private static readonly RESTRICTED_MODE_BUTTON: By = By.id('status.workspaceTrust');
private static readonly CLOSE_RESTRICTED_MODE_WINDOW: By = By.css('a[aria-label="Close Modal Editor (Escape)"]');

constructor(
@inject(CLASSES.DriverHelper)
Expand All @@ -29,6 +30,12 @@ export class RestrictedModeButton {
await this.driverHelper.waitAndClick(RestrictedModeButton.RESTRICTED_MODE_BUTTON);
}

async closeRestrictedModeWindow(): Promise<void> {
Logger.debug();

await this.driverHelper.waitAndClick(RestrictedModeButton.CLOSE_RESTRICTED_MODE_WINDOW);
}

async isRestrictedModeButtonDisappearance(): Promise<void> {
Logger.debug();

Expand Down
3 changes: 2 additions & 1 deletion tests/e2e/specs/factory/SshUrlNoOauthPatFactory.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ suite(`The SshUrlNoOauthPatFactory userstory ${BASE_TEST_CONSTANTS.TEST_ENVIRONM
let scmContextMenu: ContextMenu;
let viewsActionsButton: boolean;
// test specific data
const timeToRefresh: number = 1500;
const timeToRefresh: number = 2500;
const changesToCommit: string = 'Commit ' + new Date().getTime().toString();
const fileToChange: string = 'Date.txt';
const refreshButtonLabel: string = 'Refresh';
Expand Down Expand Up @@ -139,6 +139,7 @@ suite(`The SshUrlNoOauthPatFactory userstory ${BASE_TEST_CONSTANTS.TEST_ENVIRONM
await driverHelper.getDriver().actions().sendKeys(Key.DELETE).perform();
await driverHelper.wait(1000);
Logger.debug(`Entering text: "${changesToCommit}"`);
await driverHelper.wait(2000);
await driverHelper.getDriver().actions().sendKeys(changesToCommit).perform();
});

Expand Down
1 change: 1 addition & 0 deletions tests/e2e/tests-library/ProjectAndFileTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ export class ProjectAndFileTests {
(this.cheCodeLocatorLoader.webCheCodeLocators.Workbench as any).workspaceTrustButton,
TIMEOUT_CONSTANTS.TS_DIALOG_WINDOW_DEFAULT_TIMEOUT
);
await this.restrictedModeButton.closeRestrictedModeWindow();
} catch (e) {
Logger.info('Restricted Mode button or Trusted Workspace box was not shown');
}
Expand Down
Loading