mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Removing !important statements from theme variables (#1303)
* Removing !important statements from theme vars Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Wait for user store to load Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fix this reference Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Aligning test with resetTheme() fixes Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
05188ef3cc
commit
dd90dcb7f0
4 files changed
+8
-6
No files matched your search
@@ -57,11 +57,12 @@ describe("user store tests", () => {
|
||||
expect(us.preferences.colorTheme).toBe('light')
|
||||
})
|
||||
|
||||
it("correctly resets theme to default value", () => {
|
||||
it("correctly resets theme to default value", async () => {
|
||||
const us = UserStore.getInstance<UserStore>();
|
||||
us.isLoaded = true;
|
||||
|
||||
us.preferences.colorTheme = "some other theme";
|
||||
us.resetTheme();
|
||||
await us.resetTheme();
|
||||
expect(us.preferences.colorTheme).toBe(UserStore.defaultTheme);
|
||||
})
|
||||
|
||||
|
||||
@@ -88,7 +88,8 @@ export class UserStore extends BaseStore<UserStoreModel> {
|
||||
}
|
||||
|
||||
@action
|
||||
resetTheme() {
|
||||
async resetTheme() {
|
||||
await this.whenLoaded;
|
||||
this.preferences.colorTheme = UserStore.defaultTheme;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user