Spaces:
Running
Running
File size: 1,274 Bytes
cb5b71d 6a31b9a cb5b71d 6a31b9a cb5b71d 6a31b9a cb5b71d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
/// <reference types="cypress" />
import 'cypress-file-upload';
import 'cypress-iframe';
describe('load existing errored croissant', () => {
it('should display errors', () => {
cy.visit('http://localhost:8501')
cy.fixture('coco.json').then((fileContent) => {
const file = {
fileContent,
fileName: 'coco.json', mimeType: 'text/json',
}
cy.get(
"[data-testid='stFileUploadDropzone']",
).attachFile(file, {
force: true,
subjectType: "drag-n-drop",
events: ["dragenter", "drop"],
})
})
cy.get('[data-testid="stMarkdownContainer"]').contains("Errors").should('not.exist')
// Empty the `name` field to create an error:
cy.enter('[title="components.tabs.tabs_component"]').then(getBody => {
getBody().contains('RecordSets').click()
})
cy.contains('split_enums (2 fields)').click()
cy.get('input[aria-label="Name:red[*]"][value="split_enums"]').should('be.visible').type('{selectall}{backspace}{enter}')
cy.timeout(2000)
cy.enter('[title="components.tabs.tabs_component"]').then(getBody => {
getBody().contains('Overview').click({force: true})
})
cy.get('[data-testid="stMarkdownContainer"]').contains("Errors").should('exist')
})
}) |