cuddly-notebook-88094
12/05/2022, 10:47 PMcy.fixture('example.csv', 'utf8')
.then(csvContent => {
// Select the file input element on the page
cy.get('#file-input')
// Trigger a 'change' event on the element with the CSV file content
.trigger('change', { target: { files: [csvContent] } })
// Assert that the file has been uploaded successfully
.then(() => {
cy.get('#upload-status')
.should('have.text', 'File uploaded successfully')
});
});