From c18179e21f7d19be9c18f00f2c5f9b1375a5ba2d Mon Sep 17 00:00:00 2001 From: Jonathan Ruddell Date: Sun, 29 Sep 2019 12:55:23 -0700 Subject: [PATCH] e2e test fixes, remove dependencies provided by react-native update to macOS 10.14 list available iOS simulators in display-tools skip war packaging of backend --- azure-pipelines.yml | 6 +++--- boilerplate/app/modules/login/login.sagas.js.ejs | 2 +- boilerplate/package.json.ejs | 4 ---- boilerplate/test/spec/modules/login/login.sagas.spec.js.ejs | 2 +- test/scripts/display-tools.sh | 1 + test/scripts/package-jhipster-backend.sh | 3 ++- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index d9922b783..8ff6b66c7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,7 +2,7 @@ jobs: - job: Test pool: # note: both ios and android emulator is only available on mac-os on azure pipelines - vmImage: 'macOS-10.13' + vmImage: 'macOS-10.14' variables: SCRIPT_DIR: $BUILD_REPOSITORY_LOCALPATH/test/scripts JHI_AUTH_TYPE: jwt @@ -51,12 +51,12 @@ jobs: displayName: 'TOOLS: update NPM' - script: $(SCRIPT_DIR)/install-node-dependencies.sh displayName: 'TOOLS: install node dependencies' + - script: $(SCRIPT_DIR)/install-detox.sh + displayName: 'TOOLS: installing Detox and its dependencies' - script: $(SCRIPT_DIR)/display-tools.sh displayName: 'TOOLS: display tools' - script: $(SCRIPT_DIR)/copy-jdl-file.sh displayName: 'SETUP: copy the JDL file for the backend and app' - - script: $(SCRIPT_DIR)/install-detox.sh - displayName: 'TOOLS: installing detox CLI ' - script: npm ci && npm link displayName: 'TOOLS: npm install and link in ignite-jhipster' - script: $(SCRIPT_DIR)/generate-jhipster-backend.sh diff --git a/boilerplate/app/modules/login/login.sagas.js.ejs b/boilerplate/app/modules/login/login.sagas.js.ejs index 3e7e26f0c..d0af1e5a0 100644 --- a/boilerplate/app/modules/login/login.sagas.js.ejs +++ b/boilerplate/app/modules/login/login.sagas.js.ejs @@ -88,7 +88,7 @@ export function * login (api, { username, password }) { <%_ } _%> yield put({ type: 'RELOGIN_OK' }) } else { - yield put(LoginActions.loginFailure((response.data && response.data.detail) || 'Bad Credentials')) + yield put(LoginActions.loginFailure((response.data && response.data.detail) || 'Bad credentials')) } } <%_ } _%> diff --git a/boilerplate/package.json.ejs b/boilerplate/package.json.ejs index 30db4b465..70588da30 100644 --- a/boilerplate/package.json.ejs +++ b/boilerplate/package.json.ejs @@ -52,14 +52,11 @@ "@storybook/addons": "5.2.1", "@storybook/react-native": "5.2.1", "@storybook/theming": "5.2.1", - "@babel/core": "7.6.2", - "babel-core": "7.0.0-bridge.0", "babel-preset-env": "1.7.0", "buffer": "5.4.3", "enzyme": "3.10.0", "enzyme-adapter-react-16": "1.14.0", "ignite-jhipster": "<%= props.packageVersion %>", - "jest": "24.9.0", "@react-native-community/eslint-config": "0.0.5", <%_ if (!props.skipCommitHook) { _%> "lint-staged": "9.3.0", @@ -73,7 +70,6 @@ <%_ } _%> "mockery": "2.1.0", "react-dom": "16.8.6", - "react-test-renderer": "16.8.6", "reactotron-react-native": "4.0.0", "reactotron-redux": "3.1.2", "reactotron-redux-saga": "4.2.2", diff --git a/boilerplate/test/spec/modules/login/login.sagas.spec.js.ejs b/boilerplate/test/spec/modules/login/login.sagas.spec.js.ejs index 73c5a170a..b771f587c 100644 --- a/boilerplate/test/spec/modules/login/login.sagas.spec.js.ejs +++ b/boilerplate/test/spec/modules/login/login.sagas.spec.js.ejs @@ -95,7 +95,7 @@ test('login failure path', () => { // Attempt to login and fail expect(step(response)).toEqual(call(FixtureAPI.login, authObj)) // Send the error - expect(step(response)).toEqual(put(LoginActions.loginFailure('Bad Credentials'))) + expect(step(response)).toEqual(put(LoginActions.loginFailure('Bad credentials'))) <%_ } _%> }) <%_ if (props.authType === 'jwt' || props.authType === 'oauth2') { _%> diff --git a/test/scripts/display-tools.sh b/test/scripts/display-tools.sh index fb32cc34d..2a5ad20c3 100755 --- a/test/scripts/display-tools.sh +++ b/test/scripts/display-tools.sh @@ -10,4 +10,5 @@ npm -v #docker-compose version pwd ignite doctor +applesimutils --list env diff --git a/test/scripts/package-jhipster-backend.sh b/test/scripts/package-jhipster-backend.sh index c8c68a1a2..f0aab6c9a 100755 --- a/test/scripts/package-jhipster-backend.sh +++ b/test/scripts/package-jhipster-backend.sh @@ -9,4 +9,5 @@ ls -al git status # package the app into a WAR -./mvnw clean package -Pprod -DskipTests -ntp +# this is currently unused, todo: test with backend in prod mode +# ./mvnw clean package -Pprod -DskipTests -ntp