Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
79bea22
graph evaluation
Matti3939 Mar 16, 2025
da03946
add basic graph feature
simonott1 Mar 27, 2025
1334d81
add graph features
simonott1 Apr 21, 2025
3b4cfaf
Add Graph Feature "add Module"
simonott1 Apr 26, 2025
6b4d538
Make linter happy
simonott1 Apr 30, 2025
34e886f
Refactor
simonott1 May 10, 2025
21de29e
add new ci.yml
simonott1 May 10, 2025
0365144
add system-tests.yml
simonott1 May 10, 2025
90f96b5
Refactoring
simonott1 May 10, 2025
061af31
add cypress tests
simonott1 May 10, 2025
fcc545d
fix highlighting
simonott1 May 11, 2025
5728c77
Fix tooltip and edge marker for Firefox
simonott1 May 11, 2025
c4e9cd9
Manditory modules + Refactoring
simonott1 May 15, 2025
0881431
Merge remote-tracking branch 'origin/main' into feature/graph
simonott1 May 15, 2025
0c1be8d
make ESLint happy
simonott1 May 15, 2025
9ce7f01
Refactoring
simonott1 May 30, 2025
e464210
Merge remote-tracking branch 'origin/main' into feature/graph
simonott1 May 30, 2025
fa4a960
regenerate package-lock.json
simonott1 May 30, 2025
008f13a
Make ESLint happy
simonott1 May 30, 2025
19970a5
change graph to modal
simonott1 May 30, 2025
c0f8c4d
Make ESLint happy
simonott1 May 30, 2025
82f5dc4
add ModuleCard + Refactoring
simonott1 May 30, 2025
7f487b6
change some tests
simonott1 Jun 1, 2025
8994e4f
Refacoring
simonott1 Jun 1, 2025
1a8d242
add modules in correct order
simonott1 Jun 1, 2025
f2619c6
fix tests
simonott1 Jun 1, 2025
0e8cb9c
add missing data-cy attribute for plan test
simonott1 Jun 1, 2025
8c4ca7a
Fixing + Refactoring
simonott1 Jun 2, 2025
8d6ae90
remove size constraint
simonott1 Jun 2, 2025
8a10345
remove example file
simonott1 Jun 2, 2025
62084de
make firefox E2E Tests happy
simonott1 Jun 2, 2025
14c89d0
make firefox E2E Tests happy
simonott1 Jun 2, 2025
1902e84
Merge remote-tracking branch 'origin/main' into feature/graph
simonott1 Jun 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
node_modules
/.vite
/dist


Expand Down
2 changes: 1 addition & 1 deletion cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ export default defineConfig({
bundler: "vite",
},
},
});
});
17 changes: 0 additions & 17 deletions cypress/e2e/example.cy.ts

This file was deleted.

