You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[#736] Fixes Nightwatch setup and instructions, and re-enables in Cir… (#740)
* [#736] Fixes Nightwatch setup and instructions, and re-enables in CircleCI
* [#736] Try a different base url
* [#736] Install Chromium
* [#736] Install google chrome
* Update README.md
Co-Authored-By: Daniel Wehner <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+12-18Lines changed: 12 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,6 @@ This is an admin UI for Drupal, built with JavaScript and based on [create-react
25
25
26
26
## Installation
27
27
28
-
### Drupal
29
-
30
28
Ensure that you currently have nothing running on port 80 (e.g. a local webserver) or port 3000 (e.g. a local node process). You can run ` lsof -i :80 -S` to see what you currently have running.
31
29
32
30
```
@@ -57,18 +55,22 @@ Open the one time login link in your browser to log into Drupal. You will then h
57
55
|http://127.0.0.1| Regular Drupal installation / JSON API endpoints |
58
56
|http://127.0.0.1/admin/content| A page taken over by the new admin UI. This uses the bundled version from `packages/admin-ui/build`, run `yarn workspace admin-ui build` in the node container to re-build |
59
57
60
-
### Admin UI
58
+
##Development
61
59
62
60
`yarn workspace @drupal/admin-ui start` will start the Webpack dev sever that comes with [Create React App](https://facebook.github.io/create-react-app).
63
61
62
+
### Testing
63
+
64
+
We have functional testing with [Nightwatch](http://nightwatchjs.org/), and component/unit testing with [Jest](https://jestjs.io/).
65
+
66
+
When deciding which system to use to add test coverage, the general rule is Nightwatch should be used to test the common path, and Jest can be used for more detailed test coverage. Nightwatch tests will run slower as they simulate clicking around in a real browser.
67
+
64
68
#### Nightwatch
65
69
- If you don't know the password for admin, change it with `docker exec -it drupal_admin_ui_drupal drush user:password admin admin`
66
-
- Run `docker exec -it -e REACT_APP_DRUPAL_BASE_URL=http://drupal drupal_admin_ui_node yarn workspace admin-ui build`, which
67
-
creates a build that uses `http://drupal` as it's base URL, which is the URL that the node container sees Drupal on internally.
or `docker exec -it -e REACT_APP_DRUPAL_BASE_URL=http://drupal -e NIGHTWATCH_LOGIN_admin_PASSWORD=admin drupal_admin_ui_node yarn test` to run all tests
70
-
- When you're finished, restore the regular build if you want to browse the compiled version in your browser with `docker exec -it drupal_admin_ui_node yarn workspace admin-ui build`.
71
-
This will also be restored when you restart your containers.
70
+
- Update your `.env.local` file, setting `NIGHTWATCH_LOGIN_admin_PASSWORD` to the password you set above e.g. `NIGHTWATCH_LOGIN_admin_PASSWORD=admin`
71
+
- If you want to test against the current JS, not the production build change set `NIGHTWATCH_URL=http://127.0.0.1:3000` in the `.env.local` file.
72
+
- Run `yarn workspace @drupal/admin-ui build`, which creates a new production build to test.
73
+
- Run `yarn workspace @drupal/admin-ui nightwatch` or `yarn test` to run all tests
72
74
73
75
#### React AXE
74
76
@@ -78,15 +80,7 @@ Due to outstanding performance issues, `react-axe` is behind a flag. To enable t
We have functional testing with [Nightwatch](http://nightwatchjs.org/), and component/unit testing with [Jest](https://jestjs.io/).
86
-
87
-
When deciding which system to use to add test coverage, the general rule is Nightwatch should be used to test the common path, and Jest can be used for more detailed test coverage. Nightwatch tests will run slower as they simulate clicking around in a real browser.
88
-
89
-
## Contributing to This Repository
83
+
### Contributing to This Repository
90
84
91
85
-[Fork this repo](https://help.github.com/articles/fork-a-repo/) to your own user
92
86
- Set your fork as origin, and this repo as upstream. From inside the `drupal-admin-ui` folder:
0 commit comments