New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@eclipse-che/che-e2e

Package Overview
Dependencies
Maintainers
4
Versions
363
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eclipse-che/che-e2e - npm Package Compare versions

Comparing version 7.81.0-next-a25d3b5 to 7.81.0-next-f7a4289

dist/specs/miscellaneous/RevokeOauth.spec.js

3

configs/inversify.types.ts

@@ -52,3 +52,4 @@ /** *******************************************************************

UserPreferences: 'UserPreferences',
WebTerminalPage: 'WebTerminalPage'
WebTerminalPage: 'WebTerminalPage',
RevokeOauthPage: 'RevokeOauthPage'
};

@@ -55,0 +56,0 @@

@@ -16,3 +16,3 @@ /** *******************************************************************

process.env.TS_SAMPLE_LIST ||
'Node.js MongoDB,Node.js Express,Java 11 with Lombok,Java 11 with Quarkus,Python,.NET,C/C++,Go,PHP,Ansible'
'Node.js MongoDB,Node.js Express,Java Lombok,Quarkus REST API,Python,.NET,C/C++,Go,PHP,Ansible'
};

@@ -54,3 +54,4 @@ "use strict";

UserPreferences: 'UserPreferences',
WebTerminalPage: 'WebTerminalPage'
WebTerminalPage: 'WebTerminalPage',
RevokeOauthPage: 'RevokeOauthPage'
};

@@ -57,0 +58,0 @@ exports.CLASSES = CLASSES;

@@ -18,4 +18,4 @@ "use strict";

TS_SAMPLE_LIST: process.env.TS_SAMPLE_LIST ||
'Node.js MongoDB,Node.js Express,Java 11 with Lombok,Java 11 with Quarkus,Python,.NET,C/C++,Go,PHP,Ansible'
'Node.js MongoDB,Node.js Express,Java Lombok,Quarkus REST API,Python,.NET,C/C++,Go,PHP,Ansible'
};
//# sourceMappingURL=PLUGIN_TEST_CONSTANTS.js.map

@@ -32,2 +32,3 @@ "use strict";

const Logger_1 = require("../../utils/Logger");
const FACTORY_TEST_CONSTANTS_1 = require("../../constants/FACTORY_TEST_CONSTANTS");
let UserPreferences = UserPreferences_1 = class UserPreferences {

@@ -59,2 +60,15 @@ constructor(driverHelper) {

}
async revokeGitService(servicesName) {
Logger_1.Logger.debug();
await this.selectListItem(servicesName);
await this.driverHelper.waitAndClick(UserPreferences_1.GIT_SERVICES_REVOKE_BUTTON);
await this.driverHelper.waitVisibility(UserPreferences_1.CONFIRMATION_WINDOW);
await this.driverHelper.waitAndClick(UserPreferences_1.DELETE_CONFIRMATION_CHECKBOX);
await this.driverHelper.waitAndClick(UserPreferences_1.DELETE_ITEM_BUTTON_ENABLED);
await this.driverHelper.waitDisappearance(this.getServicesListItemLocator(servicesName));
}
async selectListItem(servicesName) {
Logger_1.Logger.debug(`of the '${servicesName}' list item`);
await this.driverHelper.waitAndClick(this.getServicesListItemLocator(servicesName));
}
async openPatTab() {

@@ -74,2 +88,16 @@ Logger_1.Logger.debug();

}
getServiceConfig(service) {
const gitService = {
[FACTORY_TEST_CONSTANTS_1.GitProviderType.GITHUB]: 'GitHub',
[FACTORY_TEST_CONSTANTS_1.GitProviderType.GITLAB]: 'GitLab',
[FACTORY_TEST_CONSTANTS_1.GitProviderType.AZURE_DEVOPS]: 'Microsoft Azure DevOps',
[FACTORY_TEST_CONSTANTS_1.GitProviderType.BITBUCKET_CLOUD_OAUTH2]: 'Bitbucket Cloud',
[FACTORY_TEST_CONSTANTS_1.GitProviderType.BITBUCKET_SERVER_OAUTH1]: 'Bitbucket Server',
[FACTORY_TEST_CONSTANTS_1.GitProviderType.BITBUCKET_SERVER_OAUTH2]: 'Bitbucket Server'
};
return gitService[service];
}
getServicesListItemLocator(servicesName) {
return selenium_webdriver_1.By.xpath(`//tr[td[text()='${servicesName}']]//input`);
}
};

@@ -81,2 +109,3 @@ UserPreferences.USER_SETTINGS_DROPDOWN = selenium_webdriver_1.By.xpath('//header//button/span[text()!=""]//parent::button');

UserPreferences.GIT_SERVICES_TAB = selenium_webdriver_1.By.xpath('//button[text()="Git Services"]');
UserPreferences.GIT_SERVICES_REVOKE_BUTTON = selenium_webdriver_1.By.xpath('//button[text()="Revoke"]');
UserPreferences.PAT_TAB = selenium_webdriver_1.By.xpath('//button[text()="Personal Access Tokens"]');

@@ -87,2 +116,5 @@ UserPreferences.ADD_NEW_PAT_BUTTON = selenium_webdriver_1.By.xpath('//button[text()="Add Personal Access Token"]');

UserPreferences.ADD_NEW_SSH_KEY_BUTTON = selenium_webdriver_1.By.xpath('//button[text()="Add SSH Key"]');
UserPreferences.CONFIRMATION_WINDOW = selenium_webdriver_1.By.xpath('//span[text()="Revoke Git Services"]');
UserPreferences.DELETE_CONFIRMATION_CHECKBOX = selenium_webdriver_1.By.xpath('//input[@data-testid="warning-info-checkbox"]');
UserPreferences.DELETE_ITEM_BUTTON_ENABLED = selenium_webdriver_1.By.xpath('//button[@data-testid="revoke-button" and not(@disabled)]');
UserPreferences = UserPreferences_1 = __decorate([

@@ -89,0 +121,0 @@ (0, inversify_1.injectable)(),

@@ -16,3 +16,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.WebTerminalPage = void 0;
exports.WebTerminalPage = exports.TimeUnits = void 0;
/** *******************************************************************

@@ -34,2 +34,8 @@ * copyright (c) 2019-2023 Red Hat, Inc.

const TIMEOUT_CONSTANTS_1 = require("../../constants/TIMEOUT_CONSTANTS");
var TimeUnits;
(function (TimeUnits) {
TimeUnits["Seconds"] = "Seconds";
TimeUnits["Minutes"] = "Minutes";
TimeUnits["Hours"] = "Hours";
})(TimeUnits = exports.TimeUnits || (exports.TimeUnits = {}));
let WebTerminalPage = WebTerminalPage_1 = class WebTerminalPage {

@@ -47,3 +53,3 @@ constructor(driverHelper) {

}
async clickOnStartWebTerminalIcon() {
async clickOnStartWebTerminalButton() {
Logger_1.Logger.debug();

@@ -59,3 +65,3 @@ await this.driverHelper.waitAndClick(WebTerminalPage_1.START_WT_COMMAND_LINE_TERMINAL_BUTTON);

await this.clickOnWebTerminalIcon();
await this.clickOnStartWebTerminalIcon();
await this.clickOnStartWebTerminalButton();
await this.waitTerminalIsStarted();

@@ -114,6 +120,45 @@ }

}
async waitTerminalInactivity() {
await this.driverHelper.waitPresence(WebTerminalPage_1.TERMINAL_INACTIVITY_MESS, TIMEOUT_CONSTANTS_1.TIMEOUT_CONSTANTS.TS_COMMON_PLUGIN_TEST_TIMEOUT);
await this.driverHelper.waitPresence(WebTerminalPage_1.RESTART_BUTTON);
async waitTerminalInactivity(customTimeout) {
await this.driverHelper.waitVisibility(WebTerminalPage_1.TERMINAL_INACTIVITY_MESS, TIMEOUT_CONSTANTS_1.TIMEOUT_CONSTANTS.TS_COMMON_PLUGIN_TEST_TIMEOUT || customTimeout);
await this.driverHelper.waitVisibility(WebTerminalPage_1.RESTART_BUTTON);
}
async waitWebTerminalProjectNameField() {
await this.driverHelper.waitPresence(WebTerminalPage_1.PROJECT_NAMESPACE_DROP_DAWN);
}
async typeProjectName(projectName) {
await this.waitWebTerminalProjectNameField();
await this.driverHelper.type(WebTerminalPage_1.PROJECT_NAME_FIELD, projectName, TIMEOUT_CONSTANTS_1.TIMEOUT_CONSTANTS.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM);
}
async openProjectDropDawn() {
await this.driverHelper.waitAndClick(WebTerminalPage_1.PROJECT_NAMESPACE_DROP_DAWN);
}
async typeProjectNameForSelecting(projectName) {
await this.driverHelper.type(WebTerminalPage_1.PROJECT_SELECTION_FIELD, projectName);
}
async selectProjectFromDropDawnList(projectName) {
await this.driverHelper.waitAndClick(selenium_webdriver_1.By.xpath(`//span[@class="pf-c-menu__item-text" and text()="${projectName}"]`));
}
async findAndSelectProject(projectName) {
await this.openProjectDropDawn();
await this.typeProjectNameForSelecting(projectName);
await this.selectProjectFromDropDawnList(projectName);
}
async clickOnTimeoutButton() {
await this.driverHelper.waitAndClick(WebTerminalPage_1.TIMEOUT_BUTTON);
}
async setTimeoutByEntering(timeValue) {
await this.driverHelper.type(WebTerminalPage_1.TIMEOUT_INPUT, timeValue.toString());
}
async clickOnPlusBtn() {
await this.driverHelper.waitAndClick(WebTerminalPage_1.INCREMENT_TIMEOUT_BTN);
}
async clickOnMinutesBtn() {
await this.driverHelper.waitAndClick(WebTerminalPage_1.DECREMENT_TIMEOUT_BTN);
}
async clickOnTimeUnitDropDown() {
await this.driverHelper.waitAndClick(WebTerminalPage_1.TIME_UNIT_DROP_DAWN);
}
async selectTimeUnit(timeUnits) {
await this.driverHelper.waitAndClick(selenium_webdriver_1.By.xpath(`//button[@data-test-id='dropdown-menu' and text()='${timeUnits}']`));
}
};

@@ -127,4 +172,11 @@ WebTerminalPage.TIMEOUT_BUTTON = selenium_webdriver_1.By.xpath('//button[(text()="Timeout")]');

WebTerminalPage.WEB_TERMINAL_PROJECT_CANCEL_BUTTON = selenium_webdriver_1.By.css('button[data-test-id="reset-button"]');
WebTerminalPage.TERMINAL_INACTIVITY_MESS = selenium_webdriver_1.By.xpath('//div[text()="The terminal connection has closed."]');
WebTerminalPage.TERMINAL_INACTIVITY_MESS = selenium_webdriver_1.By.xpath('//div[contains(text(),"The terminal connection has closed")]');
WebTerminalPage.RESTART_BUTTON = selenium_webdriver_1.By.xpath('//button[text()="Restart terminal"]');
WebTerminalPage.PROJECT_NAMESPACE_DROP_DAWN = selenium_webdriver_1.By.css('button#form-ns-dropdown-namespace-field');
WebTerminalPage.PROJECT_SELECTION_FIELD = selenium_webdriver_1.By.css('input[data-test-id="dropdown-text-filter"]');
WebTerminalPage.PROJECT_NAME_FIELD = selenium_webdriver_1.By.css('input#form-input-newNamespace-field');
WebTerminalPage.TIMEOUT_INPUT = selenium_webdriver_1.By.css('input[aria-describedby="form-resource-limit-advancedOptions-timeout-limit-field-helper"]');
WebTerminalPage.INCREMENT_TIMEOUT_BTN = selenium_webdriver_1.By.css('button[data-test-id="Decrement"]');
WebTerminalPage.DECREMENT_TIMEOUT_BTN = selenium_webdriver_1.By.css('button[data-test-id="Increment');
WebTerminalPage.TIME_UNIT_DROP_DAWN = selenium_webdriver_1.By.css('div.request-size-input__unit button');
WebTerminalPage = WebTerminalPage_1 = __decorate([

@@ -131,0 +183,0 @@ (0, inversify_1.injectable)(),

@@ -29,3 +29,3 @@ "use strict";

const browserTabsUtil = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.BrowserTabsUtil);
const testingVersion = BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TESTING_APPLICATION_VERSION;
const majorMinorVersion = BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TESTING_APPLICATION_VERSION.split('.').slice(0, 2).join('.'); // extract major.minor version from full version
let parentGUID = '';

@@ -41,3 +41,3 @@ let docs, links, productVersion;

try {
({ docs, links, productVersion } = JSON.parse(shellExecutor.curl(`https://raw.githubusercontent.com/redhat-developer/devspaces-images/devspaces-${testingVersion}-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json`)));
({ docs, links, productVersion } = JSON.parse(shellExecutor.curl(`https://raw.githubusercontent.com/redhat-developer/devspaces-images/devspaces-${majorMinorVersion}-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json`)));
}

@@ -55,3 +55,3 @@ catch (e) {

[productVersion, links[1].href, devfile, workspace, general, storageTypes, webSocketTroubleshooting].forEach((e) => {
(0, chai_1.expect)(e, 'Fetched links not matches with tested product version').contains(testingVersion);
(0, chai_1.expect)(e, 'Fetched links not matches with tested product version').contains(majorMinorVersion);
});

@@ -91,7 +91,2 @@ });

});
test('Check if Workspace Details page contains "Devfile" documentation link', async function () {
await workspaceDetails.closeStorageTypeInfo();
await workspaceDetails.selectTab('Devfile');
(0, chai_1.expect)(await workspaceDetails.getDevfileDocumentationLink(), '"Devfile" doc link is broken').eqls(devfile);
});
if (BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.IS_PRODUCT_DOCUMENTATION_RELEASED) {

@@ -98,0 +93,0 @@ test('Check if product.json documentation links returns status code 200', async function () {

@@ -18,3 +18,3 @@ "use strict";

const chai_1 = require("chai");
const stackName = 'Java 11 with Quarkus';
const stackName = 'Quarkus REST API';
suite(`The ${stackName} userstory ${BASE_TEST_CONSTANTS_1.BASE_TEST_CONSTANTS.TEST_ENVIRONMENT}`, function () {

@@ -21,0 +21,0 @@ const projectAndFileTests = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.ProjectAndFileTests);

@@ -21,3 +21,3 @@ "use strict";

});
test(`Check user preferences page`, async function () {
test('Check user preferences page', async function () {
await userPreferences.openUserPreferencesPage();

@@ -24,0 +24,0 @@ await userPreferences.checkTabsAvailability();

@@ -26,2 +26,3 @@ "use strict";

const kubernetesCommandLineToolsExecutor = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.KubernetesCommandLineToolsExecutor);
const defaultWTOProjectNameForAdmin = 'openshift-terminal';
const driverHelper = inversify_config_1.e2eContainer.get(inversify_types_1.CLASSES.DriverHelper);

@@ -33,2 +34,5 @@ const webTerminalToolContainerName = 'web-terminal-tooling';

});
suiteTeardown(function () {
shellExecutor.executeArbitraryShellScript(`oc delete dw --all -n ${defaultWTOProjectNameForAdmin}`);
});
loginTests.loginIntoOcpConsole();

@@ -40,12 +44,9 @@ test('Open Web Terminal after first installation', async function () {

});
test('Verify inactivity dropdown menu for admin user', async function () {
await webTerminal.clickOnProjectListDropDown();
});
test('Verify first started WTO widget and disabled state Project field under admin user', async function () {
await webTerminal.waitTerminalWidget();
(0, chai_1.expect)(await webTerminal.waitDisabledProjectFieldAndGetProjectName()).equal('openshift-terminal');
(0, chai_1.expect)(await webTerminal.waitDisabledProjectFieldAndGetProjectName()).equal(defaultWTOProjectNameForAdmin);
});
test('Check starting Web Terminal under admin', async function () {
kubernetesCommandLineToolsExecutor.namespace = await webTerminal.getAdminProjectName();
await webTerminal.clickOnStartWebTerminalIcon();
await webTerminal.clickOnStartWebTerminalButton();
await webTerminal.waitTerminalIsStarted();

@@ -52,0 +53,0 @@ await webTerminal.typeAndEnterIntoWebTerminal(`oc whoami > ${fileForVerificationTerminalCommands}`);

{
"name": "@eclipse-che/che-e2e",
"version": "7.81.0-next-a25d3b5",
"version": "7.81.0-next-f7a4289",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -16,2 +16,3 @@ /** *******************************************************************

import { Logger } from '../../utils/Logger';
import { GitProviderType } from '../../constants/FACTORY_TEST_CONSTANTS';

@@ -25,3 +26,5 @@ @injectable()

private static readonly CONTAINER_REGISTRIES_TAB: By = By.xpath('//button[text()="Container Registries"]');
private static readonly GIT_SERVICES_TAB: By = By.xpath('//button[text()="Git Services"]');
private static readonly GIT_SERVICES_REVOKE_BUTTON: By = By.xpath('//button[text()="Revoke"]');

@@ -36,2 +39,6 @@ private static readonly PAT_TAB: By = By.xpath('//button[text()="Personal Access Tokens"]');

private static readonly CONFIRMATION_WINDOW: By = By.xpath('//span[text()="Revoke Git Services"]');
private static readonly DELETE_CONFIRMATION_CHECKBOX: By = By.xpath('//input[@data-testid="warning-info-checkbox"]');
private static readonly DELETE_ITEM_BUTTON_ENABLED: By = By.xpath('//button[@data-testid="revoke-button" and not(@disabled)]');
constructor(

@@ -73,2 +80,20 @@ @inject(CLASSES.DriverHelper)

async revokeGitService(servicesName: string): Promise<void> {
Logger.debug();
await this.selectListItem(servicesName);
await this.driverHelper.waitAndClick(UserPreferences.GIT_SERVICES_REVOKE_BUTTON);
await this.driverHelper.waitVisibility(UserPreferences.CONFIRMATION_WINDOW);
await this.driverHelper.waitAndClick(UserPreferences.DELETE_CONFIRMATION_CHECKBOX);
await this.driverHelper.waitAndClick(UserPreferences.DELETE_ITEM_BUTTON_ENABLED);
await this.driverHelper.waitDisappearance(this.getServicesListItemLocator(servicesName));
}
async selectListItem(servicesName: string): Promise<void> {
Logger.debug(`of the '${servicesName}' list item`);
await this.driverHelper.waitAndClick(this.getServicesListItemLocator(servicesName));
}
async openPatTab(): Promise<void> {

@@ -93,2 +118,19 @@ Logger.debug();

}
getServiceConfig(service: string): string {
const gitService: { [key: string]: string } = {
[GitProviderType.GITHUB]: 'GitHub',
[GitProviderType.GITLAB]: 'GitLab',
[GitProviderType.AZURE_DEVOPS]: 'Microsoft Azure DevOps',
[GitProviderType.BITBUCKET_CLOUD_OAUTH2]: 'Bitbucket Cloud',
[GitProviderType.BITBUCKET_SERVER_OAUTH1]: 'Bitbucket Server',
[GitProviderType.BITBUCKET_SERVER_OAUTH2]: 'Bitbucket Server'
};
return gitService[service];
}
private getServicesListItemLocator(servicesName: string): By {
return By.xpath(`//tr[td[text()='${servicesName}']]//input`);
}
}

@@ -18,2 +18,7 @@ /** *******************************************************************

export enum TimeUnits {
Seconds = 'Seconds',
Minutes = 'Minutes',
Hours = 'Hours'
}
@injectable()

@@ -28,4 +33,14 @@ export class WebTerminalPage {

private static readonly WEB_TERMINAL_PROJECT_CANCEL_BUTTON: By = By.css('button[data-test-id="reset-button"]');
private static readonly TERMINAL_INACTIVITY_MESS: By = By.xpath('//div[text()="The terminal connection has closed."]');
private static readonly TERMINAL_INACTIVITY_MESS: By = By.xpath('//div[contains(text(),"The terminal connection has closed")]');
private static readonly RESTART_BUTTON: By = By.xpath('//button[text()="Restart terminal"]');
private static readonly PROJECT_NAMESPACE_DROP_DAWN: By = By.css('button#form-ns-dropdown-namespace-field');
private static readonly PROJECT_SELECTION_FIELD: By = By.css('input[data-test-id="dropdown-text-filter"]');
private static readonly PROJECT_NAME_FIELD: By = By.css('input#form-input-newNamespace-field');
private static readonly TIMEOUT_INPUT: By = By.css(
'input[aria-describedby="form-resource-limit-advancedOptions-timeout-limit-field-helper"]'
);
private static readonly INCREMENT_TIMEOUT_BTN: By = By.css('button[data-test-id="Decrement"]');
private static readonly DECREMENT_TIMEOUT_BTN: By = By.css('button[data-test-id="Increment');
private static readonly TIME_UNIT_DROP_DAWN: By = By.css('div.request-size-input__unit button');
constructor(

@@ -44,3 +59,3 @@ @inject(CLASSES.DriverHelper)

}
async clickOnStartWebTerminalIcon(): Promise<void> {
async clickOnStartWebTerminalButton(): Promise<void> {
Logger.debug();

@@ -59,3 +74,3 @@ await this.driverHelper.waitAndClick(WebTerminalPage.START_WT_COMMAND_LINE_TERMINAL_BUTTON);

await this.clickOnWebTerminalIcon();
await this.clickOnStartWebTerminalIcon();
await this.clickOnStartWebTerminalButton();
await this.waitTerminalIsStarted();

@@ -119,6 +134,53 @@ }

}
async waitTerminalInactivity(): Promise<void> {
await this.driverHelper.waitPresence(WebTerminalPage.TERMINAL_INACTIVITY_MESS, TIMEOUT_CONSTANTS.TS_COMMON_PLUGIN_TEST_TIMEOUT);
await this.driverHelper.waitPresence(WebTerminalPage.RESTART_BUTTON);
async waitTerminalInactivity(customTimeout?: number): Promise<void> {
await this.driverHelper.waitVisibility(
WebTerminalPage.TERMINAL_INACTIVITY_MESS,
TIMEOUT_CONSTANTS.TS_COMMON_PLUGIN_TEST_TIMEOUT || customTimeout
);
await this.driverHelper.waitVisibility(WebTerminalPage.RESTART_BUTTON);
}
async waitWebTerminalProjectNameField(): Promise<void> {
await this.driverHelper.waitPresence(WebTerminalPage.PROJECT_NAMESPACE_DROP_DAWN);
}
async typeProjectName(projectName: string): Promise<void> {
await this.waitWebTerminalProjectNameField();
await this.driverHelper.type(WebTerminalPage.PROJECT_NAME_FIELD, projectName, TIMEOUT_CONSTANTS.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM);
}
async openProjectDropDawn(): Promise<void> {
await this.driverHelper.waitAndClick(WebTerminalPage.PROJECT_NAMESPACE_DROP_DAWN);
}
async typeProjectNameForSelecting(projectName: string): Promise<void> {
await this.driverHelper.type(WebTerminalPage.PROJECT_SELECTION_FIELD, projectName);
}
async selectProjectFromDropDawnList(projectName: string): Promise<void> {
await this.driverHelper.waitAndClick(By.xpath(`//span[@class="pf-c-menu__item-text" and text()="${projectName}"]`));
}
async findAndSelectProject(projectName: string): Promise<void> {
await this.openProjectDropDawn();
await this.typeProjectNameForSelecting(projectName);
await this.selectProjectFromDropDawnList(projectName);
}
async clickOnTimeoutButton(): Promise<void> {
await this.driverHelper.waitAndClick(WebTerminalPage.TIMEOUT_BUTTON);
}
async setTimeoutByEntering(timeValue: number): Promise<void> {
await this.driverHelper.type(WebTerminalPage.TIMEOUT_INPUT, timeValue.toString());
}
async clickOnPlusBtn(): Promise<void> {
await this.driverHelper.waitAndClick(WebTerminalPage.INCREMENT_TIMEOUT_BTN);
}
async clickOnMinutesBtn(): Promise<void> {
await this.driverHelper.waitAndClick(WebTerminalPage.DECREMENT_TIMEOUT_BTN);
}
async clickOnTimeUnitDropDown(): Promise<void> {
await this.driverHelper.waitAndClick(WebTerminalPage.TIME_UNIT_DROP_DAWN);
}
async selectTimeUnit(timeUnits: TimeUnits): Promise<void> {
await this.driverHelper.waitAndClick(By.xpath(`//button[@data-test-id='dropdown-menu' and text()='${timeUnits}']`));
}
}

@@ -43,3 +43,3 @@ /** *******************************************************************

const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil);
const testingVersion: string = BASE_TEST_CONSTANTS.TESTING_APPLICATION_VERSION;
const majorMinorVersion: string = BASE_TEST_CONSTANTS.TESTING_APPLICATION_VERSION.split('.').slice(0, 2).join('.'); // extract major.minor version from full version
let parentGUID: string = '';

@@ -59,3 +59,3 @@ let docs: any, links: any, productVersion: any;

shellExecutor.curl(
`https://raw.githubusercontent.com/redhat-developer/devspaces-images/devspaces-${testingVersion}-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json`
`https://raw.githubusercontent.com/redhat-developer/devspaces-images/devspaces-${majorMinorVersion}-rhel-8/devspaces-dashboard/packages/dashboard-frontend/assets/branding/product.json`
)

@@ -76,3 +76,3 @@ ));

[productVersion, links[1].href, devfile, workspace, general, storageTypes, webSocketTroubleshooting].forEach((e): void => {
expect(e, 'Fetched links not matches with tested product version').contains(testingVersion);
expect(e, 'Fetched links not matches with tested product version').contains(majorMinorVersion);
});

@@ -118,8 +118,2 @@ });

test('Check if Workspace Details page contains "Devfile" documentation link', async function (): Promise<void> {
await workspaceDetails.closeStorageTypeInfo();
await workspaceDetails.selectTab('Devfile');
expect(await workspaceDetails.getDevfileDocumentationLink(), '"Devfile" doc link is broken').eqls(devfile);
});
if (BASE_TEST_CONSTANTS.IS_PRODUCT_DOCUMENTATION_RELEASED) {

@@ -126,0 +120,0 @@ test('Check if product.json documentation links returns status code 200', async function (): Promise<void> {

@@ -24,3 +24,3 @@ /** *******************************************************************

const stackName: string = 'Java 11 with Quarkus';
const stackName: string = 'Quarkus REST API';

@@ -27,0 +27,0 @@ suite(`The ${stackName} userstory ${BASE_TEST_CONSTANTS.TEST_ENVIRONMENT}`, function (): void {

@@ -24,3 +24,3 @@ /** *******************************************************************

test(`Check user preferences page`, async function (): Promise<void> {
test('Check user preferences page', async function (): Promise<void> {
await userPreferences.openUserPreferencesPage();

@@ -27,0 +27,0 @@ await userPreferences.checkTabsAvailability();

@@ -30,6 +30,7 @@ /** *******************************************************************

);
const defaultWTOProjectNameForAdmin: string = 'openshift-terminal';
const driverHelper: DriverHelper = e2eContainer.get(CLASSES.DriverHelper);
const webTerminalToolContainerName: string = 'web-terminal-tooling';
const fileForVerificationTerminalCommands: string = 'result.txt';
suiteSetup(function (): void {

@@ -39,2 +40,5 @@ kubernetesCommandLineToolsExecutor.loginToOcp('admin');

suiteTeardown(function (): void {
shellExecutor.executeArbitraryShellScript(`oc delete dw --all -n ${defaultWTOProjectNameForAdmin}`);
});
loginTests.loginIntoOcpConsole();

@@ -46,12 +50,9 @@ test('Open Web Terminal after first installation', async function (): Promise<void> {

});
test('Verify inactivity dropdown menu for admin user', async function (): Promise<void> {
await webTerminal.clickOnProjectListDropDown();
});
test('Verify first started WTO widget and disabled state Project field under admin user', async function (): Promise<void> {
await webTerminal.waitTerminalWidget();
expect(await webTerminal.waitDisabledProjectFieldAndGetProjectName()).equal('openshift-terminal');
expect(await webTerminal.waitDisabledProjectFieldAndGetProjectName()).equal(defaultWTOProjectNameForAdmin);
});
test('Check starting Web Terminal under admin', async function (): Promise<void> {
kubernetesCommandLineToolsExecutor.namespace = await webTerminal.getAdminProjectName();
await webTerminal.clickOnStartWebTerminalIcon();
await webTerminal.clickOnStartWebTerminalButton();
await webTerminal.waitTerminalIsStarted();

@@ -58,0 +59,0 @@ await webTerminal.typeAndEnterIntoWebTerminal(`oc whoami > ${fileForVerificationTerminalCommands}`);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc