mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
[ACA] fix e2e tests failing on slow environments (#801)
* fix tests failing on slow environments * forgot a change
This commit is contained in:
committed by
Denys Vuika
parent
49e80ddce1
commit
2ac59bd278
@@ -57,7 +57,7 @@ export class CreateOrEditFolderDialog extends Component {
|
||||
}
|
||||
|
||||
async waitForDialogToClose() {
|
||||
await browser.wait(EC.stalenessOf(this.title), BROWSER_WAIT_TIMEOUT);
|
||||
await browser.wait(EC.stalenessOf(this.title), BROWSER_WAIT_TIMEOUT, '---- timeout waiting for dialog to close ----');
|
||||
}
|
||||
|
||||
async isDialogOpen() {
|
||||
|
@@ -38,7 +38,7 @@ export class SearchInput extends Component {
|
||||
optionCheckbox: '.mat-checkbox'
|
||||
};
|
||||
|
||||
searchButton: ElementFinder = browser.element(by.css(SearchInput.selectors.searchButton));
|
||||
searchButton: ElementFinder = this.component.element(by.css(SearchInput.selectors.searchButton));
|
||||
searchContainer: ElementFinder = browser.element(by.css(SearchInput.selectors.searchContainer));
|
||||
searchBar: ElementFinder = browser.element(by.id(SearchInput.selectors.searchInput));
|
||||
searchOptionsArea: ElementFinder = browser.element(by.id(SearchInput.selectors.searchOptionsArea));
|
||||
@@ -54,8 +54,8 @@ export class SearchInput extends Component {
|
||||
return (await this.searchContainer.isDisplayed()) && (await this.searchButton.isDisplayed());
|
||||
}
|
||||
|
||||
async clickSearchContainer() {
|
||||
return await this.searchContainer.click();
|
||||
async clickSearchButton() {
|
||||
await this.searchButton.click();
|
||||
}
|
||||
|
||||
async isOptionsAreaDisplayed() {
|
||||
@@ -105,8 +105,6 @@ export class SearchInput extends Component {
|
||||
return optClass.includes('mat-checkbox-checked');
|
||||
}
|
||||
|
||||
|
||||
|
||||
async searchForText(text: string) {
|
||||
await this.searchBar.clear();
|
||||
await this.searchBar.sendKeys(text);
|
||||
|
@@ -65,6 +65,12 @@ describe('General', () => {
|
||||
expect(message).toEqual('The action was unsuccessful. Try again or contact your IT Team.');
|
||||
|
||||
expect(await browser.getTitle()).toContain('Sign in');
|
||||
|
||||
try {
|
||||
await createDialog.waitForDialogToClose();
|
||||
} catch (error) {
|
||||
console.log('err: ', error);
|
||||
}
|
||||
expect(await createDialog.isDialogOpen()).not.toBe(true, 'dialog is present');
|
||||
});
|
||||
});
|
||||
|
@@ -125,7 +125,7 @@ describe('Page titles', () => {
|
||||
});
|
||||
|
||||
it('Search Results page - [C280413]', async () => {
|
||||
await searchInput.clickSearchContainer();
|
||||
await searchInput.clickSearchButton();
|
||||
await searchInput.searchForText(file);
|
||||
expect(await browser.getTitle()).toContain(PAGE_TITLES.SEARCH);
|
||||
});
|
||||
|
@@ -48,7 +48,7 @@ describe('Search input', () => {
|
||||
});
|
||||
|
||||
it('Search options are displayed when clicking in the search input - [C289848]', async () => {
|
||||
await searchInput.clickSearchContainer();
|
||||
await searchInput.clickSearchButton();
|
||||
expect(await searchInput.isOptionsAreaDisplayed()).toBe(true, '1. Search options not displayed');
|
||||
expect(await searchInput.isFilesOptionEnabled()).toBe(true, '2. Files option not enabled');
|
||||
expect(await searchInput.isFoldersOptionEnabled()).toBe(true, '3. Folders option not enabled');
|
||||
@@ -59,7 +59,7 @@ describe('Search input', () => {
|
||||
});
|
||||
|
||||
it('Search options are correctly enabled / disabled - [C289849]', async () => {
|
||||
await searchInput.clickSearchContainer();
|
||||
await searchInput.clickSearchButton();
|
||||
|
||||
await searchInput.clickFilesOption();
|
||||
expect(await searchInput.isFoldersOptionEnabled()).toBe(true, 'Folders option not enabled');
|
||||
|
Reference in New Issue
Block a user