Skip to content

Commit faad646

Browse files
Common part for export test
1 parent 17c8a93 commit faad646

File tree

2 files changed

+42
-48
lines changed

2 files changed

+42
-48
lines changed

cypress/integration/aws-test/export-aws.spec.js

Lines changed: 0 additions & 48 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import commandSetLanguage from "../utils/cypress-command/set-language"
2+
import commandLocalStorage from "../utils/cypress-command/local-storage"
3+
import commandAddAssetToAwsProject from "../utils/cypress-command/add-asset-to-aws-project"
4+
import commandCredentialsAws from "../utils/cypress-command/credentials-aws"
5+
import commandAddProjectToAws from "../utils/cypress-command/add-project-to-aws"
6+
import commandCleanAws from "../utils/cypress-command/clean-aws"
7+
8+
commandLocalStorage()
9+
commandCredentialsAws()
10+
commandAddAssetToAwsProject()
11+
commandAddProjectToAws()
12+
commandCleanAws()
13+
commandSetLanguage()
14+
15+
Cypress.config("defaultCommandTimeout", 3000)
16+
if (Cypress.env().AWS_IDENTITY_POOL_ID)
17+
describe("Export aws test", () => {
18+
before("Prepare tests", () => {
19+
cy.log("should be able to join the web site")
20+
cy.visit(`http://localhost:6001`)
21+
cy.createCredentialsAws()
22+
cy.setLanguage("en")
23+
cy.saveLocalStorage()
24+
cy.cleanAws()
25+
cy.addProjectToAws("ImageClassification.json")
26+
cy.addAssetToAwsProject("Image Classification", "image1.jpg")
27+
})
28+
29+
beforeEach("Go to import page", () => {
30+
cy.restoreLocalStorage()
31+
})
32+
33+
//Comment below when debugging 1 test
34+
afterEach("Return to home page", () => {
35+
cy.get("button[title='Exit to Welcome Page']").click({ force: true })
36+
})
37+
38+
//Comment below when debugging aws
39+
after("Clean AWS", () => {
40+
cy.cleanAws()
41+
})
42+
})

0 commit comments

Comments
 (0)