You've already forked isop-mirror
Some checks failed
Cypress E2E Tests / cypress-tests (push) Has been cancelled
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
describe('Admin Student Document Downloads', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/login')
|
|
|
|
cy.wait(1000)
|
|
|
|
cy.get('input[type="email"]').type('test@example.com')
|
|
cy.get('input[type="password"]').type('password')
|
|
cy.get('button[type="submit"]').click()
|
|
|
|
cy.wait(1000)
|
|
|
|
cy.contains("Praxe").click()
|
|
cy.url().should('include', '/dashboard/admin/internships')
|
|
cy.wait(2000)
|
|
})
|
|
|
|
it('should be able to generate and download the default proof', () => {
|
|
cy.get('table').within(() => {
|
|
cy.get('tbody tr')
|
|
.then(rows => {
|
|
const count = rows.length
|
|
const randomIndex = Math.floor(Math.random() * count)
|
|
cy.wrap(rows[randomIndex]).as('randomRow')
|
|
})
|
|
|
|
cy.get('@randomRow').within(() => {
|
|
cy.get('td').get('.internship-edit-btn').click()
|
|
})
|
|
})
|
|
|
|
cy.url().should('include', '/dashboard/admin/internships/edit/')
|
|
|
|
cy.contains('Stiahnuť originálnu zmluvu').click()
|
|
cy.wait(2000)
|
|
})
|
|
}) |