Skip to content

Commit

Permalink
visual testing
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Nov 17, 2023
1 parent ab63209 commit fc0b41c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
2 changes: 2 additions & 0 deletions webclient/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import { defineConfig } from "cypress";
import { initPlugin } from "@frsource/cypress-plugin-visual-regression-diff/plugins";

export default defineConfig({
projectId: "u6fxcx",
e2e: {
experimentalStudio: true,
setupNodeEvents(on, config) {
initPlugin(on, config);
},
Expand Down
30 changes: 15 additions & 15 deletions webclient/cypress/e2e/visual.cy.ts
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
describe("Visual change", () => {
describe("visual", () => {
it("main", () => {
cy.visit("http://localhost:3000/");
cy.contains("Standorte");
cy.matchImage();
cy.get("#content").matchImage();
});
it("search", () => {
cy.visit("http://localhost:3000/search?q=mw2001");
cy.contains("Räume");
cy.matchImage();
cy.get("#content").matchImage();
});
it("search-bar", () => {
cy.visit("http://localhost:3000/");
cy.get("input").type("fsmb");
cy.wait(500);
cy.matchImage();
cy.get('[data-cy="autocomplete-menu"]').matchImage();
});
it("about/privacy", () => {
cy.visit("http://localhost:3000/about/privacy");
cy.contains("Privacy");
cy.matchImage();
cy.contains("Privacy Policy");
cy.get("#content").matchImage();
});
it("about/datenschutz", () => {
cy.visit("http://localhost:3000/about/datenschutz");
cy.contains("Datenschutz");
cy.matchImage();
cy.get("#content").matchImage();
});
it("about/ueber-uns", () => {
cy.visit("http://localhost:3000/about/ueber-uns");
cy.contains("Über Navigatum");
cy.matchImage();
cy.contains("Über NavigaTUM");
cy.get("#content").matchImage();
});
it("about/about-us", () => {
cy.visit("http://localhost:3000/about/ueber-uns");
cy.contains("About us");
cy.matchImage();
cy.visit("http://localhost:3000/about/about-us");
cy.contains("About NavigaTUM");
cy.get("#content").matchImage();
});
it("about/impressum", () => {
cy.visit("http://localhost:3000/about/impressum");
cy.contains("Impressum");
cy.matchImage();
cy.get("#content").matchImage();
});
it("about/imprint", () => {
cy.visit("http://localhost:3000/about/imprint");
cy.contains("Imprint");
cy.matchImage();
cy.get("#content").matchImage();
});
it("api", () => {
cy.visit("http://localhost:3000/api");
cy.contains("Api");
cy.matchImage();
cy.get("#content").matchImage();
});
});
1 change: 1 addition & 0 deletions webclient/src/components/AppSearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ onMounted(() => {
<ul
v-cloak
class="menu"
data-cy="autocomplete-menu"
:class="{
'd-none': !global.search_focused || autocomplete.sections.length === 0,
}"
Expand Down

0 comments on commit fc0b41c

Please sign in to comment.