i tried to auto upload a file to a project am working on but the file name is shown as uploaded in the field but its not actually because the submit button is still disabled, But when i upload it manually the upload button will be clickable.
describe('Upload Test', function () {
it('Upload Test', function () {
cy.visit('http://localhost:4200')
cy.get('#version-no').type('4')
cy.get('#version-notes').type('test notes ')
const test_upload = "../fixtures/example.csv";
cy.get('#file')
.attachFile(test_upload)
cy.get('#file')
.its('0.files')
.its('0')
.its('name')
.should('eq', 'example.csv')
cy.get('#file')
.trigger('change', { force: true })
cy.get('#file')
.trigger('fileuploadsubmit', { force: true })
cy.get('[data-cy=Submit_Catalogue]').click({ force: true },'center')
})
})
here is the HTML