diff --git a/frontend/app/components/InternshipListView.vue b/frontend/app/components/InternshipListView.vue
index 0360206..a83d142 100644
--- a/frontend/app/components/InternshipListView.vue
+++ b/frontend/app/components/InternshipListView.vue
@@ -136,13 +136,13 @@ async function confirmDeletion(confirm: boolean) {
+ :to="`/dashboard/${mode}/internships/edit/${item.id}`" class="internship-edit-btn" />
openDeleteDialog(item)" />
+ @click="() => openDeleteDialog(item)" class="internship-delete-btn" />
diff --git a/frontend/cypress/e2e/admin/internships/downloads.cy.ts b/frontend/cypress/e2e/admin/internships/downloads.cy.ts
index 71ecf09..23c0a46 100644
--- a/frontend/cypress/e2e/admin/internships/downloads.cy.ts
+++ b/frontend/cypress/e2e/admin/internships/downloads.cy.ts
@@ -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)
})
diff --git a/frontend/cypress/e2e/admin/internships/list.cy.ts b/frontend/cypress/e2e/admin/internships/list.cy.ts
index 50b7ec0..5a4f1e2 100644
--- a/frontend/cypress/e2e/admin/internships/list.cy.ts
+++ b/frontend/cypress/e2e/admin/internships/list.cy.ts
@@ -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
+ })
})
\ No newline at end of file