New: Setup selenium functional UI framework#158
Conversation
pramodsum
commented
Apr 2, 2018
- Set up express app to generate annotator tokens and test browsers
- Update travis.yml w/ saucelabs config
- Allowing concurrent testing w/ file ids in env variables
- Set up express app to generate annotator tokens and test browsers - Update travis.yml w/ saucelabs config - Allowing concurrent testing w/ file ids in env variables
|
Verified that @pramodsum has signed the CLA. Thanks for the pull request! |
.travis.yml
Outdated
| - /^greenkeeper/.*$/ | ||
| email: false | ||
| # recipients: | ||
| # - spramod@box.com |
There was a problem hiding this comment.
Did you mean to leave this commented section?
codecept.conf.js
Outdated
| const isLocalBuild = typeof SAUCE_USERNAME === 'undefined'; | ||
|
|
||
| if (isLocalBuild) { | ||
| // // Config to test using the Chrome emulator |
There was a problem hiding this comment.
remove commented code?
| helperObj.WebDriverIO = commonConfigObj; | ||
| } else { | ||
| // Common saucelab config | ||
| const sauceObj = { |
There was a problem hiding this comment.
Can this be moved to a higher level variable, or does it need to be created on each run of this code?
functional-tests/helpers/cleanup.js
Outdated
| @@ -0,0 +1,47 @@ | |||
| /* eslint-disable func-names */ | |||
There was a problem hiding this comment.
AFAIK you can bundle all of your eslint-disables into one statement.
functional-tests/app.js
Outdated
|
|
||
| // Set up SDK & client | ||
| const sdk = new BoxSDK({ | ||
| clientID: 'l20yq2uyg3y8vl27rvw67m8s0ryo9mrz', |
| @@ -0,0 +1,32 @@ | |||
| <!DOCTYPE html> | |||
There was a problem hiding this comment.
since we're setting up the preview expiring embed using an express app, it uses pug to pass in the variables rather than a straight html file
| <meta charset="UTF-8"> | ||
| link(rel="stylesheet" href='annotations.css') | ||
| script(src='annotations.js') | ||
| link(rel="stylesheet" href='https://cdn01.boxcdn.net/platform/preview/1.37.0/en-US/preview.css') |
There was a problem hiding this comment.
How are you planning on keeping this up to date?
There was a problem hiding this comment.
Since Preview shouldn't affect annotations anymore, using an older version of preview shouldn't make a difference. The only reason I could see to update this regularly would be if there's drastic changes to how Preview and Annotations interact.
There was a problem hiding this comment.
Maybe you can make this an env variable just incase?
There was a problem hiding this comment.
also will have to update this after your css class gets added into preview.
There was a problem hiding this comment.
the CSS change is in the annotations codebase so it shouldn't affect the preview version
| @@ -149,6 +150,7 @@ class Annotator extends EventEmitter { | |||
| .then(() => { | |||
There was a problem hiding this comment.
Separate any actual changes to the lib as a separate commit
| "watch": "yarn install && BABEL_ENV=dev NODE_ENV=dev ./node_modules/.bin/webpack --watch --progress --colors --config build/webpack.config.js", | ||
| "test": "yarn install && NODE_ENV=test ./node_modules/.bin/karma start build/karma.conf.js", | ||
| "debug": "yarn install && NODE_ENV=test ./node_modules/.bin/karma start build/karma.conf.js --no-single-run --auto-watch", | ||
| "setup-travis": "cd functional-tests && yarn install && node app.js", |
There was a problem hiding this comment.
does this need to point to the functional test folder as well? functional_tests/app.js
There was a problem hiding this comment.
it cd's into the functional test folder so it's fine
functional-tests/helpers/actor.js
Outdated
| @@ -0,0 +1 @@ | |||
| module.exports = actor; | |||
codecept.conf.js
Outdated
| const commonConfigObj = { | ||
| browser: BROWSER_NAME, | ||
| url: 'http://localhost:8080', | ||
| smartWait: DEFAULT_WAIT_TIME, |
There was a problem hiding this comment.
You should remove smartWait. Jeremy and I found it to be buggy
| - name: Android | ||
| if: type = cron | ||
| jobs: | ||
| include: |
There was a problem hiding this comment.
Check out Daniel's recent commit where he cleaned this up.
| <meta charset="UTF-8"> | ||
| link(rel="stylesheet" href='annotations.css') | ||
| script(src='annotations.js') | ||
| link(rel="stylesheet" href='https://cdn01.boxcdn.net/platform/preview/1.37.0/en-US/preview.css') |
There was a problem hiding this comment.
also will have to update this after your css class gets added into preview.