Skip to content

Commit 5486050

Browse files
New test + Timeout Adjust
1 parent bf3e335 commit 5486050

File tree

4 files changed

+59
-3
lines changed

4 files changed

+59
-3
lines changed

cypress/integration/utils/interface-test/create-and-visit-collaborative-session.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ const createAndVisitCollaborativeSession = () => {
22
let collaborationUrl
33
it("Should be able to create and visit collaborative session", () => {
44
cy.log("should be able to import Elon Musk Tweets dataset")
5-
cy.get("#tab-samples", { timeout: 5000 }).click()
5+
cy.get("#tab-samples", { timeout: 10000 }).click()
66
cy.contains("Import").click()
77
cy.contains("Import Toy Dataset").click()
88
cy.contains("Elon Musk Tweets").siblings("td").eq(2).click()
99

1010
cy.log("should be able to create new session")
11-
cy.get("div[title='collaborate-icon']").click()
11+
cy.get("div[title='collaborate-icon']", { timeout: 10000 }).click()
1212
cy.contains("Create New Session", { timeout: 5000 }).click()
1313
cy.contains("Leave Session", { timeout: 20000 })
1414
cy.get("div[title='collaborate-icon']").trigger("mouseleave")
@@ -25,7 +25,7 @@ const createAndVisitCollaborativeSession = () => {
2525
cy.visit(collaborationUrl)
2626

2727
cy.log("should be able to navigate to samples")
28-
cy.get("#tab-samples").click()
28+
cy.get("#tab-samples", { timeout: 20000 }).click()
2929
})
3030
})
3131
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import commandSetTemplate from "../cypress-command/set-template"
2+
const defaultTemplate = () => {
3+
commandSetTemplate()
4+
it("Should be able to set a default template", () => {
5+
cy.setTemplate("Image Segmentation")
6+
cy.contains("New File").click()
7+
cy.get(
8+
"button[class='MuiButtonBase-root MuiTab-root MuiTab-textColorInherit MuiTab-labelIcon']",
9+
{ timeout: 2000 }
10+
)
11+
.eq(2)
12+
.click()
13+
cy.contains("image_segmentation")
14+
})
15+
}
16+
export default defaultTemplate
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
const setLanguage = (language, langChar) => {
2+
cy.log("should be able to set the language to " + language)
3+
cy.get('input[id="react-select-2-input"]')
4+
.focus()
5+
.type(language)
6+
.type("{enter}")
7+
.should(() => {
8+
cy.expect(localStorage.getItem("i18nextLng"), {
9+
timeout: 2000,
10+
}).to.be.equal(langChar)
11+
})
12+
}
13+
14+
const test = () => {
15+
it("Should be able to set english language from text", () => {
16+
setLanguage("English", "en")
17+
})
18+
it("Should be able to set french language from text", () => {
19+
setLanguage("French", "fr")
20+
})
21+
it("Should be able to set chinese language from text", () => {
22+
setLanguage("Chinese", "cn")
23+
})
24+
it("Should be able to set portugese language from text", () => {
25+
setLanguage("Portuguese", "pt")
26+
})
27+
it("Should be able to set dutch language from text", () => {
28+
setLanguage("Dutch", "nl")
29+
})
30+
}
31+
32+
export default test
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
const templateNonVisible = () => {
2+
it("time series 2 should not be visible", () => {
3+
cy.contains("New File").click()
4+
cy.contains("Time Series 2").should("not.exist")
5+
})
6+
}
7+
8+
export default templateNonVisible

0 commit comments

Comments
 (0)