disable w3c due getValue problem (#7067)

* [ci:force]disable w3c due getValue problem

* unify get Input value

* [ci:force]fix

* [ci:force] remove

* [ci:force]remove all getAttribute

* fix lint

* fix lint

* fix

* fix

* fix

* fix

* different fix try

* rewrite wait for for value

* fix lint

* remove e2e already covered by unit

* fix lint

* fix
This commit is contained in:
Eugenio Romano
2021-05-28 18:08:49 +01:00
committed by GitHub
parent 200cfb8dba
commit 9e0000a307
54 changed files with 34465 additions and 932 deletions
@@ -16,7 +16,14 @@
*/
import { FileModel } from '../../models/ACS/file.model';
import { ApiService, LoginPage, StringUtil, UploadActions, UserModel, UsersActions } from '@alfresco/adf-testing';
import {
ApiService,
LoginPage,
StringUtil,
UploadActions,
UserModel,
UsersActions
} from '@alfresco/adf-testing';
import { TagPage } from '../../content-services/pages/tag.page';
import { NavigationBarPage } from '../../core/pages/navigation-bar.page';
import { browser } from 'protractor';
@@ -78,18 +85,6 @@ describe('Tag component', () => {
await uploadActions.deleteFileOrFolder(pdfUploadedFile.entry.id);
});
it('[C260374] Should NOT be possible to add a new tag without Node ID', async () => {
await expect(await tagPage.getNodeId()).toEqual('');
await expect(await tagPage.newTagInput.getAttribute('data-placeholder')).toEqual('New Tag');
await expect(await tagPage.addTagButtonIsEnabled()).toEqual(false);
await tagPage.tagListRow.waitNotVisible();
await tagPage.tagListByNodeIdRow.waitNotVisible();
await tagPage.newTagInput.typeText('a');
await expect(await tagPage.addTagButtonIsEnabled()).toEqual(false);
await expect(await tagPage.newTagInput.getAttribute('value')).toEqual('a');
});
it('[C268151] Should be possible to add a new tag to a Node', async () => {
await tagPage.insertNodeId(pdfFileModel.id);
await tagPage.addTag(tagList[0]);
@@ -77,7 +77,7 @@ describe('Create folder directive', () => {
const folderName = 'NotEnableFolder';
await contentServicesPage.clickOnCreateNewFolder();
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await createFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await createFolderDialog.addFolderName(folderName);
@@ -129,20 +129,20 @@ describe('Create folder directive', () => {
await contentServicesPage.clickOnCreateNewFolder();
await createFolderDialog.addFolderName('*');
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await createFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await createFolderDialog.addFolderName('<');
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await createFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await createFolderDialog.addFolderName('>');
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await createFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await createFolderDialog.addFolderName('\\');
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await createFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await createFolderDialog.addFolderName('/');
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await createFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await createFolderDialog.addFolderName('?');
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await createFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await createFolderDialog.addFolderName(':');
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await createFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await createFolderDialog.addFolderName('|');
await createFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await createFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
});
});
@@ -170,7 +170,7 @@ describe('Delete Directive', () => {
await contentServicesPage.chooseSelectionMode('None');
await contentListPage.selectRow(txtFileModel.name);
await contentListPage.dataTable.checkRowIsNotSelected('Display name', txtFileModel.name);
await contentServicesPage.checkToolbarDeleteIsDisabled();
await expect(await contentServicesPage.checkToolbarDeleteIsDisabled()).toEqual(true);
await contentServicesPage.chooseSelectionMode('Single');
await contentListPage.selectRow(txtFileModel.name);
@@ -278,16 +278,16 @@ describe('Delete Directive', () => {
it('[C216426] Delete file without delete permissions', async () => {
await contentListPage.selectRowWithKeyboard(filePdf.entry.name);
await contentListPage.dataTable.checkRowIsSelected('Display name', filePdf.entry.name);
await contentServicesPage.checkToolbarDeleteIsDisabled();
await expect(await contentServicesPage.checkToolbarDeleteIsDisabled()).toEqual(true);
await contentListPage.selectRowWithKeyboard(folderB.entry.name);
await contentListPage.dataTable.checkRowIsSelected('Display name', folderB.entry.name);
await contentServicesPage.checkToolbarDeleteIsDisabled();
await expect(await contentServicesPage.checkToolbarDeleteIsDisabled()).toEqual(true);
await contentListPage.selectRowWithKeyboard(folderA.entry.name);
await contentListPage.dataTable.checkRowIsSelected('Display name', folderA.entry.name);
await contentServicesPage.checkToolbarDeleteIsDisabled();
await expect(await contentServicesPage.checkToolbarDeleteIsDisabled()).toEqual(true);
await contentListPage.selectRowWithKeyboard(fileTxt.entry.name);
await contentListPage.dataTable.checkRowIsSelected('Display name', fileTxt.entry.name);
await contentServicesPage.checkToolbarDeleteIsDisabled();
await expect(await contentServicesPage.checkToolbarDeleteIsDisabled()).toEqual(true);
});
});
});
@@ -154,7 +154,7 @@ describe('Edit folder directive', () => {
await editFolderDialog.addFolderName('a*"<>\\/?:|');
await expect(await editFolderDialog.getValidationMessage()).toBe('Folder name can\'t contain these characters * " < > \\ / ? : |');
await editFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await editFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await editFolderDialog.addFolderName('a.a');
await editFolderDialog.checkValidationMessageIsNotDisplayed();
@@ -162,11 +162,11 @@ describe('Edit folder directive', () => {
await editFolderDialog.addFolderName('a.');
await expect(await editFolderDialog.getValidationMessage()).toBe('Folder name can\'t end with a period .');
await editFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await editFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await BrowserActions.clearSendKeys(editFolderDialog.getFolderNameField(), protractor.Key.SPACE);
await expect(await editFolderDialog.getValidationMessage()).toBe('Folder name can\'t contain only spaces');
await editFolderDialog.checkCreateUpdateBtnIsDisabled();
await expect(await editFolderDialog.checkCreateUpdateBtnIsEnabled()).toEqual(false);
await editFolderDialog.addFolderName(editFolder.entry.name);
await editFolderDialog.addFolderDescription('a*"<>\\/?:|');
@@ -87,8 +87,7 @@ export class PermissionsPage {
async isInherited(): Promise<boolean> {
const inheritButton = TestElement.byCss(this.inheritedButton);
await inheritButton.waitVisible();
const appliedStyles = await inheritButton.getAttribute('class');
return appliedStyles.indexOf('mat-checked') !== -1;
return (await inheritButton.getAttribute('class')).indexOf('mat-checked') !== -1;
}
async toggleInheritPermission(): Promise<void> {
+2 -3
View File
@@ -16,15 +16,14 @@
*/
import { by, element } from 'protractor';
import { BrowserActions, BrowserVisibility } from '@alfresco/adf-testing';
import { BrowserActions } from '@alfresco/adf-testing';
export class SocialPage {
nodeIdField = element(by.css(`input[id="nodeId"]`));
async getNodeIdFieldValue(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.nodeIdField);
return this.nodeIdField.getAttribute('value');
return BrowserActions.getInputValue(this.nodeIdField);
}
async writeCustomNodeId(nodeId: string): Promise<void> {
+1 -1
View File
@@ -34,7 +34,7 @@ export class TagPage {
confirmTag = TestElement.byCss('#adf-tag-node-send');
getNodeId(): Promise<string> {
return new TestElement(this.insertNodeIdElement).getAttribute('value');
return BrowserActions.getInputValue(this.insertNodeIdElement);
}
async insertNodeId(nodeId) {
+1 -2
View File
@@ -30,8 +30,7 @@ export class TreeViewPage {
}
async getNodeId(): Promise<string> {
await BrowserVisibility.waitUntilElementIsVisible(this.nodeIdInput);
return this.nodeIdInput.getAttribute('value');
return BrowserActions.getInputValue(this.nodeIdInput);
}
async clickNode(nodeName: string): Promise<void> {