Skip to content

Commit 4261639

Browse files
authored
fix: Merge pull request #214 from UniversalDataTool/fix/broken-paste-image-urls-with-csv
Fix paste image urls with csv Cypress test
2 parents 4c20d30 + 99f128b commit 4261639

File tree

1 file changed

+23
-15
lines changed

1 file changed

+23
-15
lines changed

cypress/integration/paste-image-urls-with-csv.spec.js

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,48 @@ const csvRows = [
55
"faces/011094.jpg,https://wao.ai/app/api/download/0060b2fa-6f7d-49c3-a965-ab82fe8a9475,female"
66
]
77

8-
describe.skip("Create a new", () => {
8+
describe("Create a new file", () => {
99
it('should be able to create', () => {
1010
cy.visit("/")
1111
cy.contains("New File").click()
1212
})
1313

14-
it('should be able to open paste', () => {
14+
it('should be able to open import dialog', () => {
1515
cy.contains("Samples").click()
16-
cy.contains("Import").click()
17-
cy.contains("Import Text Snippets").click()
18-
});
16+
cy.contains("Import from CSV / JSON").click()
17+
})
1918

19+
it('should be able to click textarea to paste', () =>{
20+
cy.get("textarea").click()
21+
})
2022

21-
it('should be able to paste image urls', () => {
22-
const csvText = csvHeader + "{enter}" + csvRows.join("{enter}")
23-
cy.get("textarea").type(csvText)
24-
});
23+
it('should be able to paste csv of image urls', () => {
24+
cy.get("textarea")
25+
.type(csvHeader)
26+
.type("{enter}")
27+
for(const csvRow of csvRows){
28+
cy.get("textarea")
29+
.type(csvRow + "{enter}")
30+
}
31+
})
2532

26-
it('should be able to add that samples', () => {
33+
it('should be able to add samples from csv', () => {
2734
cy.contains("Add Samples").click()
28-
});
35+
})
2936

3037
it('should be able to go to setup', () => {
3138
cy.contains("Setup").click()
32-
});
39+
})
3340

34-
it('should be able to go to Image Classification', () => {
41+
it('should be able to go to Image Classification setup', () => {
3542
cy.contains("Image Classification").click()
36-
});
43+
})
3744

3845
it('should be able to see samples', () => {
3946
cy.contains("Samples").click()
4047
cy.contains("2").click()
41-
});
48+
})
49+
4250
it('should be able to label image', () => {
4351
cy.wait(200)
4452
cy.get("body").click().type("{enter}")

0 commit comments

Comments
 (0)