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
…1176)

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>
(cherry picked from commit c17e560)

Co-authored-by: Kawika Avilla <kavilla414@gmail.com>
  • Loading branch information
opensearch-trigger-bot[bot] and kavilla authored Mar 26, 2024
1 parent 506c38f commit 081de1b
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 081de1b

Please sign in to comment.