[ACA-1653] add testrail ids to e2e tests (#557)

* add testrail ids - WIP

* add TestRail ids to tooltips tests

* added more TestRail ids

* separate tests from Create folder to correct sub-suites

* add more TestRail ids to automated tests

* added more TestRail ids

* added more ids and some missing tests

* combined delete and undo delete tests and added TestRail ids

* decrease protractor timeouts to try and speed up the execution when tests fail

* disable some tests that are incomplete in order to match numbers from TestRail
This commit is contained in:
Adina Parpalita
2018-08-09 12:03:57 +01:00
committed by Denys Vuika
parent f91608fe78
commit b8cc5422f4
29 changed files with 953 additions and 1072 deletions
+30 -20
View File
@@ -66,7 +66,7 @@ describe('Pagination on Favorites', () => {
logoutPage.load().then(done);
});
it('pagination controls not displayed [C213164]', () => {
it('pagination controls not displayed - [C280111]', () => {
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES)
.then(() => {
expect(pagination.range.isPresent()).toBe(false);
@@ -95,7 +95,7 @@ describe('Pagination on Favorites', () => {
.then(done);
});
it('page selector not displayed when having a single page [C213165]', () => {
it('page selector not displayed when having a single page - [C280112]', () => {
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.FAVORITES)
.then(() => dataTable.waitForHeader())
.then(() => expect(pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed'));
@@ -130,7 +130,7 @@ describe('Pagination on Favorites', () => {
.then(done);
});
it('default values [C213157]', () => {
it('Pagination control default values - [C280113]', () => {
expect(pagination.range.getText()).toContain('1-25 of 101');
expect(pagination.maxItems.getText()).toContain('25');
expect(pagination.currentPage.getText()).toContain('Page 1');
@@ -139,7 +139,7 @@ describe('Pagination on Favorites', () => {
expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
});
it('page sizes [C213157]', () => {
it('Items per page values - [C280114]', () => {
pagination.openMaxItemsMenu()
.then(() => {
const [ first, second, third ] = [1, 2, 3]
@@ -148,32 +148,44 @@ describe('Pagination on Favorites', () => {
expect(second).toBe('50');
expect(third).toBe('100');
})
.then(() => pagination.menu.closeMenu());
.then(() => pagination.menu.closeMenu());
});
it('change the page size [C213158]', () => {
it('current page menu items - [C280115]', () => {
pagination.openMaxItemsMenu()
.then(() => pagination.menu.clickMenuItem('25'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('25');
expect(pagination.getText(pagination.totalPages)).toContain('of 5');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(5))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.openMaxItemsMenu())
.then(() => pagination.menu.clickMenuItem('50'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('50');
expect(pagination.getText(pagination.totalPages)).toContain('of 3');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(3))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.openMaxItemsMenu())
.then(() => pagination.menu.clickMenuItem('100'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('100');
expect(pagination.getText(pagination.totalPages)).toContain('of 2');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(2))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.resetToDefaultPageSize());
});
it('current page menu items', () => {
pagination.openCurrentPageMenu()
.then(() => expect(pagination.menu.getItemsCount()).toBe(5))
.then(() => pagination.menu.closeMenu());
});
it('change the current page from menu [C260518]', () => {
it('change the current page from menu - [C280116]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.menu.clickNthItem(3))
.then(() => {
@@ -186,18 +198,16 @@ describe('Pagination on Favorites', () => {
.then(() => pagination.resetToDefaultPageNumber());
});
it('navigate to next page [C213160]', () => {
it('navigate to next and previous pages - [C280119]', () => {
pagination.nextButton.click()
.then(() => dataTable.waitForHeader())
.then(() => {
expect(pagination.range.getText()).toContain('26-50 of 101');
expect(dataTable.getRowByName('file-70.txt').isPresent()).toBe(true, 'File not found on page');
})
.then(() => pagination.resetToDefaultPageNumber());
});
.then(() => pagination.resetToDefaultPageNumber())
it('navigate to previous page [C213160]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.openCurrentPageMenu())
.then(() => pagination.menu.clickNthItem(2))
.then(() => dataTable.waitForHeader())
.then(() => pagination.previousButton.click())
@@ -210,12 +220,12 @@ describe('Pagination on Favorites', () => {
.then(() => pagination.resetToDefaultPageNumber());
});
it('Previous button is disabled on first page [C260519]', () => {
it('Previous button is disabled on first page - [C280117]', () => {
expect(pagination.currentPage.getText()).toContain('Page 1');
expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
});
it('Next button is disabled on last page [C260519]', () => {
it('Next button is disabled on last page - [C280118]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.menu.clickNthItem(5))
.then(() => {
@@ -65,7 +65,7 @@ describe('Pagination on Personal Files', () => {
logoutPage.load().then(done);
});
it('pagination controls not displayed [C213164]', () => {
it('pagination controls not displayed - [C280075]', () => {
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES)
.then(() => {
expect(pagination.range.isPresent()).toBe(false);
@@ -93,7 +93,7 @@ describe('Pagination on Personal Files', () => {
.then(done);
});
it('page selector not displayed when having a single page [C213165]', () => {
it('page selector not displayed when having a single page - [C280076]', () => {
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.PERSONAL_FILES)
.then(() => dataTable.waitForHeader())
.then(() => expect(pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed'));
@@ -126,7 +126,7 @@ describe('Pagination on Personal Files', () => {
.then(done);
});
it('default values [C213157]', () => {
it('Pagination control default values - [C280077]', () => {
expect(pagination.range.getText()).toContain('1-25 of 101');
expect(pagination.maxItems.getText()).toContain('25');
expect(pagination.currentPage.getText()).toContain('Page 1');
@@ -135,7 +135,7 @@ describe('Pagination on Personal Files', () => {
expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
});
it('page sizes [C213157]', () => {
it('Items per page values - [C280078]', () => {
pagination.openMaxItemsMenu()
.then(() => {
const [ first, second, third ] = [1, 2, 3]
@@ -144,33 +144,44 @@ describe('Pagination on Personal Files', () => {
expect(second).toBe('50');
expect(third).toBe('100');
})
.then(() => pagination.menu.closeMenu());
.then(() => pagination.menu.closeMenu());
});
it('change the page size [C213158]', () => {
it('current page menu items - [C280079]', () => {
pagination.openMaxItemsMenu()
.then(() => pagination.menu.clickMenuItem('50'))
.then(() => dataTable.waitForHeader())
.then(() => pagination.menu.clickMenuItem('25'))
.then(() => {
expect(pagination.maxItems.getText()).toContain('50');
expect(pagination.totalPages.getText()).toContain('of 3');
expect(pagination.getText(pagination.maxItems)).toContain('25');
expect(pagination.getText(pagination.totalPages)).toContain('of 5');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(5))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.openMaxItemsMenu())
.then(() => pagination.menu.clickMenuItem('50'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('50');
expect(pagination.getText(pagination.totalPages)).toContain('of 3');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(3))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.openMaxItemsMenu())
.then(() => pagination.menu.clickMenuItem('100'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('100');
expect(pagination.getText(pagination.totalPages)).toContain('of 2');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(2))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.resetToDefaultPageSize());
});
it('current page menu items', () => {
pagination.openCurrentPageMenu()
.then(() => expect(pagination.menu.getItemsCount()).toBe(5))
.then(() => pagination.menu.closeMenu());
});
it('change the current page from menu [C260518]', () => {
it('change the current page from menu - [C280080]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.menu.clickNthItem(3))
.then(() => dataTable.waitForHeader())
@@ -185,7 +196,7 @@ describe('Pagination on Personal Files', () => {
.then(() => pagination.resetToDefaultPageNumber());
});
it('navigate to next page [C213160]', () => {
it('navigate to next and previous pages - [C280083]', () => {
pagination.clickNext()
.then(() => dataTable.waitForHeader())
.then(() => {
@@ -193,29 +204,27 @@ describe('Pagination on Personal Files', () => {
expect(dataTable.getRowByName('file-30.txt').isPresent()).toBe(true, 'File not found on page');
})
.then(() => pagination.resetToDefaultPageNumber());
});
.then(() => pagination.resetToDefaultPageNumber())
it('navigate to previous page [C213160]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.openCurrentPageMenu())
.then(() => pagination.menu.clickNthItem(2))
.then(() => dataTable.waitForHeader())
.then(() => pagination.clickPrevious())
.then(() => pagination.previousButton.click())
.then(() => dataTable.waitForHeader())
.then(() => {
expect(pagination.range.getText()).toContain('1-25 of 101');
expect(dataTable.getRowByName('file-12.txt').isPresent()).toBe(true, 'File not found on page');
expect(dataTable.getRowByName('file-12.txt').isPresent())
.toBe(true, 'File not found on page');
})
.then(() => pagination.resetToDefaultPageNumber());
});
it('Previous button is disabled on first page [C260519]', () => {
it('Previous button is disabled on first page - [C280081]', () => {
expect(pagination.currentPage.getText()).toContain('Page 1');
expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
});
it('Next button is disabled on last page [C260519]', () => {
it('Next button is disabled on last page - [C280082]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.menu.clickNthItem(5))
.then(() => {
+35 -26
View File
@@ -65,7 +65,7 @@ describe('Pagination on Recent Files', () => {
logoutPage.load().then(done);
});
it('pagination controls not displayed [C213164]', () => {
it('pagination controls not displayed - [C280102]', () => {
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES)
.then(() => {
expect(pagination.range.isPresent()).toBe(false);
@@ -94,7 +94,7 @@ describe('Pagination on Recent Files', () => {
.then(done);
});
it('page selector not displayed when having a single page [C213165]', () => {
it('page selector not displayed when having a single page - [C280103]', () => {
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.RECENT_FILES)
.then(() => dataTable.waitForHeader())
.then(() => expect(pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed'));
@@ -128,7 +128,7 @@ describe('Pagination on Recent Files', () => {
.then(done);
});
it('default values [C213157]', () => {
it('Pagination control default values - [C280104]', () => {
expect(pagination.range.getText()).toContain('1-25 of 101');
expect(pagination.maxItems.getText()).toContain('25');
expect(pagination.currentPage.getText()).toContain('Page 1');
@@ -137,7 +137,7 @@ describe('Pagination on Recent Files', () => {
expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
});
it('page sizes [C213157]', () => {
it('Items per page values - [C280105]', () => {
pagination.openMaxItemsMenu()
.then(() => {
const [ first, second, third ] = [1, 2, 3]
@@ -146,33 +146,44 @@ describe('Pagination on Recent Files', () => {
expect(second).toBe('50');
expect(third).toBe('100');
})
.then(() => pagination.menu.closeMenu());
.then(() => pagination.menu.closeMenu());
});
it('change the page size [C213158]', () => {
it('current page menu items - [C280106]', () => {
pagination.openMaxItemsMenu()
.then(() => pagination.menu.clickMenuItem('50'))
.then(() => dataTable.waitForHeader())
.then(() => pagination.menu.clickMenuItem('25'))
.then(() => {
expect(pagination.maxItems.getText()).toContain('50');
expect(pagination.totalPages.getText()).toContain('of 3');
expect(pagination.getText(pagination.maxItems)).toContain('25');
expect(pagination.getText(pagination.totalPages)).toContain('of 5');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(5))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.openMaxItemsMenu())
.then(() => pagination.menu.clickMenuItem('50'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('50');
expect(pagination.getText(pagination.totalPages)).toContain('of 3');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(3))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.openMaxItemsMenu())
.then(() => pagination.menu.clickMenuItem('100'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('100');
expect(pagination.getText(pagination.totalPages)).toContain('of 2');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(2))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.resetToDefaultPageSize());
});
it('current page menu items', () => {
pagination.openCurrentPageMenu()
.then(() => expect(pagination.menu.getItemsCount()).toBe(5))
.then(() => pagination.menu.closeMenu());
});
it('change the current page from menu [C260518]', () => {
it('change the current page from menu - [C280107]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.menu.clickNthItem(3))
.then(() => dataTable.waitForHeader())
@@ -187,7 +198,7 @@ describe('Pagination on Recent Files', () => {
.then(() => pagination.resetToDefaultPageNumber());
});
it('navigate to next page [C213160]', () => {
it('navigate to next and previous pages - [C280110]', () => {
pagination.nextButton.click()
.then(() => dataTable.waitForHeader())
.then(() => {
@@ -195,29 +206,27 @@ describe('Pagination on Recent Files', () => {
expect(dataTable.getRowByName('file-70.txt').isPresent()).toBe(true, 'File not found on page');
})
.then(() => pagination.resetToDefaultPageNumber());
});
.then(() => pagination.resetToDefaultPageNumber())
it('navigate to previous page [C213160]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.openCurrentPageMenu())
.then(() => pagination.menu.clickNthItem(2))
.then(() => dataTable.waitForHeader())
.then(() => pagination.previousButton.click())
.then(() => dataTable.waitForHeader())
.then(() => {
expect(pagination.range.getText()).toContain('1-25 of 101');
expect(dataTable.getRowByName('file-88.txt').isPresent()).toBe(true, 'File not found on page');
expect(dataTable.getRowByName('file-88.txt').isPresent())
.toBe(true, 'File not found on page');
})
.then(() => pagination.resetToDefaultPageNumber());
});
it('Previous button is disabled on first page [C260519]', () => {
it('Previous button is disabled on first page - [C280108]', () => {
expect(pagination.currentPage.getText()).toContain('Page 1');
expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
});
it('Next button is disabled on last page [C260519]', () => {
it('Next button is disabled on last page - [C280109]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.menu.clickNthItem(5))
.then(() => {
+35 -26
View File
@@ -66,7 +66,7 @@ describe('Pagination on Shared Files', () => {
logoutPage.load().then(done);
});
it('pagination controls not displayed [C213164]', () => {
it('pagination controls not displayed - [C280094]', () => {
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES)
.then(() => {
expect(pagination.range.isPresent()).toBe(false);
@@ -96,7 +96,7 @@ describe('Pagination on Shared Files', () => {
.then(done);
});
it('page selector not displayed when having a single page [C213165]', () => {
it('page selector not displayed when having a single page - [C280094]', () => {
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.SHARED_FILES)
.then(() => dataTable.waitForHeader())
.then(() => expect(pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed'));
@@ -133,7 +133,7 @@ describe('Pagination on Shared Files', () => {
.then(done);
});
it('default values [C213157]', () => {
it('Pagination control default values - [C280095]', () => {
expect(pagination.range.getText()).toContain('1-25 of 101');
expect(pagination.maxItems.getText()).toContain('25');
expect(pagination.currentPage.getText()).toContain('Page 1');
@@ -142,7 +142,7 @@ describe('Pagination on Shared Files', () => {
expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
});
it('page sizes [C213157]', () => {
it('Items per page values - [C280096]', () => {
pagination.openMaxItemsMenu()
.then(() => {
const [ first, second, third ] = [1, 2, 3]
@@ -151,33 +151,44 @@ describe('Pagination on Shared Files', () => {
expect(second).toBe('50');
expect(third).toBe('100');
})
.then(() => pagination.menu.closeMenu());
.then(() => pagination.menu.closeMenu());
});
it('change the page size [C213158]', () => {
it('current page menu items - [C280097]', () => {
pagination.openMaxItemsMenu()
.then(() => pagination.menu.clickMenuItem('50'))
.then(() => dataTable.waitForHeader())
.then(() => pagination.menu.clickMenuItem('25'))
.then(() => {
expect(pagination.maxItems.getText()).toContain('50');
expect(pagination.totalPages.getText()).toContain('of 3');
expect(pagination.getText(pagination.maxItems)).toContain('25');
expect(pagination.getText(pagination.totalPages)).toContain('of 5');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(5))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.openMaxItemsMenu())
.then(() => pagination.menu.clickMenuItem('50'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('50');
expect(pagination.getText(pagination.totalPages)).toContain('of 3');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(3))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.openMaxItemsMenu())
.then(() => pagination.menu.clickMenuItem('100'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('100');
expect(pagination.getText(pagination.totalPages)).toContain('of 2');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(2))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.resetToDefaultPageSize());
});
it('current page menu items', () => {
pagination.openCurrentPageMenu()
.then(() => expect(pagination.menu.getItemsCount()).toBe(5))
.then(() => pagination.menu.closeMenu());
});
it('change the current page from menu [C260518]', () => {
it('change the current page from menu - [C280098]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.menu.clickNthItem(3))
.then(() => dataTable.waitForHeader())
@@ -193,7 +204,7 @@ describe('Pagination on Shared Files', () => {
.then(() => pagination.resetToDefaultPageNumber());
});
it('navigate to next page [C213160]', () => {
it('navigate to next and previous pages - [C280101]', () => {
pagination.nextButton.click()
.then(() => dataTable.waitForHeader())
.then(() => {
@@ -201,29 +212,27 @@ describe('Pagination on Shared Files', () => {
expect(dataTable.getRowByName('file-70.txt').isPresent()).toBe(true, 'File not found on page');
})
.then(() => pagination.resetToDefaultPageNumber());
});
.then(() => pagination.resetToDefaultPageNumber())
it('navigate to previous page [C213160]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.openCurrentPageMenu())
.then(() => pagination.menu.clickNthItem(2))
.then(() => dataTable.waitForHeader())
.then(() => pagination.previousButton.click())
.then(() => dataTable.waitForHeader())
.then(() => {
expect(pagination.range.getText()).toContain('1-25 of 101');
expect(dataTable.getRowByName('file-88.txt').isPresent()).toBe(true, 'File not found on page');
expect(dataTable.getRowByName('file-88.txt').isPresent())
.toBe(true, 'File not found on page');
})
.then(() => pagination.resetToDefaultPageNumber());
});
it('Previous button is disabled on first page [C260519]', () => {
it('Previous button is disabled on first page - [C280099]', () => {
expect(pagination.currentPage.getText()).toContain('Page 1');
expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
});
it('Next button is disabled on last page [C260519]', () => {
it('Next button is disabled on last page - [C280100]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.menu.clickNthItem(5))
.then(() => {
+35 -26
View File
@@ -65,7 +65,7 @@ describe('Pagination on Trash', () => {
logoutPage.load().then(done);
});
it('pagination controls not displayed [C213164]', () => {
it('pagination controls not displayed - [C280120]', () => {
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH)
.then(() => {
expect(pagination.range.isPresent()).toBe(false);
@@ -95,7 +95,7 @@ describe('Pagination on Trash', () => {
.then(done);
});
it('page selector not displayed when having a single page [C213165]', () => {
it('page selector not displayed when having a single page - [C280121]', () => {
page.sidenav.navigateToLinkByLabel(SIDEBAR_LABELS.TRASH)
.then(() => dataTable.waitForHeader())
.then(() => expect(pagination.pagesButton.isPresent()).toBe(false, 'page selector displayed'));
@@ -131,7 +131,7 @@ describe('Pagination on Trash', () => {
.then(done);
});
it('default values [C213157]', () => {
it('Pagination control default values - [C280122]', () => {
expect(pagination.range.getText()).toContain('1-25 of 101');
expect(pagination.maxItems.getText()).toContain('25');
expect(pagination.currentPage.getText()).toContain('Page 1');
@@ -140,7 +140,7 @@ describe('Pagination on Trash', () => {
expect(pagination.nextButton.isEnabled()).toBe(true, 'Next button is not enabled');
});
it('page sizes [C213157]', () => {
it('Items per page values - [C280123]', () => {
pagination.openMaxItemsMenu()
.then(() => {
const [ first, second, third ] = [1, 2, 3]
@@ -149,33 +149,44 @@ describe('Pagination on Trash', () => {
expect(second).toBe('50');
expect(third).toBe('100');
})
.then(() => pagination.menu.closeMenu());
.then(() => pagination.menu.closeMenu());
});
it('change the page size [C213158]', () => {
it('current page menu items - [C280124]', () => {
pagination.openMaxItemsMenu()
.then(() => pagination.menu.clickMenuItem('50'))
.then(() => dataTable.waitForHeader())
.then(() => pagination.menu.clickMenuItem('25'))
.then(() => {
expect(pagination.maxItems.getText()).toContain('50');
expect(pagination.totalPages.getText()).toContain('of 3');
expect(pagination.getText(pagination.maxItems)).toContain('25');
expect(pagination.getText(pagination.totalPages)).toContain('of 5');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(5))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.openMaxItemsMenu())
.then(() => pagination.menu.clickMenuItem('50'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('50');
expect(pagination.getText(pagination.totalPages)).toContain('of 3');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(3))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.openMaxItemsMenu())
.then(() => pagination.menu.clickMenuItem('100'))
.then(() => {
expect(pagination.getText(pagination.maxItems)).toContain('100');
expect(pagination.getText(pagination.totalPages)).toContain('of 2');
})
.then(() => pagination.openCurrentPageMenu())
.then(() => expect(pagination.menu.getItemsCount()).toBe(2))
.then(() => pagination.menu.closeMenu())
.then(() => pagination.resetToDefaultPageSize());
});
it('current page menu items', () => {
pagination.openCurrentPageMenu()
.then(() => expect(pagination.menu.getItemsCount()).toBe(5))
.then(() => pagination.menu.closeMenu());
});
it('change the current page from menu [C260518]', () => {
it('change the current page from menu - [C280125]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.menu.clickNthItem(3))
.then(() => dataTable.waitForHeader())
@@ -190,7 +201,7 @@ describe('Pagination on Trash', () => {
.then(() => pagination.resetToDefaultPageNumber());
});
it('navigate to next page [C213160]', () => {
it('navigate to next and previous pages - [C280128]', () => {
pagination.nextButton.click()
.then(() => dataTable.waitForHeader())
.then(() => {
@@ -198,29 +209,27 @@ describe('Pagination on Trash', () => {
expect(dataTable.getRowByName('file-70.txt').isPresent()).toBe(true, 'File not found on page');
})
.then(() => pagination.resetToDefaultPageNumber());
});
.then(() => pagination.resetToDefaultPageNumber())
it('navigate to previous page [C213160]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.openCurrentPageMenu())
.then(() => pagination.menu.clickNthItem(2))
.then(() => dataTable.waitForHeader())
.then(() => pagination.previousButton.click())
.then(() => dataTable.waitForHeader())
.then(() => {
expect(pagination.range.getText()).toContain('1-25 of 101');
expect(dataTable.getRowByName('file-88.txt').isPresent()).toBe(true, 'File not found on page');
expect(dataTable.getRowByName('file-88.txt').isPresent())
.toBe(true, 'File not found on page');
})
.then(() => pagination.resetToDefaultPageNumber());
});
it('Previous button is disabled on first page [C260519]', () => {
it('Previous button is disabled on first page - [C280126]', () => {
expect(pagination.currentPage.getText()).toContain('Page 1');
expect(pagination.previousButton.isEnabled()).toBe(false, 'Previous button is enabled on first page');
});
it('Next button is disabled on last page [C260519]', () => {
it('Next button is disabled on last page - [C280127]', () => {
pagination.openCurrentPageMenu()
.then(() => pagination.menu.clickNthItem(5))
.then(() => {