-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Prevent overwrite of cached page on presentation preview init (#916
- Loading branch information
Jeremy Press
authored
Feb 11, 2019
1 parent
214e366
commit 9256dcc
Showing
8 changed files
with
46 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// <reference types="Cypress" /> | ||
describe('Presentation Viewer', () => { | ||
const token = Cypress.env('ACCESS_TOKEN'); | ||
const fileId = Cypress.env('FILE_ID_PRESENTATION'); | ||
|
||
|
||
beforeEach(() => { | ||
cy.visit('/'); | ||
cy.showPreview(token, fileId); | ||
}); | ||
|
||
it('Should initialize preview on the same page it was closed on', () => { | ||
// Assert document content is present | ||
cy.contains('For Teaching Economics'); | ||
|
||
cy.showControls(); | ||
|
||
// Navigate to the second page so it gets cached | ||
cy.getByTitle('Next page').click(); | ||
|
||
// Refreshes preview | ||
cy.reload(); | ||
|
||
cy.getPreviewPage(2).should('be.visible'); | ||
|
||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters