Skip to content
Snippets Groups Projects
Commit f95ea39d authored by Jure's avatar Jure
Browse files

test: add test for pdf upload

parent 4a898e0f
No related branches found
No related tags found
No related merge requests found
File added
File added
describe('PDF submission test', () => {
it('can upload and submit a PDF', () => {
cy.visit('/dashboard')
const username = 'admin'
const password = 'password'
cy.get('input[name="username"]').type(username)
cy.get('input[name="password"]').type(password)
cy.get('button[type="submit"]').click()
cy.fixture('test-pdf.pdf', 'base64').then(fileContent => {
cy.get('[data-testid="dropzone"]').upload(
{ fileContent, fileName: 'test-pdf.pdf', mimeType: 'application/pdf' },
{ subjectType: 'drag-n-drop' },
)
})
cy.get('body').contains('Submission information')
cy.get('[data-testid="meta.title"]').contains('test pdf')
})
})
import 'cypress-file-upload'
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment