Skip to content

Commit 6c7c972

Browse files
authored
Merge pull request #187 from UniversalDataTool/test/create-and-visit-collobration-session-e2e
Test/create and visit collobration session e2e
2 parents 33772f8 + 75894ee commit 6c7c972

File tree

4 files changed

+38
-1
lines changed

4 files changed

+38
-1
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
let collobrationURL
2+
3+
describe("Create a new file in the universal data tool", () => {
4+
it('should be able to create new file', () => {
5+
cy.visit("http://localhost:6001")
6+
7+
cy.contains("New File").click()
8+
})
9+
10+
it('should be able to import Elon Musk Tweets images dataset', () => {
11+
cy.contains("Samples").click()
12+
cy.contains("Import Toy Dataset").click()
13+
cy.contains("Elon Musk Tweets").siblings("td").eq(2).click()
14+
})
15+
16+
it('should be able to create new session', () => {
17+
cy.get("div[title='collaborate-icon']").click()
18+
cy.contains("Create New Session").click()
19+
});
20+
21+
it('should be able to store session url', () =>{
22+
cy.get("div[title='share-link']").children().children().then(elements => {
23+
collobrationURL = Cypress.$(elements[0]).val()
24+
})
25+
})
26+
27+
it('should be able to go for session url', () =>{
28+
cy.visit(collobrationURL)
29+
})
30+
31+
it('should be able to navigate to samples', () =>{
32+
cy.contains("Samples").click()
33+
})
34+
})

src/components/CollaborateButton/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ export default ({
122122

123123
return (
124124
<Container
125+
title="collaborate-icon"
125126
onMouseEnter={() => changeSessionBoxOpen(true)}
126127
onMouseLeave={() => changeSessionBoxOpen(false)}
127128
>

src/components/DatasetEditor/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ export default ({
132132
inSession ? (
133133
<TextField
134134
label="Share Link"
135+
title="share-link"
135136
value={url}
136137
variant="outlined"
137138
size="small"

src/utils/file-handlers/use-local-storage.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default (file, changeFile) => {
1515
} else {
1616
changeRecentItems([file].concat(recentItems).slice(0, 3))
1717
}
18-
}, [file, changeRecentItems, recentItems])
18+
// eslint-disable-next-line
19+
}, [file, changeRecentItems])
1920
return { recentItems, changeRecentItems }
2021
}

0 commit comments

Comments
 (0)