Test Plain Or Markdown File Using Cypress

1 ยท Gleb Bahmutov ยท Sept. 9, 2021, 6:09 a.m.
Let's imagine a web server that also returns a plain text file. We are already testing the web pages using Cypress test runner, so how can we request and validate the plain text file? What if the returned file is in Markdown format? Let's learn.๐ŸŽ You can find the source code for the application and the Cypress tests in the repo bahmutov/check-text-file-example.Requesting the fileTo download the file we can use the cy.request command.spec.js123456/// <reference types="cypress" />it('receives the ...