Skip to content

Commit ce0a548

Browse files
author
Jason Laster
committed
Improve integration docs
1 parent d742f36 commit ce0a548

2 files changed

Lines changed: 13 additions & 17 deletions

File tree

docs/integration-tests.md

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
## Integration Tests
22

3-
Debugger.html integration test are end-to-end tests that simulate a user debugging an application.
3+
![](./screenshots/cypress-runner.png)
44

5-
The tests open two browser tabs, the debuggee and debugger, and go through the steps of debugging the debuggee.
5+
The integration tests open two browser tabs, debuggee and debugger, and go through the debugging steps.
66

7-
Here's one test that pauses while creating a Todo.
7+
Here's one test that debugs todomvc:
88

99
```js
1010
debugPage("todomvc");
@@ -18,26 +18,27 @@ stepOver();
1818
stepOut();
1919
```
2020

21-
#### Helpful Information
22-
+ `public/js/test/integration` - tests folder
23-
+ `public/js/test/cypress/commands` - test commands folder
21+
The tests are driven with javascript [events](https://developer.mozilla.org/en-US/docs/Web/API/Document/createEvent)
22+
like click, keypress, or change that simulate a user interacting with the debugger. All of the events are wrapped with
23+
debugger specific commands like `stepIn` or `selectSource` [commands](https://github.com/jlongster/debugger.html/blob/master/public/js/test/cypress/commands/debugger.js#L110-L112).
2424

2525
#### Running tests
2626
+ `npm run firefox` - launch firefox
2727
+ `cypress run` - runs tests headlessly
2828
+ `cypress open` - opens cypress app
29+
+ `public/js/test/integration` - tests folder
30+
+ `public/js/test/cypress/commands` - test commands folder
31+
2932

30-
**Installing Cypress**
31-
Cypress needs to be installed before tests can be run.
33+
### Installing Cypress
3234

3335
```bash
3436
npm install -g cypress-cli
3537
cypress install
3638
```
3739

38-
[More Information](https://docs.cypress.io/docs/installing-and-running)
39-
40-
Notes:
40+
**Notes:**
41+
+ [Install Steps](https://docs.cypress.io/docs/installing-and-running)
4142
+ It's helpful to close the firefox debugger in other tabs as it might cause the tests to miss a firefox message.
4243
+ You can also test chrome by opening chrome and enabling the chrome test in `todomvc.js`.
4344

@@ -63,12 +64,7 @@ We use Cypress to generate the fixtures that are used in the unit tests and stor
6364
+ `public/js/test/integration/fixtures.js` - fixtures file
6465
+ `public/js/test/fixtures` - Fixture folder
6566

66-
Steps:
67+
**Steps:**
6768
+ start the cypress server to save the fixtures - `node bin/cypress-server`
6869
+ enable the fixture tests - change `xdescribe` to `describe` in [fixtures.js](../public/js/test/integration/fixtures.js).
6970
+ run cypress - `cypress run`
70-
71-
72-
#### Screenshots
73-
74-
![](./screenshots/cypress-runner.png)
-69.6 KB
Loading

0 commit comments

Comments
 (0)