SettingsStore: Change feature_rust_crypto to default true (#12203)
* Set default crypto stack to rust * Update test for default to rust crypto * Fix labs settings tests * Fix test not working with rust crypto
This commit is contained in:
parent
f36b6035f4
commit
cb7fd5118e
6 changed files with 225 additions and 68 deletions
|
@ -71,6 +71,25 @@ describe("<LabsUserSettingsTab />", () => {
|
|||
});
|
||||
|
||||
describe("Not enabled in config", () => {
|
||||
// these tests only works if the feature is not enabled in the config by default?
|
||||
const copyOfGetValueAt = SettingsStore.getValueAt;
|
||||
|
||||
beforeEach(() => {
|
||||
SettingsStore.getValueAt = (
|
||||
level: SettingLevel,
|
||||
name: string,
|
||||
roomId?: string,
|
||||
isExplicit?: boolean,
|
||||
) => {
|
||||
if (level == SettingLevel.CONFIG && name === "feature_rust_crypto") return false;
|
||||
return copyOfGetValueAt(level, name, roomId, isExplicit);
|
||||
};
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
SettingsStore.getValueAt = copyOfGetValueAt;
|
||||
});
|
||||
|
||||
it("can be turned on if not already", async () => {
|
||||
// By the time the settings panel is shown, `MatrixClientPeg.initClientCrypto` has saved the current
|
||||
// value to the settings store.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue