mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Flatten user preferences in user store (#2587)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
119d584bcb
commit
afa5379ba9
16 files changed
+212
-116
No files matched your search
@@ -60,13 +60,13 @@ describe("user store tests", () => {
|
||||
it("allows setting and getting preferences", () => {
|
||||
const us = UserStore.getInstance();
|
||||
|
||||
us.preferences.httpsProxy = "abcd://defg";
|
||||
us.httpsProxy = "abcd://defg";
|
||||
|
||||
expect(us.preferences.httpsProxy).toBe("abcd://defg");
|
||||
expect(us.preferences.colorTheme).toBe(UserStore.defaultTheme);
|
||||
expect(us.httpsProxy).toBe("abcd://defg");
|
||||
expect(us.colorTheme).toBe(UserStore.defaultTheme);
|
||||
|
||||
us.preferences.colorTheme = "light";
|
||||
expect(us.preferences.colorTheme).toBe("light");
|
||||
us.colorTheme = "light";
|
||||
expect(us.colorTheme).toBe("light");
|
||||
});
|
||||
|
||||
it("correctly resets theme to default value", async () => {
|
||||
@@ -74,9 +74,9 @@ describe("user store tests", () => {
|
||||
|
||||
us.isLoaded = true;
|
||||
|
||||
us.preferences.colorTheme = "some other theme";
|
||||
us.colorTheme = "some other theme";
|
||||
await us.resetTheme();
|
||||
expect(us.preferences.colorTheme).toBe(UserStore.defaultTheme);
|
||||
expect(us.colorTheme).toBe(UserStore.defaultTheme);
|
||||
});
|
||||
|
||||
it("correctly calculates if the last seen version is an old release", () => {
|
||||
|
||||
Reference in new issue
Block a user