Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .vsts/win/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ steps:
- powershell: |
. .vsts/win/exec.ps1
$ErrorActionPreference = "Stop"
$env:SPECTRON_AAD_USER_EMAIL = "$(uiTestingAccountEmail)"
$env:SPECTRON_AAD_USER_PASSWORD = "$(uiTestingAccountPassword)"
npm run spectron
displayName: Running spectron
$env:BE_TEST_AAD_USER_EMAIL = "$(uiTestingAccountEmail)"
$env:BE_TEST_AAD_USER_PASSWORD = "$(uiTestingAccountPassword)"
npm run test-e2e
displayName: Running end to end tests

- template: ./security-analysis.yml

Expand Down
36 changes: 36 additions & 0 deletions docs/e2etests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Run end-to-end test with Playwright

[Playwright](https://playwright.dev) is a framework for web application end-to-end (e2e) testing.

When to use e2e tests vs unit tests:

* Test functionality that cannot be tested with the unit test mocking APIs
* Test multi window interaction

## Prerequisite

* Set `BE_TEST_AAD_USER_EMAIL` with the user email
* Set `BE_TEST_AAD_USER_PASSWORD` with the user password

Build the executable

```bash
npm run build-and-pack
```

## Run

```bash
npm run test-e2e

# Run Playwright in debug mode to step through tests
npm run test-e2e:debug
```

## Write tests

End-to-end tests are in the `test/e2e` directory

## Issues with Playwright

* Currently doesn't test the final built package, but rather the stock Electron executable.
2 changes: 1 addition & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* [Components](components.md)
* [Models](models.md)
* [Testing](testing.md)
* [Spectron E2E tests](spectron.md)
* [E2E tests](e2etests.md)
* [Controls](core/Readme.md)

## How to
Expand Down
36 changes: 0 additions & 36 deletions docs/run-spectron.md

This file was deleted.

Loading