Skip to content

Commit

Permalink
[Discover] set local storage directly for large string spec (#1170)
Browse files Browse the repository at this point in the history
Other test utilize the helper function and not seeing the particular need for this test
to ensure it switches. But by doing this avoid whatever is taking focus of the popover that
lets the test first click the button but before cypress test runner clicks the switch.

Issue:
n/a

Signed-off-by: Kawika Avilla <avillk@amazon.com>
Co-authored-by: Kawika Avilla <avillk@amazon.com>
  • Loading branch information
kavilla and Kawika Avilla authored Mar 26, 2024
1 parent 6e3cc01 commit c17e560
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ describe('test large strings', () => {
});
});

beforeEach(() => {
cy.window().then((win) =>
win.localStorage.setItem('discover:newExpereince', true)
);
});

it('verify the large string book present', function () {
// Go to the Discover page
miscUtils.visitPage('app/data-explorer/discover#/');
cy.waitForLoader();
cy.switchDiscoverTable('new');

const ExpectedDoc = 'Project Gutenberg EBook of Hamlet';

Expand All @@ -67,7 +72,6 @@ describe('test large strings', () => {

it('search Newsletter should show the correct hit count in datagrid table', function () {
cy.log('test Newsletter keyword is searched');
cy.switchDiscoverTable('new');
const expectedHitCount = '1';
const query = 'Newsletter';
cy.setTopNavQuery(query);
Expand Down

0 comments on commit c17e560

Please sign in to comment.