Skip to content

Commit

Permalink
more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Nov 17, 2023
1 parent 32a86c8 commit a9e2a58
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions webclient/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineConfig } from "cypress";

export default defineConfig({
projectId: 'u6fxcx',
e2e: {},
component: {
devServer: {
Expand Down
12 changes: 6 additions & 6 deletions webclient/src/components/feedback/TokenBasedModal.cy.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
import TokenBasedModal from "./TokenBasedModal.vue";

describe("<TokenBasedModal>", () => {
it("not accepted privacy policy", () => {
cy.intercept("POST", "/api/feedback/get_token", {statusCode: 201, fixture: "feedback/get_token.json"});
cy.mount(TokenBasedModal);
cy.get('[data-cy="feedback-send"]').click();
cy.get('[data-cy="feedback-error"]').contains("musst die Datenschutzerklärung akzeptiert haben");
});
it("accepted privacy policy", () => {
cy.intercept("POST", "/api/feedback/get_token", {statusCode: 201, fixture: "feedback/get_token.json"});
cy.mount(TokenBasedModal);
Expand All @@ -15,6 +9,12 @@ describe("<TokenBasedModal>", () => {
cy.get('[data-cy="feedback-send"]').click();
cy.contains("Betreff fehlt"); // todo fix one in a more sensible place
});
it("not accepted privacy policy", () => {
cy.intercept("POST", "/api/feedback/get_token", {statusCode: 201, fixture: "feedback/get_token.json"});
cy.mount(TokenBasedModal);
cy.get('[data-cy="feedback-send"]').click();
cy.get('[data-cy="feedback-error"]').contains("musst die Datenschutzerklärung akzeptiert haben");
});
it("tokens ratelimited", () => {
cy.intercept("POST", "/api/feedback/get_token", {statusCode: 429});
cy.mount(TokenBasedModal);
Expand Down

0 comments on commit a9e2a58

Please sign in to comment.