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.