mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ACS-5743] Cleanup Content tests (Demo Shell) (#8799)
* remove unused demo shell api
* remove recent files and cleanup unused api
* cleanup upload dialog page
* [ci:force] dummy commit
* [ci:force] cleanup the toolbar and tooltips
* [ci:force] remove dead code
* [ci:force] remove logger and custom action
* [ci:force] remove custom permission e2e test as already tested by unit
* [ci:force] remove "Start process" from the Content demo as not related to document list
* [ci:force] remove useless divs for selection
* [ci:force] dummy change to trigger CI/CD
* Revert "[ci:force] remove useless divs for selection"
This reverts commit fb3ae0b439
.
* [ci:force] remove e2e for artificial scenario
* [ci:force] cleanup unused navigation bar protractor api
* [ci:force] cleanup unused datatable protractor api
* [ci:force] cleanup unused login protractor api
* [ci:force] fix process cloud demo page selector
This commit is contained in:
@@ -19,7 +19,6 @@ import { $, browser, by, element } from 'protractor';
|
||||
import { TogglePage, BrowserActions, BrowserVisibility, LoginPage } from '@alfresco/adf-testing';
|
||||
|
||||
export class LoginShellPage {
|
||||
|
||||
loginURL = browser.baseUrl + '/login';
|
||||
loginSSOPage = new LoginPage();
|
||||
|
||||
@@ -27,17 +26,12 @@ export class LoginShellPage {
|
||||
txtUsername = $('input[id="username"]');
|
||||
txtPassword = $('input[id="password"]');
|
||||
logoImg = $('img[id="adf-login-img-logo"]');
|
||||
successRouteTxt = $('input[data-automation-id="adf-success-route"]');
|
||||
logoTxt = $('input[data-automation-id="adf-url-logo"]');
|
||||
usernameError = $('span[data-automation-id="username-error"]');
|
||||
passwordError = $('span[data-automation-id="password-required"]');
|
||||
loginError = $('.adf-login-error-message');
|
||||
usernameInactive = $('input[id="username"][class*="ng-invalid"]');
|
||||
passwordInactive = $('input[id="password"][class*="ng-invalid"]');
|
||||
adfLogo = $('.adf-img-logo');
|
||||
|
||||
usernameHighlighted = $('input[id="username"][aria-invalid="true"]');
|
||||
passwordHighlighted = $('input[id="password"][aria-invalid="true"]');
|
||||
signInButton = $('#login-button');
|
||||
showPasswordElement = $('button[data-automation-id="show_password"]');
|
||||
hidePasswordElement = $('button[data-automation-id="hide_password"]');
|
||||
@@ -46,7 +40,6 @@ export class LoginShellPage {
|
||||
register = $('#adf-login-action-right');
|
||||
footerSwitch = $('#switch4');
|
||||
rememberMeSwitch = $('#adf-toggle-show-rememberme');
|
||||
successRouteSwitch = $('#adf-toggle-show-successRoute');
|
||||
logoSwitch = $('#adf-toggle-logo');
|
||||
header = $('#adf-header');
|
||||
settingsIcon = element(by.cssContainingText('a[data-automation-id="settings"] mat-icon', 'settings'));
|
||||
@@ -84,18 +77,6 @@ export class LoginShellPage {
|
||||
return BrowserActions.getText(this.usernameError);
|
||||
}
|
||||
|
||||
async getPasswordTooltip(): Promise<string> {
|
||||
return BrowserActions.getText(this.passwordError);
|
||||
}
|
||||
|
||||
async getLoginError(): Promise<string> {
|
||||
return BrowserActions.getText(this.loginError);
|
||||
}
|
||||
|
||||
async checkLoginErrorIsDisplayed(loginError: string): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementHasText(this.loginError, loginError);
|
||||
}
|
||||
|
||||
async checkLoginImgURL(): Promise<string> {
|
||||
return BrowserActions.getAttribute(this.logoImg, 'src');
|
||||
}
|
||||
@@ -104,29 +85,15 @@ export class LoginShellPage {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.usernameInactive);
|
||||
}
|
||||
|
||||
async checkPasswordInactive(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.passwordInactive);
|
||||
}
|
||||
|
||||
async checkUsernameHighlighted(): Promise<void> {
|
||||
await BrowserActions.click(this.adfLogo);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.usernameHighlighted);
|
||||
}
|
||||
|
||||
async checkPasswordHighlighted(): Promise<void> {
|
||||
await BrowserActions.click(this.adfLogo);
|
||||
await browser.sleep(900000);
|
||||
await BrowserVisibility.waitUntilElementIsVisible(this.passwordHighlighted);
|
||||
}
|
||||
|
||||
async checkUsernameTooltipIsNotVisible(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.usernameError);
|
||||
}
|
||||
|
||||
async checkPasswordTooltipIsNotVisible(): Promise<void> {
|
||||
await BrowserVisibility.waitUntilElementIsNotVisible(this.passwordError);
|
||||
}
|
||||
|
||||
async getSignInButtonIsEnabled(): Promise<boolean> {
|
||||
return this.signInButton.isEnabled();
|
||||
}
|
||||
@@ -191,18 +158,10 @@ export class LoginShellPage {
|
||||
await this.togglePage.disableToggle(this.rememberMeSwitch);
|
||||
}
|
||||
|
||||
async enableSuccessRouteSwitch(): Promise<void> {
|
||||
await this.togglePage.enableToggle(this.successRouteSwitch);
|
||||
}
|
||||
|
||||
async enableLogoSwitch(): Promise<void> {
|
||||
await this.togglePage.enableToggle(this.logoSwitch);
|
||||
}
|
||||
|
||||
async enterSuccessRoute(route: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.successRouteTxt, route);
|
||||
}
|
||||
|
||||
async enterLogo(logo: string): Promise<void> {
|
||||
await BrowserActions.clearSendKeys(this.logoTxt, logo);
|
||||
}
|
||||
|
Reference in New Issue
Block a user