-
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.
- Loading branch information
Conrad Chan
authored
Mar 13, 2019
1 parent
8c2b193
commit eadedf1
Showing
6 changed files
with
42 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// <reference types="Cypress" /> | ||
describe('Text Viewers', () => { | ||
const token = Cypress.env('ACCESS_TOKEN'); | ||
|
||
beforeEach(() => { | ||
cy.visit('/'); | ||
}); | ||
|
||
[ | ||
{ title: 'html', fileKey: 'FILE_ID_HTML', expectedText: 'Files App' }, | ||
{ title: 'js', fileKey: 'FILE_ID_JS', expectedText: 'class PlainText extends TextBase' }, | ||
{ title: 'json', fileKey: 'FILE_ID_JSON', expectedText: 'Standard Generalized Markup Language' }, | ||
{ title: 'txt', fileKey: 'FILE_ID_TXT', expectedText: 'XSS Locator' } | ||
].forEach((testcase) => { | ||
it(`Should load a ${testcase.title} preview`, () => { | ||
const fileId = Cypress.env(testcase.fileKey); | ||
cy.showPreview(token, fileId); | ||
cy.contains(testcase.expectedText); | ||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -1,10 +1,14 @@ | ||
Cypress.env({ | ||
ACCESS_TOKEN: 'S8wjvjOL9GEK5VtXsQNVMOwSrx1g55oC', | ||
FILE_ID_DOC: '415542803939', | ||
FILE_ID_PRESENTATION: '415537552367', | ||
FILE_ID_PRESENTATION_WITH_LINKS: '416052594867', | ||
FILE_ID_HTML: '420872247534', | ||
FILE_ID_JS: '416043839991', | ||
FILE_ID_JSON: '420868959262', | ||
FILE_ID_MP3: '415542687401', | ||
FILE_ID_VIDEO: '416047501580', | ||
FILE_ID_PRESENTATION_WITH_LINKS: '416052594867', | ||
FILE_ID_PRESENTATION: '415537552367', | ||
FILE_ID_TXT: '420870357452', | ||
FILE_ID_VIDEO_SMALL: '415542846356', | ||
FILE_ID_VIDEO_SUBTITLES_TRACKS: '415542245854', | ||
FILE_ID_VIDEO_SMALL: '415542846356' | ||
FILE_ID_VIDEO: '416047501580' | ||
}); |