Skip to content
Merged
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
2 changes: 1 addition & 1 deletion apps/meteor/tests/e2e/07-emoji.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { test, expect } from '@playwright/test';
import { SideNav, MainContent, LoginPage } from './pageobjects';
import { adminLogin } from './utils/mocks/userAndPasswordMock';

test.describe('[Emoji]', function () {
test.describe('[Emoji]', () => {
let loginPage: LoginPage;
let mainContent: MainContent;
let sideNav: SideNav;
Expand Down
42 changes: 42 additions & 0 deletions apps/meteor/tests/e2e/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# E2E Testing with playwright

## Running tests
The application must be started with `TEST_MODE=true`

```sh
$ TEST_MODE=true yarn dev
```

Then we can run a single suite with

```sh
$ yarn test:playwright ./tests/e2e/01-forgot-password.spec.ts
```

Or all the tests with

```sh
$ yarn test:playwright
```

We can also provide some env vars to `test:playwright` script:
- `BASE_URL=<any_url>` Run the tests to the given url
- `PWDEBUG=1` Controll the test execution

## Current limitations
- 00-wizard.spec.ts will only pass if the database is empty
- There are some dependencies between tests, so we can't run the suites in parallel

## Page Objects
- Any locator name must start with of one the following prefixes: `btn`, `link`, `input`, `select`, `checkbox`, `text`
- Any action name should starts with the prefix `do`

## Important links
- [playwright docs](https://playwright.dev/docs/intro)

## Assertions
Checking if a element is visible

```ts
await expect(anyElement).toBeVisible();
```