mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-06 05:22:52 +00:00
feat: improved e2e tests
This commit is contained in:
29
frontend/app/cypress/PITFALLS.md
Normal file
29
frontend/app/cypress/PITFALLS.md
Normal file
@@ -0,0 +1,29 @@
|
||||
# A list of (possibly) common pitfalls
|
||||
|
||||
## The component is not updating
|
||||
|
||||
### Calling Cypress invoke will not trigger change detection
|
||||
|
||||
Rewrite
|
||||
|
||||
```typescript
|
||||
cy.get('component-selector').component().invoke('someFunction');
|
||||
```
|
||||
|
||||
Into
|
||||
|
||||
```typescript
|
||||
cy.get('component-selector')
|
||||
.component()
|
||||
.runInsideAngular(component => component.someFunction());
|
||||
```
|
||||
|
||||
## The backend is unreachable
|
||||
|
||||
See `BACKEND.md`, direct calls to backend are prohibited.
|
||||
|
||||
## The search page doesn't work
|
||||
|
||||
Run `cy.patchSearchPage()` after visiting the search page.
|
||||
It set the due time to zero so that the component
|
||||
won't wait for someone to type more.
|
||||
Reference in New Issue
Block a user