You've already forked isop-mirror
fix: broken cypress tests due to new internship list view
Some checks failed
Cypress E2E Tests / cypress-tests (push) Has been cancelled
Some checks failed
Cypress E2E Tests / cypress-tests (push) Has been cancelled
This commit is contained in:
@@ -136,13 +136,13 @@ async function confirmDeletion(confirm: boolean) {
|
||||
<v-tooltip text="Editovať">
|
||||
<template #activator="{ props }">
|
||||
<v-btn icon="mdi-pencil" size="small" variant="text"
|
||||
:to="`/dashboard/${mode}/internships/edit/${item.id}`" />
|
||||
:to="`/dashboard/${mode}/internships/edit/${item.id}`" class="internship-edit-btn" />
|
||||
</template>
|
||||
</v-tooltip>
|
||||
<v-tooltip text="Vymazať" v-if="mode === 'admin'">
|
||||
<template #activator="{ props }">
|
||||
<v-btn icon="mdi-delete" size="small" variant="text" color="error"
|
||||
@click="() => openDeleteDialog(item)" />
|
||||
@click="() => openDeleteDialog(item)" class="internship-delete-btn" />
|
||||
</template>
|
||||
</v-tooltip>
|
||||
</template>
|
||||
|
||||
@@ -12,6 +12,7 @@ describe('Admin Student Document Downloads', () => {
|
||||
|
||||
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', () => {
|
||||
@@ -24,13 +25,12 @@ describe('Admin Student Document Downloads', () => {
|
||||
})
|
||||
|
||||
cy.get('@randomRow').within(() => {
|
||||
cy.get('td').contains('Editovať').click()
|
||||
cy.get('td').get('.internship-edit-btn').click()
|
||||
})
|
||||
})
|
||||
|
||||
cy.url().should('include', '/dashboard/admin/internships/edit/')
|
||||
|
||||
const downloadsFolder = Cypress.config("downloadsFolder");
|
||||
cy.contains('Stiahnuť originálnu zmluvu').click()
|
||||
cy.wait(2000)
|
||||
})
|
||||
|
||||
@@ -12,6 +12,7 @@ describe('Admin Internship CRUD', () => {
|
||||
|
||||
cy.contains("Praxe").click()
|
||||
cy.url().should('include', '/dashboard/admin/internships')
|
||||
cy.wait(2000)
|
||||
})
|
||||
|
||||
it('should load the list of internships in a proper format', () => {
|
||||
@@ -64,28 +65,15 @@ describe('Admin Internship CRUD', () => {
|
||||
})
|
||||
})
|
||||
|
||||
// Ešte nie je implementované mazanie
|
||||
/*it('should be able to delete an internship', () => {
|
||||
let initialRowCount = 0
|
||||
|
||||
cy.get('table tbody tr').its('length').then((count) => {
|
||||
initialRowCount = count
|
||||
})
|
||||
|
||||
it('should be able to delete an internship', () => {
|
||||
cy.get('table tbody tr').first().within(() => {
|
||||
cy.contains('Vymazať').click()
|
||||
cy.get('.internship-delete-btn').click()
|
||||
})
|
||||
|
||||
cy.contains("Potvrdiť vymazanie").parent().should('be.visible')
|
||||
cy.contains("Potvrdiť vymazanie").parent().contains("Vymazať").click()
|
||||
cy.contains("Potvrdiť vymazanie").parent().contains("Áno").click()
|
||||
cy.contains("Potvrdiť vymazanie").should('not.exist')
|
||||
|
||||
cy.wait(1000)
|
||||
|
||||
cy.get('table tbody tr').its('length').then((count) => {
|
||||
expect(count).to.be.eq(initialRowCount - 1)
|
||||
})
|
||||
})*/
|
||||
|
||||
// TODO: Edit praxe
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user