Skip to content

Commit

Permalink
Fix broken tests on travis
Browse files Browse the repository at this point in the history
I have tried so many things on this topic. I'm listing some of them:
- Putting the webdriver-update and protractor commands directly in travis.yml file - no difference as using the npm run alternative makes them run correctly after all
- Update chrome driver to match current version of Chrome (v74 at the moment)
- Fixed CELERY_BEAT settings as this was adding lot of noise in the logs
- Found and fixed broken test connected with new modal window introduced in this release - we need to invest some time to improve some logic in the tests, like avoid using too open selectors
  • Loading branch information
eos87 committed May 28, 2019
1 parent ec2c921 commit b3ea8de
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -88,14 +88,14 @@ script:
- cd $TRAVIS_BUILD_DIR/server && nosetests --all-modules --nocapture;
- cd $TRAVIS_BUILD_DIR/server && behave --format progress2 --logging-level ERROR ;
- cd $TRAVIS_BUILD_DIR/server && flake8 ;
- cd $TRAVIS_BUILD_DIR/client && npm run lint ;
- cd $TRAVIS_BUILD_DIR/server
- python3 app_init_elastic.py ;
- python3 manage.py app:initialize_data ;
- python3 manage.py users:create -u admin -p admin -e 'admin@example.com' --admin ;
- python3 manage.py register_local_themes ;
- python3 manage.py register_bloglist ;
- cd $TRAVIS_BUILD_DIR/client
- npm run lint
- npm run webdriver-update
- npm run e2e

Expand Down
Expand Up @@ -10,7 +10,7 @@ const Modal: React.SFC<IModalProps> = (props) => {
<ModalContext.Consumer>
{({ modalRef }) => (
<div ref={modalRef} className={`modal fade ${props.modalClass || ''}`} tabIndex={-1} role="dialog">
<div className="modal__dialog" role="document">
<div className="modal__dialog v2" role="document">
<div className="modal__content">
<Header title={props.title} />
<Body>{props.body}</Body>
Expand Down
4 changes: 2 additions & 2 deletions client/package.json
Expand Up @@ -10,8 +10,8 @@
"eslint": "grunt eslint",
"tslint": "tsc --noEmit && tslint -c tslint.json 'app/**/*.{ts,tsx}'",
"lint": "npm run eslint && npm run tslint",
"webdriver-update": "webdriver-manager update --gecko false --versions.chrome=2.46 --versions.standalone=3.9.1",
"e2e": "protractor protractor-conf.js"
"webdriver-update": "./node_modules/protractor/bin/webdriver-manager update --gecko false --versions.chrome 74.0.3729.6 --versions.standalone 3.9.1",
"e2e": "./node_modules/.bin/protractor protractor-conf.js"
},
"licenses": [
{
Expand Down
2 changes: 1 addition & 1 deletion client/spec/helpers/pages.js
Expand Up @@ -21,7 +21,7 @@ var blogs = [

function waitForModal() {
/* jshint validthis: true */
browser.wait(() => element(by.css('.modal__dialog')).isDisplayed(), 1000);
browser.wait(() => element(by.css('.modal__dialog:not(.v2)')).isDisplayed(), 1000);
return this;
}
function okModal() {
Expand Down
8 changes: 6 additions & 2 deletions server/settings.py
Expand Up @@ -142,6 +142,10 @@ def env(variable, fallback_value=None):
}
}

# trying to fix stuff
CELERY_BEAT_SCHEDULE_FILENAME = CELERYBEAT_SCHEDULE_FILENAME
CELERY_BEAT_SCHEDULE = CELERYBEAT_SCHEDULE

SENTRY_DSN = env('SENTRY_DSN')
SENTRY_INCLUDE_PATHS = ['superdesk']

Expand Down Expand Up @@ -357,8 +361,8 @@ def env(variable, fallback_value=None):
DEFAULT_THEME_DATE_FORMAT = env('DEFAULT_THEME_DATE_FORMAT', 'D. MMMM YYYY HH:mm')
DEFAULT_THEME_TIMEZONE = env('DEFAULT_THEME_TIMEZONE', arrow.now().format('ZZZ'))

# TTL for editing post flag (seconds). Default: 5 minutes
EDIT_POST_FLAG_TTL = int(env('EDIT_POST_FLAG_TTL', 5 * 60))
# TTL for editing post flag (seconds). Default: 60 minutes
EDIT_POST_FLAG_TTL = int(env('EDIT_POST_FLAG_TTL', 60 * 60))

# list of URLs where the hooks would be trigger too. POST only for now
# This should be comma separated string like: 'example.com, domain.com'
Expand Down

0 comments on commit b3ea8de

Please sign in to comment.