We are going to implement a test on our app using Cypress; the test signs in and then asks a question. Carry out the following steps to do so:
- Let's create a new file called qanda.js in the integration folder in the cypress folder with the following content:
describe('Ask question', () => { beforeEach(() => { cy.visit('/'); }); it('When signed in and ask a valid question, the question should successfully save', () => { });});
The describe function allows us to group a collection of tests on a feature. The first parameter is the title for the group, while the second parameter is a function that contains the tests in the group.
The it function allows us to define the actual test. The first parameter is the title ...