diff --git a/Dockerfile b/Dockerfile index 19d94214..e6dfa9a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,5 +44,5 @@ RUN yarn run build:stable # # run # -ENTRYPOINT ["/trezor-wallet/test/docker/run-all.sh"] +ENTRYPOINT ["/trezor-wallet/test/scripts/run-all.sh"] EXPOSE 8080 21325 \ No newline at end of file diff --git a/package.json b/package.json index 2513ad4f..0afc5157 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "test": "run-s test:*", "test:unit": "npx jest", "test-unit:watch": "npx jest -o --watch", - "test-integration:dev": "npx cypress open", + "test-integration:dev": "npx cypress open -c baseUrl=https://localhost:8080/#/", "test-integration:test": "npx cypress run", "test-integration:gitlab": "npx cypress run -c baseUrl=https://localhost:8080/#/", "server:beta": "node ./server/index.js --buildType=beta", @@ -72,6 +72,7 @@ "redux-logger": "^3.0.6", "redux-raven-middleware": "^1.2.0", "redux-thunk": "^2.2.0", + "request": "^2.88.0", "rimraf": "^2.6.2", "styled-components": "^4.1.2", "styled-normalize": "^8.0.4", diff --git a/src/components/DeviceHeader/index.js b/src/components/DeviceHeader/index.js index c09a9f63..a28fca79 100644 --- a/src/components/DeviceHeader/index.js +++ b/src/components/DeviceHeader/index.js @@ -108,7 +108,7 @@ const DeviceHeader = ({ return ( ( - +

Your device is not initialized

Please use Bitcoin wallet interface to start initialization process diff --git a/test/integration/device/not-initialized.js b/test/integration/device/not-initialized.js new file mode 100644 index 00000000..68ba8c14 --- /dev/null +++ b/test/integration/device/not-initialized.js @@ -0,0 +1,18 @@ +describe('Not initialized page', () => { + beforeEach(() => { + cy.viewport(1366, 768); + cy.visit('/'); + }); + + it('header', () => { + cy.getTestElement('Main__page__device__header') + .should('be.visible') + .matchImageSnapshot(); + }); + + it('body', () => { + cy.getTestElement('Page__device__not__initialized') + .should('be.visible') + .matchImageSnapshot(); + }); +}); \ No newline at end of file diff --git a/test/integration/left-menu.js b/test/integration/left-menu.js deleted file mode 100644 index ec8909e2..00000000 --- a/test/integration/left-menu.js +++ /dev/null @@ -1,11 +0,0 @@ -describe('Left Menu', () => { - // beforeEach(() => { - // cy.getTestElement('Modal__disclaimer__button__confirm').click(); - // }); - - it('divider', () => { - cy.getTestElement('Main__page__coin__menu__divider') - .should('be.visible') - .matchImageSnapshot(); - }); -}); \ No newline at end of file diff --git a/test/docker/run-all.sh b/test/scripts/run-all.sh similarity index 100% rename from test/docker/run-all.sh rename to test/scripts/run-all.sh diff --git a/test/snapshots/All Specs/Left Menu -- divider.snap.png b/test/snapshots/All Specs/Left Menu -- divider.snap.png deleted file mode 100644 index d4405d75..00000000 Binary files a/test/snapshots/All Specs/Left Menu -- divider.snap.png and /dev/null differ diff --git a/test/snapshots/All Specs/Not initialized page -- body.snap.png b/test/snapshots/All Specs/Not initialized page -- body.snap.png new file mode 100644 index 00000000..1f964f9d Binary files /dev/null and b/test/snapshots/All Specs/Not initialized page -- body.snap.png differ diff --git a/test/snapshots/All Specs/Not initialized page -- header.snap.png b/test/snapshots/All Specs/Not initialized page -- header.snap.png new file mode 100644 index 00000000..452c2695 Binary files /dev/null and b/test/snapshots/All Specs/Not initialized page -- header.snap.png differ diff --git a/yarn.lock b/yarn.lock index a7d63c5a..a76227b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8963,7 +8963,7 @@ request@2.87.0, request@^2.87.0: tunnel-agent "^0.6.0" uuid "^3.1.0" -request@^2.79.0: +request@^2.79.0, request@^2.88.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" dependencies: