Fix assignment tests
This commit is contained in:
parent
9e17ac3335
commit
eae01e1d86
|
|
@ -81,10 +81,11 @@ describe('Assignments read-only - Student', () => {
|
||||||
cy.get('@textarea').should('not.have.attr', 'readonly');
|
cy.get('@textarea').should('not.have.attr', 'readonly');
|
||||||
|
|
||||||
cy.getByDataCy('submission-form-submit').should('exist');
|
cy.getByDataCy('submission-form-submit').should('exist');
|
||||||
|
cy.getByDataCy('final-submission').should('not.exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
// todo: very flaky test, fix and re-enable
|
// 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({
|
cy.mockGraphqlOps({
|
||||||
operations: getOperations({ final: false, readOnly: true }),
|
operations: getOperations({ final: false, readOnly: true }),
|
||||||
});
|
});
|
||||||
|
|
@ -92,6 +93,7 @@ describe('Assignments read-only - Student', () => {
|
||||||
|
|
||||||
cy.isSubmissionReadOnly(myText);
|
cy.isSubmissionReadOnly(myText);
|
||||||
cy.getByDataCy('final-submission-reopen').should('not.exist');
|
cy.getByDataCy('final-submission-reopen').should('not.exist');
|
||||||
|
cy.getByDataCy('final-submission-explanation').should('not.exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can revoke turn in', () => {
|
it('can revoke turn in', () => {
|
||||||
|
|
@ -122,5 +124,6 @@ describe('Assignments read-only - Student', () => {
|
||||||
|
|
||||||
cy.isSubmissionReadOnly(myText);
|
cy.isSubmissionReadOnly(myText);
|
||||||
cy.getByDataCy('final-submission-reopen').should('not.exist');
|
cy.getByDataCy('final-submission-reopen').should('not.exist');
|
||||||
|
cy.getByDataCy('final-submission-explanation').should('not.exist');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,16 @@
|
||||||
class="final-submission__document"
|
class="final-submission__document"
|
||||||
v-if="userInput.document"
|
v-if="userInput.document"
|
||||||
/>
|
/>
|
||||||
<div class="final-submission__explanation">
|
<div
|
||||||
|
class="final-submission__explanation"
|
||||||
|
data-cy="final-submission-explanation"
|
||||||
|
v-if="showReopen"
|
||||||
|
>
|
||||||
<info-icon class="final-submission__explanation-icon" />
|
<info-icon class="final-submission__explanation-icon" />
|
||||||
<span class="final-submission__explanation-text">{{ sharedMsg }}</span>
|
<span class="final-submission__explanation-text">{{ sharedMsg }}</span>
|
||||||
<a
|
<a
|
||||||
class="final-submission__reopen"
|
class="final-submission__reopen"
|
||||||
data-cy="final-submission-reopen"
|
data-cy="final-submission-reopen"
|
||||||
v-if="showReopen"
|
|
||||||
@click="$emit('reopen')"
|
@click="$emit('reopen')"
|
||||||
>Bearbeiten</a
|
>Bearbeiten</a
|
||||||
>
|
>
|
||||||
|
|
@ -25,9 +28,7 @@
|
||||||
<script>
|
<script>
|
||||||
import { newLineToParagraph } from '@/helpers/text';
|
import { newLineToParagraph } from '@/helpers/text';
|
||||||
import { defineAsyncComponent } from 'vue';
|
import { defineAsyncComponent } from 'vue';
|
||||||
const DocumentBlock = defineAsyncComponent(() =>
|
const DocumentBlock = defineAsyncComponent(() => import('@/components/content-blocks/DocumentBlock.vue'));
|
||||||
import('@/components/content-blocks/DocumentBlock.vue')
|
|
||||||
);
|
|
||||||
|
|
||||||
const InfoIcon = defineAsyncComponent(() => import('@/components/icons/InfoIcon.vue'));
|
const InfoIcon = defineAsyncComponent(() => import('@/components/icons/InfoIcon.vue'));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue