Merge branch 'chapril' of https://forge.april.org/Chapril/mobilizon.chapril.org-mobilizon into chapril
This commit is contained in:
commit
8b9b1f7acc
@ -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 {
|
||||
|
@ -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));
|
||||
});
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user