You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-28 15:22:05 +03:00
Make existing and new issue URLs configurable (#10710)
* Make existing and new issue URLs configurable * Apply a deep merge over sdk config to allow sane nested structures * Defaultize * Fix types * Iterate * Add FeedbackDialog snapshot test * Add SdkConfig snapshot tests * Iterate * Fix tests * Iterate types * Fix test
This commit is contained in:
committed by
GitHub
parent
e4610e4672
commit
6166dbb661
@ -30,6 +30,9 @@ describe("SdkConfig", () => {
|
||||
chunk_length: 42,
|
||||
max_length: 1337,
|
||||
},
|
||||
feedback: {
|
||||
existing_issues_url: "https://existing",
|
||||
} as any,
|
||||
});
|
||||
});
|
||||
|
||||
@ -37,7 +40,16 @@ describe("SdkConfig", () => {
|
||||
const customConfig = JSON.parse(JSON.stringify(DEFAULTS));
|
||||
customConfig.voice_broadcast.chunk_length = 42;
|
||||
customConfig.voice_broadcast.max_length = 1337;
|
||||
customConfig.feedback.existing_issues_url = "https://existing";
|
||||
expect(SdkConfig.get()).toEqual(customConfig);
|
||||
});
|
||||
|
||||
it("should allow overriding individual fields of sub-objects", () => {
|
||||
const feedback = SdkConfig.getObject("feedback");
|
||||
expect(feedback.get("existing_issues_url")).toMatchInlineSnapshot(`"https://existing"`);
|
||||
expect(feedback.get("new_issue_url")).toMatchInlineSnapshot(
|
||||
`"https://github.com/vector-im/element-web/issues/new/choose"`,
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user