Skip to content

Commit

Permalink
Hardcode chromedriver to 90 (#7125)
Browse files Browse the repository at this point in the history
Fixes bug in export data afterAll.
Removes webdriver-version replace, which no longer applies to current version of protractor.

#7124
#7118

(cherry picked from commit 28f2afb)
  • Loading branch information
dianabarsan committed Jul 6, 2021
1 parent 186ace8 commit 0cb55a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
16 changes: 2 additions & 14 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const {
BUILDS_SERVER,
TRAVIS_BUILD_NUMBER,
CI,
WEBDRIVER_VERSION=88
} = process.env;

const releaseName = TRAVIS_TAG || TRAVIS_BRANCH || 'local-development';
Expand Down Expand Up @@ -89,16 +88,6 @@ module.exports = function(grunt) {
},
],
},
'webdriver-version': {
src: ['node_modules/protractor/node_modules/webdriver-manager/built/config.json'],
overwrite: true,
replacements: [
{
from: /"maxChromedriver": ".*",/g,
to: `"maxChromedriver": "${WEBDRIVER_VERSION}",`,
},
]
},
},
'couch-compile': {
primary: {
Expand Down Expand Up @@ -477,8 +466,8 @@ module.exports = function(grunt) {
'start-webdriver': {
cmd:
'mkdir -p tests/logs && ' +
'./node_modules/.bin/webdriver-manager update && ' +
'./node_modules/.bin/webdriver-manager start > tests/logs/webdriver.log & ' +
'./node_modules/.bin/webdriver-manager update --versions.chrome 90.0.4430.24 && ' +
'./node_modules/.bin/webdriver-manager start --versions.chrome 90.0.4430.24 > tests/logs/webdriver.log & ' +
'until nc -z localhost 4444; do sleep 1; done',
},
'start-webdriver-ci': {
Expand Down Expand Up @@ -932,7 +921,6 @@ module.exports = function(grunt) {
]);

grunt.registerTask('start-webdriver', 'Starts Protractor Webdriver', [
'replace:webdriver-version',
CI ? 'exec:start-webdriver-ci' : 'exec:start-webdriver',
]);

Expand Down
5 changes: 3 additions & 2 deletions scripts/e2e/start_webdriver.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
mkdir -p tests/logs &&
CHROME_VERSION=`google-chrome-stable --version | grep -Po '(\d+)(?=\.\d+\.\d+\.\d+)'` &&
CHROME_VERSION=`google-chrome-stable --version | grep -Po '(\d+)(?=\.\d+\.\d+\.\d+)'` &&
echo 'Detected chrome version ' $CHROME_VERSION &&
CHROMEDRIVER_VERSION=$(curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION) &&
CHROMEDRIVER_VERSION="90.0.4430.24" # temporary fix because of regression in driver v91
echo 'Getting Chrome driver version ' $CHROMEDRIVER_VERSION &&
./node_modules/.bin/webdriver-manager update --versions.chrome $CHROMEDRIVER_VERSION &&
./node_modules/.bin/webdriver-manager start --versions.chrome $CHROMEDRIVER_VERSION > tests/logs/webdriver.log &
until nc -z localhost 4444; do sleep 1; done
until nc -z localhost 4444; do sleep 1; done
2 changes: 1 addition & 1 deletion tests/e2e/api/controllers/export-data-2.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const utils = require('../../../utils');

describe('Export Data V2.0', () => {

afterAll(utils.deleteAllDocs);
afterAll(() => utils.afterEach());

describe('GET|POST /api/v2/export/reports', () => {
const docs = [{
Expand Down

0 comments on commit 0cb55a7

Please sign in to comment.