-
-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate spectron (UPLOAD-440) #1360
base: master
Are you sure you want to change the base?
Conversation
This reverts commit b7fb43f.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! I've added a couple of suggestions and comments, but nothing major. Code quality is 💯
.circleci/config.yml
Outdated
@@ -36,6 +36,7 @@ jobs: | |||
# Test | |||
- run: yarn lint | |||
- run: yarn test | |||
- run: yarn run spectron-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- run: yarn run spectron-test | |
- run: yarn spectron-test |
appveyor.yml
Outdated
@@ -35,6 +35,7 @@ test_script: | |||
- node --version | |||
- yarn lint | |||
- yarn test | |||
- yarn run spectron-test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- yarn run spectron-test | |
- yarn spectron-test |
package.json
Outdated
@@ -31,7 +31,8 @@ | |||
"package-win": "npm run build && electron-builder --win --x64", | |||
"package-mac": "npm run build && electron-builder --mac", | |||
"package-linux": "npm run build && electron-builder --linux", | |||
"package-all": "npm run build && electron-builder -mwl" | |||
"package-all": "npm run build && electron-builder -mwl", | |||
"spectron-test": "yarn build && mocha -r esm" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We've migrated from mocha to jest a while ago. I'm just wondering whether the spectron tests will work with jest, or is it only possible with mocha?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, didn't realize that, totally will work with jest, will make it so!
test/login.spec.js
Outdated
await stopApp(app); | ||
}); | ||
|
||
it('should open', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this actually async
? I don't see an await
.
test/login.spec.js
Outdated
await LoginScreen.uploaderLogo.getText() | ||
.should.eventually.equal('Uploader'); | ||
await LoginScreen.forgotPasswordLink.should.eventually.exist; | ||
await LoginScreen.supportLink.getText() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remember we had an issue for a while where the support link wasn't working. Can we also add tests here to check that the URLs don't 404?
test/utilities.js
Outdated
|
||
global.before(() => { | ||
should(); | ||
use(chaiAsPromised); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind adding a comment here to explain why chaiAsPromised
is necessary here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this won't be here if we use jest i think.
Went ahead and switched to jest...a couple things here..
special thanks to @krystophv and @gniezen for help on this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, great job @ginnyyadav ! I just have two comments:
run
is not necessary when usingyarn
- Please remove the
app/package-lock.json
file, as that as created bynpm
.
Fix spelling of spectron Co-authored-by: Gerrit Niezen <[email protected]>
…uploader into integrate-spectron
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Simple spectron integration with a very simple test example so we can build off of it.