Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "The cy.intercept()
command listens to XHR responses and knows when Cypress has returned a response for a specific XHR request."
A block of code is set as follows:
it('can wait for a comment response', () => { Â Â Â Â Â Â cy.request('https://jsonplaceholder.cypress.io/comments/6') Â Â Â Â .as('sixthComment'); Â Â Â Â Â Â cy.get('@sixthComment').should((response) => { Â Â Â Â Â Â Â Â expect(response.body.id).to.eq(6) Â Â Â Â }); });
Any command-line input or output is written as follows:
npm run cypress:open
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "To do this, open the browser console in your browser and click the Network tab, and then select the XHR filter option."
Tips or important notes
Appear like this.