Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 1f94a31

Browse files
committed
Merge branch 'release/0.36.0'
2 parents 6805a07 + ed2864a commit 1f94a31

File tree

81 files changed

+11362
-16842
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+11362
-16842
lines changed

.circleci/config.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/node:8.12.0
5+
- image: circleci/node:10.15.1
66
working_directory: ~/repo
77
steps:
88
- checkout
@@ -13,3 +13,47 @@ jobs:
1313
- run: npm run test
1414
# build
1515
- run: npm run prod-webapp
16+
test-e2e-login:
17+
docker:
18+
- image: circleci/node:10.15.1
19+
environment:
20+
TEST_E2E_GREP: login-to-hello-blockstack-app
21+
working_directory: ~/repo
22+
steps:
23+
- checkout
24+
- run: npm install
25+
- run: npm run test-e2e:browserstack
26+
- store_artifacts:
27+
path: /tmp/test-errors
28+
test-e2e-account-creation:
29+
docker:
30+
- image: circleci/node:10.15.1
31+
environment:
32+
TEST_E2E_GREP: account-creation
33+
working_directory: ~/repo
34+
steps:
35+
- checkout
36+
- run: npm install
37+
- run: npm run test-e2e:browserstack
38+
- store_artifacts:
39+
path: /tmp/test-errors
40+
test-e2e-account-recovery:
41+
docker:
42+
- image: circleci/node:10.15.1
43+
environment:
44+
TEST_E2E_GREP: account-recovery
45+
working_directory: ~/repo
46+
steps:
47+
- checkout
48+
- run: npm install
49+
- run: npm run test-e2e:browserstack
50+
- store_artifacts:
51+
path: /tmp/test-errors
52+
workflows:
53+
version: 2
54+
build_and_test-e2e:
55+
jobs:
56+
- build
57+
- test-e2e-login
58+
- test-e2e-account-creation
59+
- test-e2e-account-recovery

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# top-most EditorConfig file
2+
root = true
3+
4+
[*.{js,ts,json}]
5+
charset = utf-8
6+
end_of_line = lf
7+
insert_final_newline = true
8+
indent_style = space
9+
indent_size = 2

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ test/store/*
1313
test/utils/a*
1414
test/utils/e*
1515
test/utils/n*
16+
test-e2e/*
1617

1718
app/js/profiles/components/VerificationInfo*

.flowconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
.*/node_modules/.*
1515
.*/build/.*
1616
.*/dist/.*
17+
.*/test-e2e/*
1718

1819
[include]
1920

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,5 @@ native/windows/BlockstackSetup/bin/
4848
native/macos/Blockstack/Blockstack/server/corsproxy.js
4949
native/macos/Blockstack/Blockstack/server/blockstackProxy.js
5050
native/macos/Blockstack/Blockstack/server/node
51+
screenshot-failed*
52+
screenshot.png

.vscode/launch.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"name": "Mocha e2e local",
11+
"cwd": "${workspaceFolder}",
12+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
13+
"env": {
14+
"E2E_BROWSER_HOST": "./build"
15+
},
16+
"args": [
17+
"--opts",
18+
"test-e2e/mocha.opts",
19+
"test-e2e"
20+
],
21+
"console": "internalConsole",
22+
"internalConsoleOptions": "openOnSessionStart"
23+
},
24+
{
25+
"type": "node",
26+
"request": "launch",
27+
"name": "Mocha e2e browserstack",
28+
"cwd": "${workspaceFolder}",
29+
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
30+
"env": {
31+
"USE_BROWSERSTACK": "true",
32+
"E2E_BROWSER_HOST": "./build"
33+
},
34+
"args": [
35+
"--opts",
36+
"test-e2e/mocha.opts",
37+
"test-e2e"
38+
],
39+
"console": "integratedTerminal",
40+
"internalConsoleOptions": "neverOpen"
41+
},
42+
{
43+
"type": "node",
44+
"request": "launch",
45+
"name": "Mocha e2e run parallel",
46+
"cwd": "${workspaceFolder}",
47+
"program": "${workspaceFolder}/test-e2e/run-parallel.js",
48+
"env": {
49+
"USE_BROWSERSTACK": "true",
50+
"E2E_BROWSER_HOST": "./build"
51+
},
52+
"console": "integratedTerminal",
53+
"internalConsoleOptions": "neverOpen"
54+
}
55+
]
56+
}
17.9 KB
Loading
25.1 KB
Loading

app/js/App.js

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ import {
1515
import { SanityActions } from './store/sanity'
1616
import { CURRENT_VERSION } from './store/reducers'
1717
import { isCoreEndpointDisabled } from './utils/window-utils'
18-
import { openInNewTab } from './utils'
1918
import Modal from 'react-modal'
2019
import NotificationsSystem from 'reapop'
2120
import NotificationsTheme from 'reapop-theme-wybo'
2221
import { hot } from 'react-hot-loader'
22+
import { selectLastUpdatedApps } from './store/apps/selectors'
2323

2424
import log4js from 'log4js'
2525

@@ -38,17 +38,19 @@ function mapStateToProps(state) {
3838
coreApiPasswordValid: state.sanity.coreApiPasswordValid,
3939
walletPaymentAddressUrl: state.settings.api.walletPaymentAddressUrl,
4040
coreAPIPassword: state.settings.api.coreAPIPassword,
41-
instanceIdentifier: state.apps.instanceIdentifier
41+
instanceIdentifier: state.apps.instanceIdentifier,
42+
lastUpdatedApps: selectLastUpdatedApps(state)
4243
}
4344
}
4445

45-
function mapDispatchToProps(dispatch) {
46+
const mapDispatchToProps = dispatch => {
4647
return bindActionCreators(
4748
{
4849
updateApi: SettingsActions.updateApi,
4950
isCoreRunning: SanityActions.isCoreRunning,
5051
isCoreApiPasswordValid: SanityActions.isCoreApiPasswordValid,
51-
generateInstanceIdentifier: AppsActions.generateInstanceIdentifier
52+
generateInstanceIdentifier: AppsActions.generateInstanceIdentifier,
53+
doFetchApps: AppsActions.doFetchApps
5254
},
5355
dispatch
5456
)
@@ -71,12 +73,14 @@ class AppContainer extends Component {
7173
isCoreRunning: PropTypes.func.isRequired,
7274
isCoreApiPasswordValid: PropTypes.func.isRequired,
7375
generateInstanceIdentifier: PropTypes.func.isRequired,
76+
doFetchApps: PropTypes.func.isRequired,
7477
walletPaymentAddressUrl: PropTypes.string.isRequired,
7578
coreAPIPassword: PropTypes.string,
7679
stateVersion: PropTypes.number,
7780
router: PropTypes.object.isRequired,
7881
location: PropTypes.object.isRequired,
79-
instanceIdentifier: PropTypes.string
82+
instanceIdentifier: PropTypes.string,
83+
lastUpdatedApps: PropTypes.number
8084
}
8185

8286
constructor(props) {
@@ -160,6 +164,14 @@ class AppContainer extends Component {
160164
search: this.props.location.search
161165
})
162166
}
167+
168+
if (
169+
!this.props.lastUpdatedApps ||
170+
Date.now() - this.props.lastUpdatedApps > 900000 // 15 min
171+
) {
172+
// Fetch those apps if data is state
173+
this.props.doFetchApps()
174+
}
163175
}
164176

165177
componentWillReceiveProps(nextProps) {
@@ -171,6 +183,7 @@ class AppContainer extends Component {
171183

172184
if (!this.props.coreApiRunning) {
173185
// TODO connect to future notification system here
186+
// TODO is this even used anymore?
174187
logger.error('Sanity check: Error! Core API is NOT running!')
175188
}
176189

@@ -192,10 +205,6 @@ class AppContainer extends Component {
192205
}
193206
}
194207

195-
onSupportClick = () => {
196-
openInNewTab('https://forum.blockstack.org/t/frequently-ask-questions/2123')
197-
}
198-
199208
closeModal() {
200209
this.setState({ modalIsOpen: false })
201210
}

0 commit comments

Comments
 (0)