Skip to content

Commit

Permalink
Move visit page before each tests
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <[email protected]>
  • Loading branch information
wanglam committed Feb 5, 2024
1 parent abb5701 commit b5e8878
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ describe('index pattern without field spec', () => {
cy.setAdvancedSetting({
defaultIndex: 'without-timefield',
});

// Go to the Discover page
miscUtils.visitPage('app/data-explorer/discover#/');
cy.waitForLoader();
});

after(() => {
Expand All @@ -41,6 +37,13 @@ describe('index pattern without field spec', () => {
);
});

beforeEach(() => {
// Move visit page to before each to avoid test cases failed in security enabled
// Go to the Discover page
miscUtils.visitPage('app/data-explorer/discover#/');
cy.waitForLoader();
});

it('should not display a timepicker', () => {
cy.getElementByTestId('superDatePickerToggleQuickMenuButton').should(
'not.exist'
Expand Down

0 comments on commit b5e8878

Please sign in to comment.