Skip to content

Commit

Permalink
Merge branch 'main' into N21-2031-board-placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinOehlerkingCap authored Aug 22, 2024
2 parents 53fe022 + 85a4120 commit cbb6fb4
Show file tree
Hide file tree
Showing 87 changed files with 1,475 additions and 594 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
contents: read

env:
node: 18
node: 20
jobs:
unit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -49,6 +49,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup node
uses: actions/setup-node@v4
with:
node-version: ${{ env.node }}
- name: npm ci
run: npm ci --prefer-offline --no-audit
- name: npm run lint
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build stage
FROM docker.io/node:18-bullseye AS build-stage
FROM docker.io/node:20 AS build-stage

## add libraries needed for installing canvas npm package
RUN apt update && apt install -y g++ libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev;
Expand Down
6 changes: 6 additions & 0 deletions ansible/roles/nuxt-client-core/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: svc.yml.j2
tags:
- service

- name: Configmap
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: configmap.yml.j2
apply: yes
tags:
- configmap

- name: Deployment
kubernetes.core.k8s:
kubeconfig: ~/.kube/config
namespace: "{{ NAMESPACE }}"
template: deployment.yml.j2
tags:
- deployment
11 changes: 7 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@braintree/sanitize-url": "^6.0.4",
"@ckeditor/ckeditor5-vue": "^5.1.0",
"@hpi-schul-cloud/ckeditor": "^1.0.0",
"@hpi-schul-cloud/ckeditor": "^1.1.0",
"@lumieducation/h5p-webcomponents": "^9.2.2",
"@vuelidate/core": "^2.0.3",
"@vuelidate/validators": "^2.0.4",
Expand Down Expand Up @@ -102,7 +102,7 @@
}
},
"engines": {
"node": "18",
"node": "20",
"npm": ">=9"
}
}
6 changes: 4 additions & 2 deletions src/components/atoms/vCustomBreadcrumbs.unit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ describe("@/components/atoms/vCustomBreadcrumbs", () => {
plugins: [createTestingVuetify(), createTestingI18n()],
},
props: {
breadcrumbs: [{ title: "Cursos actuales", to: "/rooms-overview" }],
breadcrumbs: [
{ title: "Cursos actuales", to: "/rooms/courses-overview" },
],
},
});

Expand All @@ -26,7 +28,7 @@ describe("@/components/atoms/vCustomBreadcrumbs", () => {
name: "v-breadcrumbs-item",
});

