From 041dd8957c95ac03bc7b7e1407ede1c8d91e2a63 Mon Sep 17 00:00:00 2001 From: Mingze Date: Mon, 3 Feb 2020 11:01:58 -0800 Subject: [PATCH] fix(test): Fix archive e2e test due to default sort by Name (#1168) --- test/integration/archive/ArchiveViewer.e2e.test.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/integration/archive/ArchiveViewer.e2e.test.js b/test/integration/archive/ArchiveViewer.e2e.test.js index 7438e8ffe..6e4a84069 100644 --- a/test/integration/archive/ArchiveViewer.e2e.test.js +++ b/test/integration/archive/ArchiveViewer.e2e.test.js @@ -1,5 +1,5 @@ // -describe.skip('Archive Viewer', () => { +describe('Archive Viewer', () => { const token = Cypress.env('ACCESS_TOKEN'); const fileId = Cypress.env('FILE_ID_ARCHIVE'); @@ -26,12 +26,16 @@ describe.skip('Archive Viewer', () => { cy.getByTitle('Preview SDK Sample Archive').within(() => { cy.get('button').click(); }); + // default sort by name + cy.get('.ReactVirtualized__Table__row') + .first() + .contains('Audio.mp3'); + // reverse cy.getByTitle('Name').click(); - cy.get('.ReactVirtualized__Table__row') .first() - .contains('Audio.mp3'); + .contains('Preview SDK Sample Excel.xlsx'); }); it('Should show matched item list based on search query', () => {