-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
00c8641
commit 78a8c3d
Showing
3 changed files
with
52 additions
and
24 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
20 changes: 14 additions & 6 deletions
20
tests/NewCypress/cypress/e2e/regression/trusts/data-download-trust.cy.ts
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,15 +1,23 @@ | ||
import dataDownload from "../../../pages/trusts/dataDowload"; | ||
import dataDownload from "../../../pages/trusts/dataDownload"; | ||
|
||
describe('Trust export and content verification', () => { | ||
beforeEach(() => { | ||
cy.login() | ||
cy.login(); | ||
cy.visit('/trusts/academies/details?uid=5712'); | ||
|
||
// Clear the downloads folder before running each test | ||
cy.task('checkForFiles', 'cypress/downloads').then((files) => { | ||
if (files) { | ||
cy.task('clearDownloads', 'cypress/downloads'); | ||
} | ||
}); | ||
}); | ||
|
||
it('should export a trust and verify it has downloaded and has content', () => { | ||
dataDownload.clickDownloadButton(); | ||
dataDownload.checkFileDownloaded(); | ||
dataDownload.checkFileHasContent(); | ||
dataDownload.deleteDownloadedFile(); | ||
dataDownload | ||
.clickDownloadButton() | ||
.checkFileDownloaded() | ||
.checkFileHasContent() | ||
.deleteDownloadedFile(); | ||
}); | ||
}); |
40 changes: 22 additions & 18 deletions
40
...press/cypress/pages/trusts/dataDowload.ts → ...ress/cypress/pages/trusts/dataDownload.ts
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