expect(breadcrumbsItem.props().to).toStrictEqual("/rooms-overview");
expect(breadcrumbsItem.props().to).toStrictEqual("/rooms/courses-overview");
expect(breadcrumbsItem.element.innerHTML).toContain("Cursos actuales");
});
});
11 changes: 6 additions & 5 deletions src/components/molecules/CommonCartridgeExportModal.unit.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import CommonCartridgeExportModal from "@/components/molecules/CommonCartridgeExportModal.vue";
import CommonCartridgeExportModule from "@/store/common-cartridge-export";
import NotifierModule from "@/store/notifier";
import RoomModule from "@/store/room";
import courseRoomDetailsModule from "@/store/course-room-details";
import {
COMMON_CARTRIDGE_EXPORT_MODULE_KEY,
NOTIFIER_MODULE_KEY,
ROOM_MODULE_KEY,
COURSE_ROOM_DETAILS_MODULE_KEY,
} from "@/utils/inject";
import { createModuleMocks } from "@/utils/mock-store-module";
import {
Expand All @@ -17,7 +17,7 @@ import { VDialog } from "vuetify/lib/components/index.mjs";

describe("@/components/molecules/CommonCartridgeExportModal", () => {
let exportModuleMock: CommonCartridgeExportModule;
let roomModuleMock: RoomModule;
let courseRoomDetailsModuleMock: courseRoomDetailsModule;

const setup = () => {
exportModuleMock = createModuleMocks(CommonCartridgeExportModule, {
Expand All @@ -29,7 +29,7 @@ describe("@/components/molecules/CommonCartridgeExportModal", () => {
startExport: jest.fn(),
resetExportFlow: jest.fn(),
});
roomModuleMock = createModuleMocks(RoomModule, {
courseRoomDetailsModuleMock = createModuleMocks(courseRoomDetailsModule, {
getRoomData: {
roomId: "1",
title: "title",
Expand All @@ -46,7 +46,8 @@ describe("@/components/molecules/CommonCartridgeExportModal", () => {
provide: {
[COMMON_CARTRIDGE_EXPORT_MODULE_KEY.valueOf()]: exportModuleMock,
[NOTIFIER_MODULE_KEY.valueOf()]: createModuleMocks(NotifierModule),
[ROOM_MODULE_KEY.valueOf()]: roomModuleMock,
[COURSE_ROOM_DETAILS_MODULE_KEY.valueOf()]:
courseRoomDetailsModuleMock,
},
},
});
Expand Down
6 changes: 3 additions & 3 deletions src/components/molecules/CommonCartridgeExportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ import {
COMMON_CARTRIDGE_EXPORT_MODULE_KEY,
injectStrict,
NOTIFIER_MODULE_KEY,
ROOM_MODULE_KEY,
COURSE_ROOM_DETAILS_MODULE_KEY,
} from "@/utils/inject";
import { mdiInformation } from "@mdi/js";
import { computed, ref, watch } from "vue";
Expand All @@ -181,7 +181,7 @@ const notifier = injectStrict(NOTIFIER_MODULE_KEY);
const commonCartridgeExportModule = injectStrict(
COMMON_CARTRIDGE_EXPORT_MODULE_KEY
);
const roomModule = injectStrict(ROOM_MODULE_KEY);
const courseRoomDetailsModule = injectStrict(COURSE_ROOM_DETAILS_MODULE_KEY);
const emit = defineEmits([
"update:isExportModalOpen",
Expand Down Expand Up @@ -220,7 +220,7 @@ const allColumnBoardsSelected = computed(() => {
});
watch(
() => roomModule.getRoomData.elements,
() => courseRoomDetailsModule.getRoomData.elements,
(newValue) => {
allTopics.value = [];
allTasks.value = [];
Expand Down
8 changes: 4 additions & 4 deletions src/components/molecules/CommonCartridgeImportModal.unit.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import RoomsModule from "@/store/rooms";
import CourseRoomListModule from "@/store/course-room-list";
import CommonCartridgeImportModal from "./CommonCartridgeImportModal.vue";
import { mount } from "@vue/test-utils";
import LoadingStateModule from "@/store/loading-state";
Expand All @@ -7,7 +7,7 @@ import {
COMMON_CARTRIDGE_IMPORT_MODULE_KEY,
LOADING_STATE_MODULE_KEY,
NOTIFIER_MODULE_KEY,
ROOMS_MODULE_KEY,
COURSE_ROOM_LIST_MODULE_KEY,
} from "@/utils/inject";
import { createModuleMocks } from "@/utils/mock-store-module";
import {
Expand All @@ -21,7 +21,7 @@ describe("@/components/molecules/CommonCartridgeImportModal", () => {
document.body.setAttribute("data-app", "true");

const notifierModuleMock = createModuleMocks(NotifierModule);
const roomsModuleMock = createModuleMocks(RoomsModule, {
const roomsModuleMock = createModuleMocks(CourseRoomListModule, {
getAllElements: [],
});
const commonCartridgeImportModule = createModuleMocks(
Expand All @@ -36,7 +36,7 @@ describe("@/components/molecules/CommonCartridgeImportModal", () => {
[LOADING_STATE_MODULE_KEY.valueOf()]:
createModuleMocks(LoadingStateModule),
[NOTIFIER_MODULE_KEY.valueOf()]: notifierModuleMock,
[ROOMS_MODULE_KEY.valueOf()]: roomsModuleMock,
[COURSE_ROOM_LIST_MODULE_KEY.valueOf()]: roomsModuleMock,
[COMMON_CARTRIDGE_IMPORT_MODULE_KEY.valueOf()]:
commonCartridgeImportModule,
},
Expand Down
10 changes: 5 additions & 5 deletions src/components/molecules/CommonCartridgeImportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ import {
COMMON_CARTRIDGE_IMPORT_MODULE_KEY,
LOADING_STATE_MODULE_KEY,
NOTIFIER_MODULE_KEY,
ROOMS_MODULE_KEY,
COURSE_ROOM_LIST_MODULE_KEY,
injectStrict,
} from "@/utils/inject";
const i18n = useI18n();
const roomsModule = injectStrict(ROOMS_MODULE_KEY);
const courseRoomListModule = injectStrict(COURSE_ROOM_LIST_MODULE_KEY);
const loadingStateModule = injectStrict(LOADING_STATE_MODULE_KEY);
const notifierModule = injectStrict(NOTIFIER_MODULE_KEY);
const commonCartridgeImportModule = injectStrict(
Expand Down Expand Up @@ -109,11 +109,11 @@ async function onConfirm(): Promise<void> {
if (commonCartridgeImportModule.isSuccess) {
await Promise.allSettled([
roomsModule.fetch(),
roomsModule.fetchAllElements(),
courseRoomListModule.fetch(),
courseRoomListModule.fetchAllElements(),
]);
loadingStateModule.close();
const title = roomsModule.getAllElements[0]?.title;
const title = courseRoomListModule.getAllElements[0]?.title;
notifierModule.show({
status: "success",
text: i18n.t("pages.rooms.ccImportCourse.success", { name: title }),
Expand Down
12 changes: 6 additions & 6 deletions src/components/molecules/RoomModal.unit.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import RoomAvatarIterator from "@/components/organisms/RoomAvatarIterator.vue";
import vCustomDialog from "@/components/organisms/vCustomDialog.vue";
import { roomsModule } from "@/store";
import RoomsModule from "@/store/rooms";
import { courseRoomListModule } from "@/store";
import CourseRoomListModule from "@/store/course-room-list";
import {
createTestingI18n,
createTestingVuetify,
Expand All @@ -13,7 +13,7 @@ import RoomModal from "./RoomModal.vue";
describe("RoomModal", () => {
const getWrapper = (props: { isOpen: boolean }) => {
const { isOpen } = props;
setupStores({ roomsModule: RoomsModule });
setupStores({ courseRoomListModule: CourseRoomListModule });

const wrapper = mount(RoomModal, {
global: { plugins: [createTestingVuetify(), createTestingI18n()] },
Expand Down Expand Up @@ -105,7 +105,7 @@ describe("RoomModal", () => {
const setup = async () => {
const { wrapper } = getWrapper({ isOpen: true });

const storeRoomUpdateMock = jest.spyOn(roomsModule, "update");
const storeRoomUpdateMock = jest.spyOn(courseRoomListModule, "update");
const titleInput = wrapper
.findComponent({ name: "v-text-field" })
.find("input");
Expand Down Expand Up @@ -140,7 +140,7 @@ describe("RoomModal", () => {
const setup = async () => {
const { wrapper } = getWrapper({ isOpen: true });

const storeRoomUpdateMock = jest.spyOn(roomsModule, "update");
const storeRoomUpdateMock = jest.spyOn(courseRoomListModule, "update");
const titleInput = wrapper
.findComponent({ name: "v-text-field" })
.find("input");
Expand Down Expand Up @@ -181,7 +181,7 @@ describe("RoomModal", () => {
const setup = async () => {
const { wrapper } = getWrapper({ isOpen: true });

const storeRoomUpdateMock = jest.spyOn(roomsModule, "update");
const storeRoomUpdateMock = jest.spyOn(courseRoomListModule, "update");
const titleInput = wrapper
.findComponent({ name: "v-text-field" })
.find("input");
Expand Down
4 changes: 2 additions & 2 deletions src/components/molecules/RoomModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<script>
import RoomAvatarIterator from "@/components/organisms/RoomAvatarIterator.vue";
import vCustomDialog from "@/components/organisms/vCustomDialog.vue";
import { roomsModule } from "@/store";
import { courseRoomListModule } from "@/store";
import { mdiKeyboardReturn, mdiPencilOutline } from "@mdi/js";
import { defineComponent } from "vue";
Expand Down Expand Up @@ -83,7 +83,7 @@ export default defineComponent({
},
methods: {
async updateCourseGroupName() {
await roomsModule.update(this.data);
await courseRoomListModule.update(this.data);
},
async onBlur() {
await this.updateCourseGroupName();
Expand Down
Loading

0 comments on commit cbb6fb4

Please sign in to comment.