mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-02 04:56:57 +00:00
test: cy views-test suite
Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com>
This commit is contained in:
@@ -401,6 +401,25 @@ export class _mainPage {
|
||||
});
|
||||
};
|
||||
|
||||
downloadAndVerifyCsvFromSharedView = (filename, verifyCsv) => {
|
||||
cy.get(".nc-actions-menu-btn").click();
|
||||
cy.get('.nc-project-menu-item').contains('Download as CSV').should('exist').click();
|
||||
|
||||
cy.toastWait("Successfully exported all table data").then(() => {
|
||||
// download folder path, read from config file
|
||||
const downloadsFolder = Cypress.config("downloadsFolder");
|
||||
let filePath = path.join(downloadsFolder, filename);
|
||||
|
||||
// append download folder path with filename to generate full file path, retrieve file
|
||||
cy.readFile(filePath).then((fileData) => {
|
||||
// from CSV, split into records (rows)
|
||||
const rows = fileData.replace(/\r\n/g, "\n").split("\n");
|
||||
verifyCsv(rows);
|
||||
deleteDownloadsFolder();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
getIFrameCell = (columnHeader, cellNumber) => {
|
||||
return cy
|
||||
.iframe()
|
||||
|
||||
Reference in New Issue
Block a user