182 changes: 182 additions & 0 deletions cypress/e2e/graph/graphView.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
/* eslint-disable max-len */
describe("Graph View E2E Tests", () => {
beforeEach(() => {
cy.intercept("GET", "https://raw.githubusercontent.com/Janooski/data/main/data/modules.json", {
fixture: "modules.json",
}).as("modules");

cy.intercept(
"GET",
"https://raw.githubusercontent.com/Janooski/data/main/data2I/categories.json",
{ fixture: "categories.json" }
).as("categories");

cy.visit(
"/#/plan/RheKoI_OOP1_AutPy_CN1_DMI_An1I_Dbs1_EnglScience-FP_OOP2_DigCod_CySec_AutoSpr_An2I_DatEng_KommIng2-WE1_AlgDat_Bsys1_AIFo_MsTe_CPl_SEP1_ExEv-ParProg_SecSoW_Bsys2_AIAp_DSy_SEProj_SEP2_DigBusI-PmQm_CoBau_UIP_AppArch_SAI21_WI2-CPlA_CldSol_BAI21_PhAI?startSemester=HS24"
);
});

it("enable and disable graph modal", () => {
cy.get('[data-cy="activate-graph-button"]').click();
cy.get('[data-cy="graph-vueflow"]').should("be.visible");

cy.get('[data-cy="graph-close-button"]').click();
cy.get('[data-cy="graph-vueflow"]').should("not.exist");
cy.get('body').screenshot("graphView.cy.ts/graph-view-disabled");

cy.get('[data-cy="activate-graph-button"]').click();
cy.get('[data-cy="graph-vueflow"]').should("be.visible");
cy.get('[data-cy="graph-vueflow"]').screenshot("graphView.cy.ts/graph-view-enabled");
});

it("triggers fitView on FitViewButton click", () => {
cy.get('[data-cy="activate-graph-button"]').click();

cy.get('[data-cy="graph-vueflow"]').trigger("wheel", {
deltaY: -2000,
bubbles: true,
eventConstructor: "WheelEvent",
});

cy.get('[data-cy="fit-view-button"]').click();
cy.wait(1000);
cy.contains('[data-cy="graph-vueflow"] a', "Bachelor-Arbeit Informatik").then(($el) => {
cy.get('[data-cy="graph-vueflow"]').then(($container) => {
const elRect = $el[0].getBoundingClientRect();
const containerRect = $container[0].getBoundingClientRect();

expect(elRect.top, "element top ≥ container top").to.be.at.least(containerRect.top);
expect(elRect.bottom, "element bottom ≤ container bottom").to.be.at.most(
containerRect.bottom
);
expect(elRect.left, "element left ≥ container left").to.be.at.least(containerRect.left);
expect(elRect.right, "element right ≤ container right").to.be.at.most(containerRect.right);
});
});
cy.get('[data-cy="graph-vueflow"]').screenshot("graphView.cy.ts/fit-view");
});

it("modules can be removed and added", () => {
cy.get('[data-cy="activate-graph-button"]').click();

cy.contains('[data-cy="graph-vueflow"] a', "Bachelor-Arbeit Informatik")
.parent()
.find('[data-cy="remove-module-button"]')
.click({ force: true });
cy.contains('[data-cy="graph-vueflow"] a', "Bachelor-Arbeit Informatik").should("not.exist");
cy.get('[data-cy="fit-view-button"]').click();
cy.get('[data-cy="graph-vueflow"]').screenshot("graphView.cy.ts/BA-removed");

cy.contains('[data-cy="graph-vueflow"] a', "Studienarbeit Informatik")
.parent()
.find('[data-cy="add-pedendent-modules-button"]')
.click({ force: true });

cy.get('[data-cy="graph-vueflow"] [data-cy="module-list"]').should("exist").and("be.visible");

cy.contains('[data-cy="graph-vueflow"] a', "Studienarbeit Informatik")
.parent()
.parent()
.click({ force: true });
cy.contains('[data-cy="graph-vueflow"] a', "Bachelor-Arbeit Informatik").should("exist");
cy.get('[data-cy="graph-vueflow"]').screenshot("graphView.cy.ts/BA-added");
});

it("all modules are displayed", () => {
cy.get('[data-cy="activate-graph-button"]').click();
const modules = [
"RheKoI",
"OOP1",
"AutPy",
"CN1",
"DMI",
"An1I",
"Dbs1",
"EnglScience",
"OOP2",
"DigCod",
"CySec",
"AutoSpr",
"An2I",
"WE1",
"AlgDat",
"Bsys1",
"AIFo",
"MsTe",
"CPl",
"SEP1",
"ExEv",
"ParProg",
"SecSoW",
"Bsys2",
"AIAp",
"DSy",
"SEProj",
"SEP2",
"DigBusI",
"PmQm",
"CoBau",
"UIP",
"AppArch",
"SAI21",
"WI2",
"CPlA",
"CldSol",
"BAI21",
"PhAI",
];
modules.forEach((mod) => {
cy.get(`[data-cy="graph-vueflow"] [data-id="${mod}"]`).should("exist").and("be.visible");
});
});

it("all connects of modules do exist", () => {
cy.get('[data-cy="activate-graph-button"]').click();
const connections = [
"AutoSpr->AIFo",
"OOP1->AIFo",
"OOP1->AlgDat",
"OOP1->CPl",
"OOP1->CPlA",
"OOP1->CoBau",
"OOP1->OOP2",
"OOP1->MsTe",
"OOP1->ParProg",
"OOP1->SEP1",
"OOP1->SEProj",
"OOP1->WE1",
"OOP2->AIFo",
"OOP2->AlgDat",
"OOP2->CPl",
"OOP2->CPlA",
"OOP2->CoBau",
"OOP2->MsTe",
"OOP2->ParProg",
"OOP2->SEP1",
"OOP2->SEProj",
"OOP2->WE1",
"AlgDat->MsTe",
"AlgDat->CPlA",
"Dbs1->MsTe",
"Dbs1->DatEng",
"Bsys1->Bsys2",
"Bsys1->CPl",
"Bsys1->CPlA",
"Bsys1->CoBau",
"Bsys1->DSy",
"Bsys1->ParProg",
"Bsys1->SecSoW",
"Bsys2->CoBau",
"CN1->SecSoW",
"CPl->CPlA",
"SEP1->SEP2",
"SEP1->SEProj",
"SEProj->SAI21",
"AppArch->CldSol",
"SAI21->BAI21",
];
connections.forEach((conn) => {
cy.get(`[data-id="${conn}"]`).should("exist");
});
});
});
24 changes: 24 additions & 0 deletions cypress/e2e/graph/graphViewLoadingtime.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* eslint-disable max-len */
describe("Graph View E2E Tests", () => {
beforeEach(() => {
cy.visit(
"/#/plan/RheKoI_OOP1_AutPy_CN1_DMI_An1I_Dbs1_EnglScience-FP_OOP2_DigCod_CySec_AutoSpr_An2I_DatEng_KommIng2-WE1_AlgDat_Bsys1_AIFo_MsTe_CPl_SEP1_ExEv-ParProg_SecSoW_Bsys2_AIAp_DSy_SEProj_SEP2_DigBusI-PmQm_CoBau_UIP_AppArch_SAI21_WI2-CPlA_CldSol_BAI21_PhAI?startSemester=HS24"
);
});

it("graph loads within acceptable time", () => {
const maxLoadTime = 2000;
const start = Date.now();

cy.get('[data-cy="activate-graph-button"]').click();

cy.then(() => {
const loadTime = Date.now() - start;
cy.log(`Graph loaded in ${loadTime}ms`);
expect(loadTime).to.be.lessThan(maxLoadTime);
});

cy.get('[data-id="OOP1"]').should("exist").and("be.visible");
});
});

Loading
Loading