[ADF-5463] Rework Protractor tests - changes related to element/element… (#7284)

* ADF-5463 Rework Protractor tests - changes related to element/elements and duplication of locators

* Fix one which I missed

* Remove console.logs

* Remove console.logs

* Reverse the timeouts

* Fixed things TSLint

* Remove unused import

* Fixed broken tests

* Last test fixed
This commit is contained in:
MichalFidor
2021-10-08 17:28:37 +02:00
committed by GitHub
parent db6a638a2d
commit 1e62b46060
156 changed files with 1653 additions and 1647 deletions

View File

@@ -15,18 +15,18 @@
* limitations under the License.
*/
import { element, by } from 'protractor';
import { $ } from 'protractor';
import { BrowserVisibility, BrowserActions, DropdownPage } from '@alfresco/adf-testing';
export class AttachFormPage {
noFormMessage = element(by.css('.adf-empty-content__title'));
attachFormButton = element(by.id('adf-attach-form-attach-button'));
completeButton = element(by.id('adf-attach-form-complete-button'));
formDropdown = element(by.id('form_id'));
cancelButton = element(by.id('adf-attach-form-cancel-button'));
defaultTitle = element(by.css('.mat-card-title'));
attachFormDropdown = new DropdownPage(element(by.css('.adf-attach-form-row')));
noFormMessage = $('.adf-empty-content__title');
attachFormButton = $('#adf-attach-form-attach-button');
completeButton = $('#adf-attach-form-complete-button');
formDropdown = $('#form_id');
cancelButton = $('#adf-attach-form-cancel-button');
defaultTitle = $('.mat-card-title');
attachFormDropdown = new DropdownPage($('.adf-attach-form-row'));
async checkNoFormMessageIsDisplayed(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(this.noFormMessage);
@@ -70,6 +70,6 @@ export class AttachFormPage {
}
async checkAttachFormButtonIsDisabled(): Promise<void> {
await BrowserVisibility.waitUntilElementIsVisible(element(by.css('button[id="adf-attach-form-attach-button"][disabled]')));
await BrowserVisibility.waitUntilElementIsVisible($('button[id="adf-attach-form-attach-button"][disabled]'));
}
}