...
Create your test file. The filename should be yourName.cy.ts.
All Cypress tests start with a describe statement, like so:
describe('My First DCB Admin Test', () => {}
This should be a concise test name. You will outline your test cases within this describe block.
Outline your individual test cases like so:
it('should add this example', () => {}
.This should be a clear description of the action or behaviour you are testing - i.e. what should happen, or what should be possible. See the existing tests and the ERM tests for examples.
We typically prefer to stub responses instead of using genuine server responses in most of our tests. There is a good official discussion and explanation here , and there is a case that certain critical pathways should test genuine server responses: however, at these early stages we are using stubs for simplicity and because they have no effect on the actual server.
Cypress has excellent documentation - make use of it when writing your tests. Many common questions can be answered by reading it.
For questions around best practice, see here. Cypress docs also include many highly useful examples.
...