Skip to content

Commit 74c720f

Browse files
Header warning test part
1 parent c1a01ac commit 74c720f

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import warningHeader from "../utils/aws-unit-test/warning-header-export"
2+
13
import commandSetLanguage from "../utils/cypress-command/set-language"
24
import commandLocalStorage from "../utils/cypress-command/local-storage"
35
import commandAddAssetToAwsProject from "../utils/cypress-command/add-asset-to-aws-project"
@@ -30,6 +32,8 @@ if (Cypress.env().AWS_IDENTITY_POOL_ID)
3032
cy.restoreLocalStorage()
3133
})
3234

35+
warningHeader()
36+
3337
//Comment below when debugging 1 test
3438
afterEach("Return to home page", () => {
3539
cy.get("button[title='Exit to Welcome Page']").click({ force: true })
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import goToImportPage from "../go-to-import-page"
2+
const warningHeader = () => {
3+
it("Warning project name not set", () => {
4+
goToImportPage("Image Segmentation")
5+
cy.contains("Export to S3 (Cognito)").click()
6+
cy.contains("Warning : Please enter a project name.")
7+
cy.contains("Close").click()
8+
})
9+
it("Warning project already exist", () => {
10+
goToImportPage("Image Segmentation")
11+
cy.contains("Export to S3 (Cognito)").click()
12+
cy.get("input[id='ProjectName']")
13+
.focus()
14+
.clear()
15+
.type("Image Classification")
16+
cy.contains(
17+
"Warning : This project name already exist. If you continue the existing project with the same name will be replaced."
18+
)
19+
cy.contains("Close").click()
20+
})
21+
}
22+
export default warningHeader

0 commit comments

Comments
 (0)