diff --git a/tests/e2e/constants/BASE_TEST_CONSTANTS.ts b/tests/e2e/constants/BASE_TEST_CONSTANTS.ts index ec316168123..92fcec1fa7b 100644 --- a/tests/e2e/constants/BASE_TEST_CONSTANTS.ts +++ b/tests/e2e/constants/BASE_TEST_CONSTANTS.ts @@ -13,6 +13,8 @@ export enum Platform { } export const BASE_TEST_CONSTANTS: { + IS_PRODUCT_DOCUMENTATION_RELEASED: any; + TESTING_APPLICATION_VERSION: string; TS_DEBUG_MODE: boolean; TS_PLATFORM: string; TS_SELENIUM_RESPONSE_INTERCEPTOR: boolean; @@ -31,6 +33,20 @@ export const BASE_TEST_CONSTANTS: { */ TS_SELENIUM_BASE_URL: !process.env.TS_SELENIUM_BASE_URL ? 'http://sample-url' : process.env.TS_SELENIUM_BASE_URL.replace(/\/$/, ''), + /** + * testing application version + */ + TESTING_APPLICATION_VERSION: process.env.TESTING_APPLICATION_VERSION || '3.8', + + /** + * is "https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces/{TESTING_APPLICATION_VERSION}/" available online + * false by default + */ + IS_PRODUCT_DOCUMENTATION_RELEASED: process.env.IS_PRODUCT_DOCUMENTATION_RELEASED === 'true', + + /** + * is cluster disconnected of online + */ IS_CLUSTER_DISCONNECTED: (): boolean => BASE_TEST_CONSTANTS.TS_SELENIUM_BASE_URL.includes('airgap'), /** diff --git a/tests/e2e/pageobjects/dashboard/CreateWorkspace.ts b/tests/e2e/pageobjects/dashboard/CreateWorkspace.ts index a7d0756a7be..110e18ad70b 100644 --- a/tests/e2e/pageobjects/dashboard/CreateWorkspace.ts +++ b/tests/e2e/pageobjects/dashboard/CreateWorkspace.ts @@ -58,7 +58,7 @@ export class CreateWorkspace { Logger.debug(`sampleName: "${sampleName}"`); - const sampleLocator: By = this.getSampleLocatorWithSpecificEditor(sampleName); + const sampleLocator: By = this.getSampleWithSpecificEditorLocator(sampleName); await this.driverHelper.waitAndClick(sampleLocator, timeout); } @@ -80,7 +80,7 @@ export class CreateWorkspace { return By.xpath(`//div[text()=\'${sampleName}\']//parent::article//button`); } - private getSampleLocatorWithSpecificEditor(sampleName: string): By { + private getSampleWithSpecificEditorLocator(sampleName: string): By { let editor: string = ''; switch (process.env.TS_SELENIUM_EDITOR) { case 'che-code': diff --git a/tests/e2e/pageobjects/dashboard/Dashboard.ts b/tests/e2e/pageobjects/dashboard/Dashboard.ts index ada62e72971..beda2f7dc43 100644 --- a/tests/e2e/pageobjects/dashboard/Dashboard.ts +++ b/tests/e2e/pageobjects/dashboard/Dashboard.ts @@ -26,12 +26,22 @@ export class Dashboard { private static readonly LOADER_ALERT: By = By.xpath('//*[@data-testid="loader-alert"]'); private static readonly LOGOUT_BUTTON: By = By.xpath('//button[text()="Logout"]'); private static readonly USER_SETTINGS_DROPDOWN: By = By.xpath('//header//button/span[text()!=""]//parent::button'); + private static readonly INFO_DROPDOWN_BUTTON: By = By.xpath('//button[@aria-label="About Menu"]'); + private static readonly ABOUT_DIALOG_WINDOW_CLOSE_BUTTON: By = By.xpath('//button[@aria-label="Close Dialog"]'); private static readonly EXISTING_WORKSPACE_FOUND_ALERT: By = By.xpath('//h4[text()="Existing workspace found"]'); private static readonly CREATE_NEW_WORKSPACE_LINK: By = By.xpath('//button[text()="Create a new workspace"]'); + private static readonly ABOUT_DIALOG_ITEM_DATA_TEST_IDS: any = { + serverVersion: 'server-version', + dashboardVersion: 'dashboard-version', + browserName: 'browser-name', + browserOs: 'browser-os', + browserVersion: 'browser-version', + username: 'username' + }; constructor( @inject(CLASSES.DriverHelper) - private readonly driverHelper: DriverHelper, + readonly driverHelper: DriverHelper, @inject(CLASSES.Workspaces) private readonly workspaces: Workspaces ) {} @@ -71,6 +81,44 @@ export class Dashboard { await this.waitPage(); } + async openAboutMenu(): Promise { + Logger.debug(); + + await this.driverHelper.waitAndClick(Dashboard.INFO_DROPDOWN_BUTTON); + } + + async selectAboutMenuItem(text: string): Promise { + Logger.debug(); + + await this.driverHelper.waitAndClick(this.getAboutMenuItemButtonLocator(text)); + } + + async waitAboutDialogWindowMenuElements(timeout: number = TIMEOUT_CONSTANTS.TS_COMMON_DASHBOARD_WAIT_TIMEOUT): Promise { + Logger.debug(); + + for (const testId of Object.values(Dashboard.ABOUT_DIALOG_ITEM_DATA_TEST_IDS)) { + const workspaceDetailsTabLocator: By = this.getAboutDialogWindowItemLocator(testId); + + await this.driverHelper.waitVisibility(workspaceDetailsTabLocator, timeout); + } + } + + async getApplicationVersionFromAboutDialogWindow(): Promise { + Logger.debug(); + + return await this.driverHelper.waitAndGetText( + this.getAboutDialogWindowItemLocator(Dashboard.ABOUT_DIALOG_ITEM_DATA_TEST_IDS.serverVersion) + ); + } + + async getUsernameFromAboutDialogWindow(): Promise { + Logger.debug(); + + return await this.driverHelper.waitAndGetText( + this.getAboutDialogWindowItemLocator(Dashboard.ABOUT_DIALOG_ITEM_DATA_TEST_IDS.username) + ); + } + async waitPage(timeout: number = TIMEOUT_CONSTANTS.TS_SELENIUM_LOAD_PAGE_TIMEOUT): Promise { Logger.debug(); @@ -109,6 +157,12 @@ export class Dashboard { await this.driverHelper.wait(TIMEOUT_CONSTANTS.TS_SELENIUM_DEFAULT_POLLING); } + async closeAboutDialogWindow(): Promise { + Logger.debug(); + + await this.driverHelper.waitAndClick(Dashboard.ABOUT_DIALOG_WINDOW_CLOSE_BUTTON); + } + async waitExistingWorkspaceFoundAlert(timeout: number = TIMEOUT_CONSTANTS.TS_COMMON_DASHBOARD_WAIT_TIMEOUT): Promise { Logger.debug(); @@ -129,4 +183,12 @@ export class Dashboard { await this.driverHelper.waitAndClick(Dashboard.LOGOUT_BUTTON, timeout); await this.driverHelper.waitDisappearance(Dashboard.USER_SETTINGS_DROPDOWN, timeout); } + + private getAboutMenuItemButtonLocator(text: string): By { + return By.xpath(`//li/button[text()="${text}"]`); + } + + private getAboutDialogWindowItemLocator(itemDataTestId: string): By { + return By.xpath(`//dd[@data-testid="${itemDataTestId}"]`); + } } diff --git a/tests/e2e/pageobjects/dashboard/Workspaces.ts b/tests/e2e/pageobjects/dashboard/Workspaces.ts index 6e35986f430..08e6d899d71 100644 --- a/tests/e2e/pageobjects/dashboard/Workspaces.ts +++ b/tests/e2e/pageobjects/dashboard/Workspaces.ts @@ -29,6 +29,7 @@ export class Workspaces { ); private static readonly DELETE_CONFIRMATION_CHECKBOX: By = By.xpath('//input[@data-testid="confirmation-checkbox"]'); private static readonly CONFIRMATION_WINDOW: By = By.xpath('//div[@aria-label="Delete workspaces confirmation window"]'); + private static readonly LEARN_MORE_DOC_LINK: By = By.xpath('//div/p/a'); constructor( @inject(CLASSES.DriverHelper) @@ -80,13 +81,13 @@ export class Workspaces { await this.driverHelper.waitVisibility(this.getWorkspaceStatusLocator(workspaceName, WorkspaceStatusUI.Stopped), timeout); } - async clickWorkspaceListItem( + async clickWorkspaceListItemLink( workspaceName: string, timeout: number = TIMEOUT_CONSTANTS.TS_CLICK_DASHBOARD_ITEM_TIMEOUT ): Promise { Logger.debug(`"${workspaceName}"`); - await this.driverHelper.waitAndClick(this.getWorkspaceListItemLocator(workspaceName), timeout); + await this.driverHelper.waitAndClick(this.getOpenWorkspaceDetailsLinkLocator(workspaceName), timeout); } async clickActionsButton(workspaceName: string): Promise { @@ -206,6 +207,12 @@ export class Workspaces { return workspaceNames; } + async getLearnMoreDocumentationLink(): Promise { + Logger.debug(); + + return await this.driverHelper.waitAndGetElementAttribute(Workspaces.LEARN_MORE_DOC_LINK, 'href'); + } + private getWorkspaceListItemLocator(workspaceName: string): By { return By.xpath(`//tr[td//a[text()='${workspaceName}']]`); } @@ -235,4 +242,8 @@ export class Workspaces { private getOpenButtonLocator(workspaceName: string): By { return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName).value}//td[@data-key=5]//a[text()='Open']`); } + + private getOpenWorkspaceDetailsLinkLocator(workspaceName: string): By { + return By.xpath(`${this.getWorkspaceListItemLocator(workspaceName).value}//a[text()='${workspaceName}']`); + } } diff --git a/tests/e2e/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts b/tests/e2e/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts index 3d6ca24b0ec..1f4be079162 100644 --- a/tests/e2e/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts +++ b/tests/e2e/pageobjects/dashboard/workspace-details/WorkspaceDetails.ts @@ -25,6 +25,10 @@ export class WorkspaceDetails { private static readonly SAVE_BUTTON: By = By.css('button[name="save-button"]'); private static readonly ENABLED_SAVE_BUTTON: By = By.css('button[name="save-button"][aria-disabled="false"]'); private static readonly WORKSPACE_DETAILS_LOADER: By = By.css('workspace-details-overview md-progress-linear'); + private static readonly STORAGE_TYPE_INFO_BUTTON: By = By.xpath('//label[@for="storage-type"]//following-sibling::button'); + private static readonly CLOSE_STORAGE_TYPE_INFO_BUTTON: By = By.xpath('//button[@aria-label="Close"]'); + private static readonly STORAGE_TYPE_DOC_LINK: By = By.xpath('//div/p/a'); + private static readonly DEVFILE_DOC_LINK: By = By.xpath('//a[text()="Devfile Documentation"]'); constructor( @inject(CLASSES.DriverHelper) @@ -101,20 +105,9 @@ export class WorkspaceDetails { } async waitTabsPresence(timeout: number = TIMEOUT_CONSTANTS.TS_COMMON_DASHBOARD_WAIT_TIMEOUT): Promise { - Logger.debug('WorkspaceDetails.waitTabsPresence'); - - const workspaceDetailsTabs: Array = [ - 'Overview', - 'Projects', - 'Containers', - 'Servers', - 'Env Variables', - 'Volumes', - 'Config', - 'SSH', - 'Plugins', - 'Editors' - ]; + Logger.debug(); + + const workspaceDetailsTabs: Array = ['Overview', 'Devfile', 'DevWorkspace', 'Logs', 'Events']; for (const tabTitle of workspaceDetailsTabs) { const workspaceDetailsTabLocator: By = this.getTabLocator(tabTitle); @@ -124,22 +117,39 @@ export class WorkspaceDetails { } async selectTab(tabTitle: string, timeout: number = TIMEOUT_CONSTANTS.TS_COMMON_DASHBOARD_WAIT_TIMEOUT): Promise { - Logger.debug(`WorkspaceDetails.selectTab ${tabTitle}`); + Logger.debug(`${tabTitle}`); await this.clickOnTab(tabTitle, timeout); - await this.waitTabSelected(tabTitle, timeout); } - private getWorkspaceTitleLocator(workspaceName: string): By { - return By.css(`che-row-toolbar[che-title='${workspaceName}']`); + async clickStorageTypeInfo(): Promise { + Logger.debug(); + + await this.driverHelper.waitAndClick(WorkspaceDetails.STORAGE_TYPE_INFO_BUTTON); } - private getTabLocator(tabTitle: string): By { - return By.xpath(`//md-tabs-canvas//md-tab-item//span[text()='${tabTitle}']`); + async getOpenStorageTypeDocumentationLink(): Promise { + Logger.debug(); + + return await this.driverHelper.waitAndGetElementAttribute(WorkspaceDetails.STORAGE_TYPE_DOC_LINK, 'href'); + } + + async closeStorageTypeInfo(): Promise { + Logger.debug(); + + await this.driverHelper.waitAndClick(WorkspaceDetails.CLOSE_STORAGE_TYPE_INFO_BUTTON); + } + + async getDevfileDocumentationLink(): Promise { + return await this.driverHelper.waitAndGetElementAttribute(WorkspaceDetails.DEVFILE_DOC_LINK, 'href'); + } + + private getWorkspaceTitleLocator(workspaceName: string): By { + return By.xpath(`//h1[text()='${workspaceName}']`); } - private getSelectedTabLocator(tabTitle: string): By { - return By.xpath(`//md-tabs-canvas[@role='tablist']//md-tab-item[@aria-selected='true']//span[text()='${tabTitle}']`); + private getTabLocator(tabTitle: string): By { + return By.xpath(`//button[contains(@id,'${tabTitle}')]`); } private async waitSaveButton(timeout: number = TIMEOUT_CONSTANTS.TS_COMMON_DASHBOARD_WAIT_TIMEOUT): Promise { @@ -165,9 +175,4 @@ export class WorkspaceDetails { const workspaceDetailsTabLocator: By = this.getTabLocator(tabTitle); await this.driverHelper.waitAndClick(workspaceDetailsTabLocator, timeout); } - - private async waitTabSelected(tabTitle: string, timeout: number = TIMEOUT_CONSTANTS.TS_COMMON_DASHBOARD_WAIT_TIMEOUT): Promise { - const selectedTabLocator: By = this.getSelectedTabLocator(tabTitle); - await this.driverHelper.waitVisibility(selectedTabLocator, timeout); - } } diff --git a/tests/e2e/pageobjects/login/openshift/RegularUserOcpCheLoginPage.ts b/tests/e2e/pageobjects/login/openshift/RegularUserOcpCheLoginPage.ts index 6761a194d7a..073a3bba357 100644 --- a/tests/e2e/pageobjects/login/openshift/RegularUserOcpCheLoginPage.ts +++ b/tests/e2e/pageobjects/login/openshift/RegularUserOcpCheLoginPage.ts @@ -30,10 +30,6 @@ export class RegularUserOcpCheLoginPage implements ICheLoginPage { private readonly driverHelper: DriverHelper ) {} - /** - * @param userName - * @param password - */ async login( userName: string = OAUTH_CONSTANTS.TS_SELENIUM_OCP_USERNAME, password: string = OAUTH_CONSTANTS.TS_SELENIUM_OCP_PASSWORD diff --git a/tests/e2e/resources/default-devfile.yaml b/tests/e2e/resources/default-devfile.yaml new file mode 100644 index 00000000000..727720d64df --- /dev/null +++ b/tests/e2e/resources/default-devfile.yaml @@ -0,0 +1,27 @@ +kind: DevWorkspace +apiVersion: workspace.devfile.io/v1alpha2 +metadata: + name: default +spec: + started: true + template: + projects: + - name: web-nodejs-sample + git: + remotes: + origin: "https://github.com/che-samples/web-nodejs-sample.git" + commands: + - id: say-hello + exec: + component: che-code-runtime-description + commandLine: echo "Hello from $(pwd)" + workingDir: ${PROJECT_SOURCE}/app + contributions: + - name: che-code + uri: https://eclipse-che.github.io/che-plugin-registry/main/v3/plugins/che-incubator/che-code/latest/devfile.yaml + components: + - name: che-code-runtime-description + container: + env: + - name: CODE_HOST + value: 0.0.0.0 diff --git a/tests/e2e/specs/dashboard-samples/Documentation.spec.ts b/tests/e2e/specs/dashboard-samples/Documentation.spec.ts new file mode 100644 index 00000000000..ee292976ae1 --- /dev/null +++ b/tests/e2e/specs/dashboard-samples/Documentation.spec.ts @@ -0,0 +1,134 @@ +/** ******************************************************************* + * copyright (c) 2023 Red Hat, Inc. + * + * This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 + * which is available at https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + **********************************************************************/ +import { KubernetesCommandLineToolsExecutor } from '../../utils/KubernetesCommandLineToolsExecutor'; +import fs from 'fs'; +import path from 'path'; +import YAML from 'yaml'; +import { expect } from 'chai'; +import { e2eContainer } from '../../configs/inversify.config'; +import { CLASSES } from '../../configs/inversify.types'; +import { LoginTests } from '../../tests-library/LoginTests'; +import { Dashboard } from '../../pageobjects/dashboard/Dashboard'; +import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil'; +import { Workspaces } from '../../pageobjects/dashboard/Workspaces'; +import { ShellExecutor } from '../../utils/ShellExecutor'; +import { WorkspaceDetails } from '../../pageobjects/dashboard/workspace-details/WorkspaceDetails'; +import axios from 'axios'; +import { BASE_TEST_CONSTANTS } from '../../constants/BASE_TEST_CONSTANTS'; +import { OAUTH_CONSTANTS } from '../../constants/OAUTH_CONSTANTS'; + +// suit works for DevSpaces +suite('Check links to documentation page in Dashboard.', function (): void { + const pathToSampleFile: string = path.resolve('resources/default-devfile.yaml'); + const workspaceName: string = YAML.parse(fs.readFileSync(pathToSampleFile, 'utf8')).metadata.name; + const kubernetesCommandLineToolsExecutor: KubernetesCommandLineToolsExecutor = e2eContainer.get( + CLASSES.KubernetesCommandLineToolsExecutor + ); + kubernetesCommandLineToolsExecutor.workspaceName = workspaceName; + const loginTests: LoginTests = e2eContainer.get(CLASSES.LoginTests); + const dashboard: Dashboard = e2eContainer.get(CLASSES.Dashboard); + const workspaces: Workspaces = e2eContainer.get(CLASSES.Workspaces); + const workspaceDetails: WorkspaceDetails = e2eContainer.get(CLASSES.WorkspaceDetails); + const shellExecutor: ShellExecutor = e2eContainer.get(CLASSES.ShellExecutor); + const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUtil); + + const testingVersion: string = BASE_TEST_CONSTANTS.TESTING_APPLICATION_VERSION; + let parentGUID: string = ''; + + // get links from product version github branch + const { docs, links, productVersion }: any = 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` + ) + ); + const { webSocketTroubleshooting, workspace, devfile, general, storageTypes } = docs; + + suiteSetup('Login into OC client and apply default DevFile', function (): void { + kubernetesCommandLineToolsExecutor.loginToOcp(); + kubernetesCommandLineToolsExecutor.applyYamlConfigurationAsFile(pathToSampleFile); + shellExecutor.wait(5); + }); + + suiteTeardown('Delete default DevWorkspace', function (): void { + kubernetesCommandLineToolsExecutor.deleteDevWorkspace(); + }); + + test('Check if product.json config contains correct application version', function (): void { + [productVersion, links[1].href, devfile, workspace, general, storageTypes, webSocketTroubleshooting].forEach((e): void => { + expect(e).contains(testingVersion); + }); + }); + + loginTests.loginIntoChe(); + + test('Check if documentation section "About" present on Dashboard', async function (): Promise { + await dashboard.openAboutMenu(); + }); + + test('Check if documentation section "About" in top menu has required links', async function (): Promise { + parentGUID = await browserTabsUtil.getCurrentWindowHandle(); + for (const link of links) { + await dashboard.selectAboutMenuItem(link.text); + await browserTabsUtil.waitAndSwitchToAnotherWindow(parentGUID); + const currentUrl: string = await browserTabsUtil.getCurrentUrl(); + expect(link.href).oneOf([currentUrl, currentUrl + '/']); + await browserTabsUtil.switchToWindow(parentGUID); + await browserTabsUtil.closeAllTabsExceptCurrent(); + } + }); + + test('Check if "About" dialog menu contains correct application version and username', async function (): Promise { + await dashboard.selectAboutMenuItem('About'); + await dashboard.waitAboutDialogWindowMenuElements(); + expect(await dashboard.getApplicationVersionFromAboutDialogWindow()).eqls(productVersion); + expect(await dashboard.getUsernameFromAboutDialogWindow()).eqls(OAUTH_CONSTANTS.TS_SELENIUM_OCP_USERNAME); + await dashboard.closeAboutDialogWindow(); + }); + + test('Check if Workspaces page contains "Learn More" documentation link', async function (): Promise { + await dashboard.clickWorkspacesButton(); + await workspaces.waitPage(); + expect(await workspaces.getLearnMoreDocumentationLink()).eqls(workspace); + }); + + test('Check if Workspace Details page contains "Storage types" documentation link', async function (): Promise { + await workspaces.clickWorkspaceListItemLink(workspaceName); + await workspaceDetails.waitWorkspaceTitle(workspaceName); + await workspaceDetails.clickStorageTypeInfo(); + expect(await workspaceDetails.getOpenStorageTypeDocumentationLink()).eqls(storageTypes); + }); + + test('Check if Workspace Details page contains "Devfile" documentation link', async function (): Promise { + await workspaceDetails.closeStorageTypeInfo(); + await workspaceDetails.selectTab('Devfile'); + expect(await workspaceDetails.getDevfileDocumentationLink()).eqls(devfile); + }); + + if (BASE_TEST_CONSTANTS.IS_PRODUCT_DOCUMENTATION_RELEASED) { + test('Check if product.json documentation links returns status code 200', async function (): Promise { + const documentationLinks: string[] = [devfile, workspace, general, storageTypes, webSocketTroubleshooting]; + links.forEach((link: any): void => { + documentationLinks.push(link.href); + }); + for (const e of documentationLinks) { + let responseData: any; + try { + responseData = await axios.get(e); + } catch (e) { + responseData = e; + } finally { + expect(responseData.status).eqls(200); + } + } + }); + } + + loginTests.loginIntoChe(); +}); diff --git a/tests/e2e/utils/BrowserTabsUtil.ts b/tests/e2e/utils/BrowserTabsUtil.ts index a38c5890232..cce2ee1bd99 100644 --- a/tests/e2e/utils/BrowserTabsUtil.ts +++ b/tests/e2e/utils/BrowserTabsUtil.ts @@ -13,6 +13,7 @@ import { CLASSES } from '../configs/inversify.types'; import { DriverHelper } from './DriverHelper'; import { Logger } from './Logger'; import { CHROME_DRIVER_CONSTANTS } from '../constants/CHROME_DRIVER_CONSTANTS'; +import { TIMEOUT_CONSTANTS } from '../constants/TIMEOUT_CONSTANTS'; @injectable() export class BrowserTabsUtil { @@ -45,7 +46,10 @@ export class BrowserTabsUtil { await this.driverHelper.navigateToUrl(url); } - async waitAndSwitchToAnotherWindow(currentWindowHandle: string, timeout: number): Promise { + async waitAndSwitchToAnotherWindow( + currentWindowHandle: string, + timeout: number = TIMEOUT_CONSTANTS.TS_SELENIUM_WAIT_FOR_URL + ): Promise { Logger.debug(); await this.driverHelper.waitUntilTrue(async (): Promise => { diff --git a/tests/e2e/utils/DriverHelper.ts b/tests/e2e/utils/DriverHelper.ts index 114ed901140..95a1386fefa 100644 --- a/tests/e2e/utils/DriverHelper.ts +++ b/tests/e2e/utils/DriverHelper.ts @@ -215,7 +215,7 @@ export class DriverHelper { ); } - async waitAllVisibility(locators: Array, timeout: number): Promise { + async waitAllVisibility(locators: Array, timeout: number = TIMEOUT_CONSTANTS.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise { Logger.trace(`${locators}`); for (const elementLocator of locators) {