Skip to content
Permalink
Browse files

Fix broken tests on travis

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 27, 2019
1 parent ec2c921 commit b3ea8defa995f4a3c827369e85e82fc9347c6f46
@@ -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

@@ -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>
@@ -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": [
{
@@ -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() {
@@ -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']

@@ -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'

0 comments on commit b3ea8de

Please sign in to comment.
You can’t perform that action at this time.