Skip to content

Commit 1e6d01c

Browse files
Merge pull request #487 from CedricProfessionnel/SqueletonImportTestSuite
Common part for import test (Part Aws Feature)
2 parents 59b8c26 + fb3573b commit 1e6d01c

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import commandLocalStorage from "../utils/cypress-command/local-storage"
2+
import commandCredentialsAws from "../utils/cypress-command/credentials-aws"
3+
import commandCleanAws from "../utils/cypress-command/clean-aws"
4+
import commandSetUpAws from "../utils/cypress-command/set-up-aws"
5+
import commandSetLanguage from "../utils/cypress-command/set-language"
6+
7+
commandLocalStorage()
8+
commandCredentialsAws()
9+
commandSetUpAws()
10+
commandCleanAws()
11+
commandSetLanguage()
12+
13+
Cypress.config("defaultCommandTimeout", 3000)
14+
if (Cypress.env().AWS_IDENTITY_POOL_ID)
15+
describe("Import aws test", () => {
16+
before("Prepare tests", () => {
17+
cy.log("should be able to join the web site")
18+
cy.visit(`http://localhost:6001`)
19+
cy.setLanguage("en")
20+
//the following are very long processus try to keep them here so they execute only once
21+
cy.createCredentialsAws()
22+
cy.saveLocalStorage()
23+
cy.cleanAws()
24+
cy.setUpAws()
25+
})
26+
27+
beforeEach("Go to import page", () => {
28+
cy.restoreLocalStorage()
29+
})
30+
31+
//Comment below when debugging 1 test
32+
afterEach("Return to home page", () => {
33+
cy.get("button[title='Exit to Welcome Page']").click({ force: true })
34+
})
35+
36+
//Comment below when debugging aws
37+
after("Clean AWS", () => {
38+
cy.cleanAws()
39+
})
40+
})

0 commit comments

Comments
 (0)