Skip to content

Commit 421981d

Browse files
author
Liza K
committed
Merge remote-tracking branch 'upstream/master' into advanced-settings/deprecation-label
2 parents a7ae50a + 794bb02 commit 421981d

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

x-pack/legacy/plugins/siem/cypress/integration/smoke_tests/pagination/pagination.spec.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,16 @@ import {
1818
import { DEFAULT_TIMEOUT, loginAndWaitForPage, waitForTableLoad } from '../../lib/util/helpers';
1919

2020
describe('Pagination', () => {
21-
it('pagination updates results and page number', () => {
21+
before(() => {
2222
loginAndWaitForPage(HOSTS_PAGE_TAB_URLS.uncommonProcesses);
2323
waitForTableLoad(UNCOMMON_PROCCESSES_TABLE);
24+
});
25+
26+
afterEach(() => {
27+
cy.get(getPageButtonSelector(0)).click({ force: true });
28+
});
29+
30+
it('pagination updates results and page number', () => {
2431
cy.get(getPageButtonSelector(0)).should('have.class', 'euiPaginationButton-isActive');
2532

2633
cy.get(getDraggableField('process.name'))
@@ -42,8 +49,6 @@ describe('Pagination', () => {
4249
});
4350

4451
it('pagination keeps track of page results when tabs change', () => {
45-
loginAndWaitForPage(HOSTS_PAGE_TAB_URLS.uncommonProcesses);
46-
waitForTableLoad(UNCOMMON_PROCCESSES_TABLE);
4752
cy.get(getPageButtonSelector(0)).should('have.class', 'euiPaginationButton-isActive');
4853
let thirdPageResult: string;
4954
cy.get(getPageButtonSelector(2)).click({ force: true });
@@ -78,7 +83,6 @@ describe('Pagination', () => {
7883
* when we figure out a way to really mock the data, we should come back to it
7984
*/
8085
it('pagination resets results and page number to first page when refresh is clicked', () => {
81-
loginAndWaitForPage(HOSTS_PAGE_TAB_URLS.uncommonProcesses);
8286
cy.get(NUMBERED_PAGINATION, { timeout: DEFAULT_TIMEOUT });
8387
cy.get(getPageButtonSelector(0)).should('have.class', 'euiPaginationButton-isActive');
8488
// let firstResult: string;

0 commit comments

Comments
 (0)