From eae01e1d861588c26bddd0c1ce7cac676cb66523 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Tue, 9 Apr 2024 15:13:31 +0200 Subject: [PATCH] Fix assignment tests --- .../e2e/frontend/read-only/assignment.student.spec.js | 5 ++++- .../content-blocks/assignment/FinalSubmission.vue | 11 ++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/client/cypress/e2e/frontend/read-only/assignment.student.spec.js b/client/cypress/e2e/frontend/read-only/assignment.student.spec.js index 012093fd..96ede483 100644 --- a/client/cypress/e2e/frontend/read-only/assignment.student.spec.js +++ b/client/cypress/e2e/frontend/read-only/assignment.student.spec.js @@ -81,10 +81,11 @@ describe('Assignments read-only - Student', () => { cy.get('@textarea').should('not.have.attr', 'readonly'); cy.getByDataCy('submission-form-submit').should('exist'); + cy.getByDataCy('final-submission').should('not.exist'); }); // todo: very flaky test, fix and re-enable - it.skip('can not edit or turn in', () => { + it('can not edit or turn in', () => { cy.mockGraphqlOps({ operations: getOperations({ final: false, readOnly: true }), }); @@ -92,6 +93,7 @@ describe('Assignments read-only - Student', () => { cy.isSubmissionReadOnly(myText); cy.getByDataCy('final-submission-reopen').should('not.exist'); + cy.getByDataCy('final-submission-explanation').should('not.exist'); }); it('can revoke turn in', () => { @@ -122,5 +124,6 @@ describe('Assignments read-only - Student', () => { cy.isSubmissionReadOnly(myText); cy.getByDataCy('final-submission-reopen').should('not.exist'); + cy.getByDataCy('final-submission-explanation').should('not.exist'); }); }); diff --git a/client/src/components/content-blocks/assignment/FinalSubmission.vue b/client/src/components/content-blocks/assignment/FinalSubmission.vue index 067b5cfd..a975709f 100644 --- a/client/src/components/content-blocks/assignment/FinalSubmission.vue +++ b/client/src/components/content-blocks/assignment/FinalSubmission.vue @@ -8,13 +8,16 @@ class="final-submission__document" v-if="userInput.document" /> -
+
{{ sharedMsg }} Bearbeiten @@ -25,9 +28,7 @@