5 Matching Annotations
- Nov 2023
-
github.com github.com
-
// instead of visiting each page and waiting for all // the associated resources to load, we can instead // just issue a simple HTTP request and make an // assertion about the response body cy.request('/admin') .its('body') .should('include', '<h1>Admin</h1>')
instead of cy.visit
-
- Jun 2021
-
docs.gitlab.com docs.gitlab.com
-
These tests should be isolated as much as possible. For example, model methods that don’t do anything with the database shouldn’t need a DB record. Classes that don’t need database records should use stubs/doubles as much as possible.
-
-
docs.gitlab.com docs.gitlab.com
-
A common cause of a large number of created factories is factory cascades, which result when factories create and recreate associations.
-
:js is particularly important to avoid. This must only be used if the feature test requires JavaScript reactivity in the browser. Using a headless browser is much slower than parsing the HTML response from the app.
-
Use Factory Doctor to find cases where database persistence is not needed in a given test.
-