diff --git a/client/cypress/fixtures/example.json b/client/cypress/fixtures/example.json deleted file mode 100644 index 1b1f1b2a..00000000 --- a/client/cypress/fixtures/example.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "body": "Fixtures are a great way to mock data for responses to routes", - "email": "hello@cypress.io", - "name": "Using fixtures to represent data" -} diff --git a/client/cypress/support/commands.ts b/client/cypress/support/commands.ts deleted file mode 100644 index 95857aea..00000000 --- a/client/cypress/support/commands.ts +++ /dev/null @@ -1,37 +0,0 @@ -/// -// *********************************************** -// This example commands.ts shows you how to -// create various custom commands and overwrite -// existing commands. -// -// For more comprehensive examples of custom -// commands please read more here: -// https://on.cypress.io/custom-commands -// *********************************************** -// -// -// -- This is a parent command -- -// Cypress.Commands.add('login', (email, password) => { ... }) -// -// -// -- This is a child command -- -// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) -// -// -// -- This is a dual command -- -// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) -// -// -// -- This will overwrite an existing command -- -// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) -// -// declare global { -// namespace Cypress { -// interface Chainable { -// login(email: string, password: string): Chainable -// drag(subject: string, options?: Partial): Chainable -// dismiss(subject: string, options?: Partial): Chainable -// visit(originalFn: CommandOriginalFn, url: string, options: Partial): Chainable -// } -// } -// } diff --git a/client/cypress/support/component-index.html b/client/cypress/support/component-index.html deleted file mode 100644 index 67996c3d..00000000 --- a/client/cypress/support/component-index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Components App - - - -
- - diff --git a/client/cypress/support/component.ts b/client/cypress/support/component.ts deleted file mode 100644 index 6d06a225..00000000 --- a/client/cypress/support/component.ts +++ /dev/null @@ -1,55 +0,0 @@ -// *********************************************************** -// This example support/component.ts is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** - -// Import commands.js using ES2015 syntax: -import "../../tailwind.css"; -import "./commands"; - -// Alternatively you can use CommonJS syntax: -// require('./commands') - -import { setupI18n } from "@/i18n.ts"; -import router from "@/router"; -import { mount } from "cypress/vue"; -import { createPinia } from "pinia"; - -// Augment the Cypress namespace to include type definitions for -// your custom command. -// Alternatively, can be defined in cypress/support/component.d.ts -// with a at the top of your spec. -declare global { - // eslint-disable-next-line @typescript-eslint/no-namespace - namespace Cypress { - interface Chainable { - mount: typeof mount; - } - } -} - -Cypress.Commands.add("mount", (component, options = {}) => { - options.global = options.global || {}; - options.global.plugins = options.global.plugins || []; - options.global.plugins.push(setupI18n()); - options.global.plugins.push(createPinia()); - - if (!options.router) { - options.router = router; - } - - return mount(component, options); -}); - -// Example use: -// cy.mount(MyComponent) diff --git a/client/cypress/tsconfig.json b/client/cypress/tsconfig.json deleted file mode 100644 index 31a631a8..00000000 --- a/client/cypress/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "compilerOptions": { - "lib": ["es5", "dom"], - "target": "es5", - "types": ["cypress", "node"] - }, - "include": ["**/*.ts"] -} diff --git a/client/package-lock.json b/client/package-lock.json index 5f12bac1..83a70117 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -60,6 +60,7 @@ "autoprefixer": "^10.4.8", "eslint": "8.37", "eslint-config-prettier": "^8.5.0", + "eslint-plugin-cypress": "^2.13.3", "eslint-plugin-storybook": "^0.6.11", "eslint-plugin-vue": "^9.4.0", "jsdom": "^21.1.1", @@ -10824,6 +10825,18 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-plugin-cypress": { + "version": "2.13.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.13.3.tgz", + "integrity": "sha512-nAPjZE5WopCsgJwl3vHm5iafpV+ZRO76Z9hMyRygWhmg5ODXDPd+9MaPl7kdJ2azj+sO87H3P1PRnggIrz848g==", + "dev": true, + "dependencies": { + "globals": "^11.12.0" + }, + "peerDependencies": { + "eslint": ">= 3.2.1" + } + }, "node_modules/eslint-plugin-prettier": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", @@ -27863,6 +27876,15 @@ "integrity": "sha512-wLbQiFre3tdGgpDv67NQKnJuTlcUVYHas3k+DZCc2U2BadthoEY4B7hLPvAxaqdyOGCzuLfii2fqGph10va7oA==", "dev": true }, + "eslint-plugin-cypress": { + "version": "2.13.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-cypress/-/eslint-plugin-cypress-2.13.3.tgz", + "integrity": "sha512-nAPjZE5WopCsgJwl3vHm5iafpV+ZRO76Z9hMyRygWhmg5ODXDPd+9MaPl7kdJ2azj+sO87H3P1PRnggIrz848g==", + "dev": true, + "requires": { + "globals": "^11.12.0" + } + }, "eslint-plugin-prettier": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz", diff --git a/client/package.json b/client/package.json index 432217bd..1a125dd0 100644 --- a/client/package.json +++ b/client/package.json @@ -71,6 +71,7 @@ "autoprefixer": "^10.4.8", "eslint": "8.37", "eslint-config-prettier": "^8.5.0", + "eslint-plugin-cypress": "^2.13.3", "eslint-plugin-storybook": "^0.6.11", "eslint-plugin-vue": "^9.4.0", "jsdom": "^21.1.1", diff --git a/client/src/components/FeedbackForm.vue b/client/src/components/FeedbackForm.vue index ff2f8139..7cd1e9db 100644 --- a/client/src/components/FeedbackForm.vue +++ b/client/src/components/FeedbackForm.vue @@ -9,8 +9,8 @@ :show-exit-button="stepNo + 1 === numSteps" :current-step="stepNo" :steps-count="numSteps" - :start-badge-text="$t('feedback.introduction')" - :end-badge-text="$t('feedback.submission')" + :start-badge-text="$t('general.introduction')" + :end-badge-text="$t('general.submission')" @previous="previousStep()" @next="nextStep()" > @@ -141,7 +141,7 @@ const title = computed( ); const stepLabels = [ - t("feedback.introduction"), + t("general.introduction"), t("feedback.recommendLabel"), t("feedback.satisfactionLabel"), t("feedback.goalAttainmentLabel"), @@ -152,7 +152,7 @@ const stepLabels = [ t("feedback.instructorOpenFeedbackLabel"), t("feedback.courseNegativeFeedbackLabel"), t("feedback.coursePositiveFeedbackLabel"), - t("feedback.submission"), + t("general.submission"), ]; const numSteps = stepLabels.length; diff --git a/client/src/components/ui/ItRadioGroup.vue b/client/src/components/ui/ItRadioGroup.vue index 5bec7286..d2426c3e 100644 --- a/client/src/components/ui/ItRadioGroup.vue +++ b/client/src/components/ui/ItRadioGroup.vue @@ -36,7 +36,7 @@ import { RadioGroup, RadioGroupLabel, RadioGroupOption } from "@headlessui/vue"; interface Props { modelValue: any; items: RadioItem[]; - label?: string; + label: string | undefined; } withDefaults(defineProps(), { diff --git a/client/src/components/ui/ItSuccessAlert.stories.ts b/client/src/components/ui/ItSuccessAlert.stories.ts new file mode 100644 index 00000000..8e1c80a6 --- /dev/null +++ b/client/src/components/ui/ItSuccessAlert.stories.ts @@ -0,0 +1,19 @@ +import ItSuccessAlert from "@/components/ui/ItSuccessAlert.vue"; +import type { Meta, StoryObj } from "@storybook/vue3"; + +// More on how to set up stories at: https://storybook.js.org/docs/7.0/vue/writing-stories/introduction +const meta: Meta = { + title: "VBV/SuccessAlert", + component: ItSuccessAlert, + // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/7.0/vue/writing-docs/docs-page + tags: ["autodocs"], +}; + +export default meta; +type Story = StoryObj; + +export const Default: Story = { + args: { + text: "Deiner Praxisauftrag wurde abgegeben", + }, +}; diff --git a/client/src/components/ui/ItSuccessAlert.vue b/client/src/components/ui/ItSuccessAlert.vue new file mode 100644 index 00000000..e5aa78f1 --- /dev/null +++ b/client/src/components/ui/ItSuccessAlert.vue @@ -0,0 +1,12 @@ + + + diff --git a/client/src/components/ui/ItTextarea.vue b/client/src/components/ui/ItTextarea.vue index 5ec21117..694b6a31 100644 --- a/client/src/components/ui/ItTextarea.vue +++ b/client/src/components/ui/ItTextarea.vue @@ -4,6 +4,8 @@