Browse Source

fix(tests): new snapshots and remove nav test

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
f0484c815c
  1. 1
      app/app.global.scss
  2. 6
      app/components/Contacts/Network.scss
  3. 2
      app/components/LoadingBolt/LoadingBolt.scss
  4. 30
      test/components/Nav.spec.js
  5. 72
      test/reducers/__snapshots__/channels.spec.js.snap

1
app/app.global.scss

@ -17,6 +17,7 @@ body {
margin: 0; margin: 0;
padding: 0; padding: 0;
color: #333; color: #333;
height: 100vh;
box-sizing: border-box; box-sizing: border-box;
-webkit-font-smoothing: antialiased; -webkit-font-smoothing: antialiased;
-webkit-tap-highlight-color: rgba(255,255,255,0); -webkit-tap-highlight-color: rgba(255,255,255,0);

6
app/components/Contacts/Network.scss

@ -69,11 +69,11 @@
&.active { &.active {
display: block; display: block;
position: absolute; position: absolute;
bottom: -80px; bottom: -100px;
z-index: 10; z-index: 10;
li { li {
margin: 5px 0; margin: 10px 0;
cursor: pointer; cursor: pointer;
color: $white; color: $white;
@ -102,7 +102,7 @@
} }
.fade { .fade {
opacity: 0.15; opacity: 0.1;
} }
.channel { .channel {

2
app/components/LoadingBolt/LoadingBolt.scss

@ -7,7 +7,7 @@
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
background: $white; background: $spaceblue;
text-align: center; text-align: center;
} }

30
test/components/Nav.spec.js

@ -1,30 +0,0 @@
import React from 'react'
import { shallow } from 'enzyme'
import { NavLink } from 'react-router-dom'
import Nav from 'components/Nav'
const defaultProps = {
ticker: {
currency: 'usd',
crypto: 'btc'
},
balance: {},
setCurrency: () => {},
currentTicker: {},
openPayForm: () => {},
openRequestForm: () => {}
}
describe('default elements', () => {
const props = { ...defaultProps }
const el = shallow(<Nav {...props} />)
it('should render nav links', () => {
expect(el.find(NavLink).at(0).props().to).toBe('/')
expect(el.find(NavLink).at(1).props().to).toBe('/contacts')
})
it('should render buttons', () => {
expect(el.find('.button').at(0).text()).toContain('Pay')
expect(el.find('.button').at(1).text()).toContain('Request')
})
})

72
test/reducers/__snapshots__/channels.spec.js.snap

@ -19,29 +19,29 @@ Object {
}, },
"filter": Object { "filter": Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
"filterPulldown": false, "filterPulldown": false,
"filters": Array [ "filters": Array [
Object { Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
Object { Object {
"key": "ACTIVE_CHANNELS", "key": "ACTIVE_CHANNELS",
"name": "Online Contacts", "name": "Online",
}, },
Object { Object {
"key": "NON_ACTIVE_CHANNELS", "key": "NON_ACTIVE_CHANNELS",
"name": "Offline Contacts", "name": "Offline",
}, },
Object { Object {
"key": "OPEN_PENDING_CHANNELS", "key": "OPEN_PENDING_CHANNELS",
"name": "Pending Contacts", "name": "Pending",
}, },
Object { Object {
"key": "CLOSING_PENDING_CHANNELS", "key": "CLOSING_PENDING_CHANNELS",
"name": "Closing Contacts", "name": "Closing",
}, },
], ],
"loadingChannelPubkeys": Array [], "loadingChannelPubkeys": Array [],
@ -76,29 +76,29 @@ Object {
}, },
"filter": Object { "filter": Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
"filterPulldown": false, "filterPulldown": false,
"filters": Array [ "filters": Array [
Object { Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
Object { Object {
"key": "ACTIVE_CHANNELS", "key": "ACTIVE_CHANNELS",
"name": "Online Contacts", "name": "Online",
}, },
Object { Object {
"key": "NON_ACTIVE_CHANNELS", "key": "NON_ACTIVE_CHANNELS",
"name": "Offline Contacts", "name": "Offline",
}, },
Object { Object {
"key": "OPEN_PENDING_CHANNELS", "key": "OPEN_PENDING_CHANNELS",
"name": "Pending Contacts", "name": "Pending",
}, },
Object { Object {
"key": "CLOSING_PENDING_CHANNELS", "key": "CLOSING_PENDING_CHANNELS",
"name": "Closing Contacts", "name": "Closing",
}, },
], ],
"loadingChannelPubkeys": Array [], "loadingChannelPubkeys": Array [],
@ -136,29 +136,29 @@ Object {
}, },
"filter": Object { "filter": Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
"filterPulldown": false, "filterPulldown": false,
"filters": Array [ "filters": Array [
Object { Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
Object { Object {
"key": "ACTIVE_CHANNELS", "key": "ACTIVE_CHANNELS",
"name": "Online Contacts", "name": "Online",
}, },
Object { Object {
"key": "NON_ACTIVE_CHANNELS", "key": "NON_ACTIVE_CHANNELS",
"name": "Offline Contacts", "name": "Offline",
}, },
Object { Object {
"key": "OPEN_PENDING_CHANNELS", "key": "OPEN_PENDING_CHANNELS",
"name": "Pending Contacts", "name": "Pending",
}, },
Object { Object {
"key": "CLOSING_PENDING_CHANNELS", "key": "CLOSING_PENDING_CHANNELS",
"name": "Closing Contacts", "name": "Closing",
}, },
], ],
"loadingChannelPubkeys": Array [], "loadingChannelPubkeys": Array [],
@ -191,29 +191,29 @@ Object {
}, },
"filter": Object { "filter": Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
"filterPulldown": false, "filterPulldown": false,
"filters": Array [ "filters": Array [
Object { Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
Object { Object {
"key": "ACTIVE_CHANNELS", "key": "ACTIVE_CHANNELS",
"name": "Online Contacts", "name": "Online",
}, },
Object { Object {
"key": "NON_ACTIVE_CHANNELS", "key": "NON_ACTIVE_CHANNELS",
"name": "Offline Contacts", "name": "Offline",
}, },
Object { Object {
"key": "OPEN_PENDING_CHANNELS", "key": "OPEN_PENDING_CHANNELS",
"name": "Pending Contacts", "name": "Pending",
}, },
Object { Object {
"key": "CLOSING_PENDING_CHANNELS", "key": "CLOSING_PENDING_CHANNELS",
"name": "Closing Contacts", "name": "Closing",
}, },
], ],
"loadingChannelPubkeys": Array [], "loadingChannelPubkeys": Array [],
@ -248,29 +248,29 @@ Object {
}, },
"filter": Object { "filter": Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
"filterPulldown": false, "filterPulldown": false,
"filters": Array [ "filters": Array [
Object { Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
Object { Object {
"key": "ACTIVE_CHANNELS", "key": "ACTIVE_CHANNELS",
"name": "Online Contacts", "name": "Online",
}, },
Object { Object {
"key": "NON_ACTIVE_CHANNELS", "key": "NON_ACTIVE_CHANNELS",
"name": "Offline Contacts", "name": "Offline",
}, },
Object { Object {
"key": "OPEN_PENDING_CHANNELS", "key": "OPEN_PENDING_CHANNELS",
"name": "Pending Contacts", "name": "Pending",
}, },
Object { Object {
"key": "CLOSING_PENDING_CHANNELS", "key": "CLOSING_PENDING_CHANNELS",
"name": "Closing Contacts", "name": "Closing",
}, },
], ],
"loadingChannelPubkeys": Array [], "loadingChannelPubkeys": Array [],
@ -305,29 +305,29 @@ Object {
}, },
"filter": Object { "filter": Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
"filterPulldown": false, "filterPulldown": false,
"filters": Array [ "filters": Array [
Object { Object {
"key": "ALL_CHANNELS", "key": "ALL_CHANNELS",
"name": "All Contacts", "name": "All",
}, },
Object { Object {
"key": "ACTIVE_CHANNELS", "key": "ACTIVE_CHANNELS",
"name": "Online Contacts", "name": "Online",
}, },
Object { Object {
"key": "NON_ACTIVE_CHANNELS", "key": "NON_ACTIVE_CHANNELS",
"name": "Offline Contacts", "name": "Offline",
}, },
Object { Object {
"key": "OPEN_PENDING_CHANNELS", "key": "OPEN_PENDING_CHANNELS",
"name": "Pending Contacts", "name": "Pending",
}, },
Object { Object {
"key": "CLOSING_PENDING_CHANNELS", "key": "CLOSING_PENDING_CHANNELS",
"name": "Closing Contacts", "name": "Closing",
}, },
], ],
"loadingChannelPubkeys": Array [], "loadingChannelPubkeys": Array [],

Loading…
Cancel
Save