[ACS-3640] Reverting reverted changes for a 11 y aca 881740 snackbar messages disappear without option to adjust timing (#2785)

* ACS-3640 Increasing time of autoclosing snackbar and adding X icon to close snackbar

* ACS-3640 Fix lint issues

* ACS-3640 Addressing PR comments

* ACS-3640 Fix lint issue

* ACS-3640 Added aria label for action icon

* ACS-3640 Fixed one left file

* ACS-3640 Fixed lint issues

* ACS-3640 Correction for e2e

* ACS-3640 Reverting reverted corrections for e2e

* ACS-3640 Use data automation id

* ACS-3640 Update ADF version
This commit is contained in:
AleksanderSklorz
2022-11-21 10:48:22 +01:00
committed by GitHub
parent 26b2b23a42
commit ae551f03fc
11 changed files with 27265 additions and 210 deletions

View File

@@ -23,7 +23,7 @@
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
*/
import { browser, by, ElementFinder } from 'protractor';
import { browser, by, ElementFinder, WebElement } from 'protractor';
import { BrowserVisibility, Logger } from '@alfresco/adf-testing';
import { APP_ROUTES, USE_HASH_STRATEGY } from './../configs';
import { Utils, waitElement, waitForPresence, isPresentAndDisplayed } from '../utilities/utils';
@@ -35,10 +35,10 @@ export abstract class Page {
layout = this.byCss('app-layout');
overlay = this.byCss('.cdk-overlay-container');
snackBar = this.byCss('.mat-simple-snackbar-action button');
snackBar = this.byCss(`[data-automation-id='adf-snackbar-message-content-action-button']`);
dialogContainer = this.byCss('.mat-dialog-container');
snackBarContainer = this.byCss('.mat-snack-bar-container');
snackBarAction = this.byCss('.mat-simple-snackbar-action button');
snackBarAction = this.byCss(`[data-automation-id='adf-snackbar-message-content-action-button']`);
genericError = this.byCss('aca-generic-error');
genericErrorIcon = this.byCss('aca-generic-error .mat-icon');
genericErrorTitle = this.byCss('.generic-error__title');
@@ -88,14 +88,25 @@ export abstract class Page {
}
async getSnackBarMessage(): Promise<string> {
const elem = await waitElement('.mat-snack-bar-container');
const elem = await waitElement(`[data-automation-id='adf-snackbar-message-content']`);
const attributeValue: string = await browser.executeScript(`return arguments[0].innerText`, elem);
return attributeValue || '';
}
async getSnackBarAction(): Promise<string> {
let elem: WebElement;
try {
elem = await waitElement(`[data-automation-id='adf-snackbar-message-content-action-button']`);
} catch (e) {
return '';
}
const attributeValue: string = await browser.executeScript(`return arguments[0].innerText`, elem);
return attributeValue || '';
}
async clickSnackBarAction(): Promise<void> {
try {
const action = await waitElement('.mat-simple-snackbar-action button');
const action = await waitElement(`[data-automation-id='adf-snackbar-message-content-action-button']`);
await action.click();
} catch (e) {
Logger.error(e, '.......failed on click snack bar action.........');