Merged in bugfix/auftrag_ui_test_rework (pull request #80)
Auftrag UI Test rework * UI test rework * Fix cypress tests
This commit is contained in:
parent
0174cdda75
commit
3858cdfc79
|
|
@ -7,6 +7,6 @@ defineProps<{
|
||||||
<template>
|
<template>
|
||||||
<div class="flex flex-row items-center space-x-2 bg-green-200 px-6">
|
<div class="flex flex-row items-center space-x-2 bg-green-200 px-6">
|
||||||
<it-icon-check class="it-icon"></it-icon-check>
|
<it-icon-check class="it-icon"></it-icon-check>
|
||||||
<p class="text-large py-4">{{ text }}</p>
|
<p class="py-4 text-base">{{ text }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { Assignment } from "@/types";
|
import type { Assignment } from "@/types";
|
||||||
|
import { useRouteQuery } from "@vueuse/router";
|
||||||
import type { Dayjs } from "dayjs";
|
import type { Dayjs } from "dayjs";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
|
|
@ -10,6 +11,8 @@ interface Props {
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
dueDate: undefined,
|
dueDate: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const step = useRouteQuery("step");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
@ -27,9 +30,13 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
{{ $t("assignment.taskDefinition") }}
|
{{ $t("assignment.taskDefinition") }}
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="task in props.assignment.tasks" :key="task.id">
|
<li v-for="(task, index) in props.assignment.tasks" :key="task.id">
|
||||||
-
|
<button
|
||||||
<span class="text-large underline">{{ task.value.title }}</span>
|
class="text-large text-left underline"
|
||||||
|
@click="step = (index + 1).toString()"
|
||||||
|
>
|
||||||
|
- {{ task.value.title }}
|
||||||
|
</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ const onSubmit = async () => {
|
||||||
|
|
||||||
<div v-if="completionStatus === 'in_progress'">
|
<div v-if="completionStatus === 'in_progress'">
|
||||||
<ItCheckbox
|
<ItCheckbox
|
||||||
class="w-full border-b border-gray-400 py-6"
|
class="w-full border-b border-gray-400 py-10 sm:py-6"
|
||||||
:checkbox-item="{
|
:checkbox-item="{
|
||||||
label: $t('assignment.confirmSubmitResults'),
|
label: $t('assignment.confirmSubmitResults'),
|
||||||
value: 'value',
|
value: 'value',
|
||||||
|
|
@ -81,8 +81,9 @@ const onSubmit = async () => {
|
||||||
}"
|
}"
|
||||||
@toggle="state.confirmInput = !state.confirmInput"
|
@toggle="state.confirmInput = !state.confirmInput"
|
||||||
></ItCheckbox>
|
></ItCheckbox>
|
||||||
<div class="w-full border-b border-gray-400 py-6">
|
<div class="w-full border-b border-gray-400">
|
||||||
<ItCheckbox
|
<ItCheckbox
|
||||||
|
class="py-6"
|
||||||
:checkbox-item="{
|
:checkbox-item="{
|
||||||
label: $t('assignment.confirmSubmitPerson'),
|
label: $t('assignment.confirmSubmitPerson'),
|
||||||
value: 'value',
|
value: 'value',
|
||||||
|
|
@ -90,7 +91,7 @@ const onSubmit = async () => {
|
||||||
}"
|
}"
|
||||||
@toggle="state.confirmPerson = !state.confirmPerson"
|
@toggle="state.confirmPerson = !state.confirmPerson"
|
||||||
></ItCheckbox>
|
></ItCheckbox>
|
||||||
<div class="flex flex-row items-center pl-[49px] pt-3">
|
<div class="flex flex-row items-center pb-6 pl-[49px]">
|
||||||
<img
|
<img
|
||||||
alt="Notification icon"
|
alt="Notification icon"
|
||||||
class="mr-2 h-[45px] min-w-[45px] rounded-full"
|
class="mr-2 h-[45px] min-w-[45px] rounded-full"
|
||||||
|
|
|
||||||
|
|
@ -119,6 +119,7 @@ const completionStatus = computed(() => {
|
||||||
v-html="block.value.text"
|
v-html="block.value.text"
|
||||||
></p>
|
></p>
|
||||||
<ItTextarea
|
<ItTextarea
|
||||||
|
class="w-[300px] sm:w-[600px]"
|
||||||
:model-value="(getBlockData(block.id) as string) ?? ''"
|
:model-value="(getBlockData(block.id) as string) ?? ''"
|
||||||
:cy-key="`user-text-input-${index}`"
|
:cy-key="`user-text-input-${index}`"
|
||||||
:disabled="completionStatus !== 'in_progress'"
|
:disabled="completionStatus !== 'in_progress'"
|
||||||
|
|
|
||||||
|
|
@ -142,9 +142,9 @@ const assignmentUser = computed(() => {
|
||||||
:title="getTitle()"
|
:title="getTitle()"
|
||||||
learning-content-type="assignment"
|
learning-content-type="assignment"
|
||||||
:steps-count="numPages"
|
:steps-count="numPages"
|
||||||
:show-next-button="showNextButton"
|
:show-next-button="showNextButton && stepIndex !== 0"
|
||||||
:show-exit-button="showExitButton"
|
:show-exit-button="showExitButton"
|
||||||
:show-start-button="false"
|
:show-start-button="showNextButton && stepIndex === 0"
|
||||||
:show-previous-button="showPreviousButton"
|
:show-previous-button="showPreviousButton"
|
||||||
:base-url="props.learningContent.frontend_url"
|
:base-url="props.learningContent.frontend_url"
|
||||||
step-query-param="step"
|
step-query-param="step"
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ defineEmits(["start", "previous", "next"]);
|
||||||
v-if="props.showStartButton"
|
v-if="props.showStartButton"
|
||||||
type="button"
|
type="button"
|
||||||
class="btn-blue z-10 flex items-center"
|
class="btn-blue z-10 flex items-center"
|
||||||
data-cy="start"
|
data-cy="next-step"
|
||||||
@click="$emit('start')"
|
@click="$emit('start')"
|
||||||
>
|
>
|
||||||
{{ $t("general.start") }}
|
{{ $t("general.start") }}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ const props = withDefaults(defineProps<Props>(), {
|
||||||
startBadgeText: undefined,
|
startBadgeText: undefined,
|
||||||
endBadgeText: undefined,
|
endBadgeText: undefined,
|
||||||
closeButtonVariant: "mark_as_done",
|
closeButtonVariant: "mark_as_done",
|
||||||
|
baseUrl: undefined,
|
||||||
|
stepQueryParam: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(["previous", "next", "exit"]);
|
const emit = defineEmits(["previous", "next", "exit"]);
|
||||||
|
|
@ -37,13 +39,13 @@ const emit = defineEmits(["previous", "next", "exit"]);
|
||||||
<div class="container-large">
|
<div class="container-large">
|
||||||
<div
|
<div
|
||||||
v-if="props.learningContentType !== 'placeholder'"
|
v-if="props.learningContentType !== 'placeholder'"
|
||||||
class="flex h-min w-min items-center gap-2 rounded-full pb-10"
|
class="flex h-min items-center gap-2 rounded-full pb-10"
|
||||||
>
|
>
|
||||||
<component
|
<component
|
||||||
:is="learningContentTypeData(props.learningContentType).icon"
|
:is="learningContentTypeData(props.learningContentType).icon"
|
||||||
class="h-6 w-6 text-gray-900"
|
class="h-6 w-6 text-gray-900"
|
||||||
></component>
|
></component>
|
||||||
<p class="whitespace-nowrap text-gray-900" data-cy="lc-subtitle">
|
<p class="text-gray-900" data-cy="lc-subtitle">
|
||||||
{{ props.subtitle }}
|
{{ props.subtitle }}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue