mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
ESLint: cleanup await expect
from protractor tests (#9630)
This commit is contained in:
@@ -15,7 +15,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { createApiService,
|
||||
import {
|
||||
createApiService,
|
||||
ArrayUtil,
|
||||
LoginPage,
|
||||
PaginationPage,
|
||||
@@ -104,24 +105,24 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
await contentServicesPage.checkDocumentListElementsAreDisplayed();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
let list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(5, 6))).toEqual(true);
|
||||
expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(5, 6))).toEqual(true);
|
||||
await contentServicesPage.deleteContent(lastFile);
|
||||
await contentServicesPage.checkContentIsNotDisplayed(lastFile);
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
|
||||
list = await contentServicesPage.getAllRowsNameColumn();
|
||||
await expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
expect(ArrayUtil.arrayContainsArray(list, fileNames.slice(0, 5))).toEqual(true);
|
||||
});
|
||||
|
||||
it('[C297494] Should display content when navigating to a non-empty folder not in the first page', async () => {
|
||||
@@ -132,8 +133,8 @@ describe('Pagination - returns to previous page when current is empty', () => {
|
||||
await contentServicesPage.checkDocumentListElementsAreDisplayed();
|
||||
await contentServicesPage.contentList.dataTablePage().waitTillContentLoaded();
|
||||
|
||||
await expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
await expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
expect(await paginationPage.getCurrentItemsPerPage()).toEqual(itemsPerPage.five);
|
||||
expect(await contentServicesPage.numberOfResultsDisplayed()).toBe(itemsPerPage.fiveValue);
|
||||
|
||||
await paginationPage.clickOnNextPage();
|
||||
await contentServicesPage.checkDocumentListElementsAreDisplayed();
|
||||
|
Reference in New Issue
Block a user