diff --git a/js/src/components/Logo.vue b/js/src/components/Logo.vue index 647025a5e..f907dc71e 100644 --- a/js/src/components/Logo.vue +++ b/js/src/components/Logo.vue @@ -6,7 +6,7 @@ import { Component, Prop, Vue } from "vue-property-decorator"; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore -import MobilizonLogo from "../assets/logo_chapril_mobilizon.png"; +// import MobilizonLogo from "../assets/logo_chapril_mobilizon.png"; @Component export default class Logo extends Vue { diff --git a/js/tests/e2e/support/commands.js b/js/tests/e2e/support/commands.js index 8268b7ee3..442fb374e 100644 --- a/js/tests/e2e/support/commands.js +++ b/js/tests/e2e/support/commands.js @@ -106,29 +106,27 @@ const decreaseFetches = () => { Cypress.env("fetchCount", count - 1); }; -const buildTrackableFetchWithSessionId = (fetch) => ( - fetchUrl, - fetchOptions -) => { - const { headers } = fetchOptions; - const modifiedHeaders = { - "x-session-id": Cypress.env("sessionId"), - ...headers, +const buildTrackableFetchWithSessionId = + (fetch) => (fetchUrl, fetchOptions) => { + const { headers } = fetchOptions; + const modifiedHeaders = { + "x-session-id": Cypress.env("sessionId"), + ...headers, + }; + + const modifiedOptions = { ...fetchOptions, headers: modifiedHeaders }; + + return fetch(fetchUrl, modifiedOptions) + .then((result) => { + decreaseFetches(); + return Promise.resolve(result); + }) + .catch((result) => { + decreaseFetches(); + return Promise.reject(result); + }); }; - const modifiedOptions = { ...fetchOptions, headers: modifiedHeaders }; - - return fetch(fetchUrl, modifiedOptions) - .then((result) => { - decreaseFetches(); - return Promise.resolve(result); - }) - .catch((result) => { - decreaseFetches(); - return Promise.reject(result); - }); -}; - Cypress.on("window:before:load", (win) => { cy.stub(win, "fetch", buildTrackableFetchWithSessionId(fetch)); }); diff --git a/js/tests/unit/specs/mocks/event.ts b/js/tests/unit/specs/mocks/event.ts index c91b872ef..af0187abe 100644 --- a/js/tests/unit/specs/mocks/event.ts +++ b/js/tests/unit/specs/mocks/event.ts @@ -86,8 +86,7 @@ export const eventCommentThreadsMock = { __typename: "Comment", id: "2", uuid: "e37910ea-fd5a-4756-9679-00971f3f4107", - url: - "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-00971f3f4107", + url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-00971f3f4107", text: "my comment text", local: true, visibility: "PUBLIC", @@ -118,8 +117,7 @@ export const eventCommentThreadsMock = { __typename: "Comment", id: "29", uuid: "e37910ea-fd5a-4756-9679-01171f3f4107", - url: - "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4107", + url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4107", text: "a second comment", local: true, visibility: "PUBLIC", @@ -164,8 +162,7 @@ export const newCommentForEventResponse: DataMock = { __typename: "Comment", id: "79", uuid: "e37910ea-fd5a-4756-9679-01171f3f4444", - url: - "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4444", + url: "https://some-instance.tld/comments/e37910ea-fd5a-4756-9679-01171f3f4444", text: newCommentForEventMock.text, local: true, visibility: "PUBLIC",