File tree Expand file tree Collapse file tree 6 files changed +88
-3
lines changed Expand file tree Collapse file tree 6 files changed +88
-3
lines changed Original file line number Diff line number Diff line change @@ -25,3 +25,4 @@ yarn-debug.log*
25
25
yarn-error.log *
26
26
27
27
android /.idea /
28
+ reports /
Original file line number Diff line number Diff line change @@ -106,4 +106,20 @@ Run unit tests:
106
106
npm test
107
107
```
108
108
109
+ Run e2e tests:
110
+ 1 . Start the apps dev server:
111
+ ``` bash
112
+ npm run serve
113
+ ```
114
+
115
+ 2 . Start selenium
116
+ ``` bash
117
+ npm run selenium
118
+ ```
119
+
120
+ 3 . Run the tests
121
+ ``` bash
122
+ npm run e2e
123
+ ```
124
+
109
125
[ ![ CodeFactor] ( https://www.codefactor.io/repository/github/nerdic-coder/block-photos/badge/master )] ( https://www.codefactor.io/repository/github/nerdic-coder/block-photos/overview/master )
Original file line number Diff line number Diff line change
1
+ {
2
+ "src_folders" : [" tests" ],
3
+ "output_folder" : " reports" ,
4
+ "custom_commands_path" : " " ,
5
+ "custom_assertions_path" : " " ,
6
+ "page_objects_path" : " " ,
7
+ "globals_path" : " " ,
8
+
9
+ "selenium" : {
10
+ "start_process" : false ,
11
+ "server_path" : " " ,
12
+ "log_path" : " " ,
13
+ "port" : 4444 ,
14
+ "cli_args" : {
15
+ "webdriver.chrome.driver" : " " ,
16
+ "webdriver.gecko.driver" : " " ,
17
+ "webdriver.edge.driver" : " "
18
+ }
19
+ },
20
+
21
+ "test_settings" : {
22
+ "default" : {
23
+ "launch_url" : " https://localhost:9876" ,
24
+ "selenium_port" : 4444 ,
25
+ "selenium_host" : " localhost" ,
26
+ "silent" : true ,
27
+ "screenshots" : {
28
+ "enabled" : false ,
29
+ "path" : " "
30
+ },
31
+ "desiredCapabilities" : {
32
+ "browserName" : " chrome" ,
33
+ "marionette" : true
34
+ }
35
+ },
36
+ "chrome" : {
37
+ "desiredCapabilities" : {
38
+ "browserName" : " chrome" ,
39
+ "chromeOptions" : {
40
+ "args" : [" --no-sandbox --user-data-dir=E:\\ workspaces\\ block-photos\\ tests\\ session" ]
41
+ }
42
+ }
43
+ },
44
+
45
+ "edge" : {
46
+ "desiredCapabilities" : {
47
+ "browserName" : " MicrosoftEdge"
48
+ }
49
+ }
50
+ }
51
+ }
Original file line number Diff line number Diff line change 28
28
"start:react" : " react-scripts start" ,
29
29
"build:react" : " react-scripts build" ,
30
30
"test" : " react-scripts test" ,
31
- "e2e" : " nightwatch"
31
+ "e2e" : " nightwatch" ,
32
+ "selenium" : " selenium-standalone install && selenium-standalone start"
32
33
},
33
34
"config" : {
34
35
"forge" : {
145
146
"react-router-dom" : " ^4.3.1" ,
146
147
"react-router-modal" : " 1.5.2" ,
147
148
"react-scripts" : " 2.1.1" ,
149
+ "selenium-standalone" : " ^6.15.4" ,
148
150
"style-loader" : " ^0.23.1" ,
149
151
"uniqid" : " 5.0.3" ,
150
152
"url-loader" : " 1.1.2" ,
Original file line number Diff line number Diff line change
1
+ module . exports = {
2
+ 'Signin' : function ( browser ) {
3
+ browser
4
+ . url ( 'http://localhost:9876' )
5
+ . waitForElementVisible ( 'body' , 1000 )
6
+ // .setValue('input[type=text]', 'nightwatch')
7
+ // .waitForElementVisible('button[name=btnG]', 1000)
8
+ // .click('button[name=btnG]')
9
+ . assert . containsText ( 'ion-title' , 'Block Photos' )
10
+ . assert . containsText ( 'h1' , 'Welcome to Block Photos!' )
11
+ . assert . containsText ( 'ion-button' , 'SIGN IN WITH BLOCKSTACK' )
12
+ . click ( 'ion-button' )
13
+ // .assert.containsText('#main', 'Night Watch')
14
+ . end ( ) ;
15
+ }
16
+ } ;
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ const WorkboxPlugin = require('workbox-webpack-plugin');
9
9
10
10
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
11
11
12
-
13
12
let PUBLIC_PATH = './' ;
14
13
15
14
process . argv . forEach ( function ( val ) {
@@ -35,7 +34,7 @@ module.exports = {
35
34
publicPath : PUBLIC_PATH
36
35
} ,
37
36
devServer : {
38
- https : true ,
37
+ https : false ,
39
38
historyApiFallback : {
40
39
disableDotRule : true
41
40
} ,
You can’t perform that action at this time.
0 commit comments