Added tests for initialize device

pull/311/head
Vladimir Volek 5 years ago
parent 3427d6ea0c
commit 62fbb491d8

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

@ -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",

@ -108,7 +108,7 @@ const DeviceHeader = ({
return (
<Wrapper
isSelected={isSelected}
data-test-id={testId}
data-test={testId}
isOpen={isOpen}
isHoverable={isHoverable}
disabled={disabled}

@ -26,7 +26,7 @@ const StyledParagraph = styled(Paragraph)`
`;
const Initialize = () => (
<Wrapper>
<Wrapper data-test="Page__device__not__initialized">
<Row>
<H1>Your device is not initialized</H1>
<StyledParagraph>Please use Bitcoin wallet interface to start initialization process</StyledParagraph>

@ -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();
});
});

@ -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();
});
});

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

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

Loading…
Cancel
Save