Check 'useSystemTheme' in quick settings theme switcher (#7809)

* mock Element.scrollIntoView in jest setup

Signed-off-by: Kerry Archibald <kerrya@element.io>

* extract theme switcher from quick settings, add match system option, test

Signed-off-by: Kerry Archibald <kerrya@element.io>

* i18n

Signed-off-by: Kerry Archibald <kerrya@element.io>

* forgotten copyright

Signed-off-by: Kerry Archibald <kerrya@element.io>

* stylelint

Signed-off-by: Kerry Archibald <kerrya@element.io>

* remove old class

Signed-off-by: Kerry Archibald <kerrya@element.io>
This commit is contained in:
Kerry 2022-02-24 10:01:06 +01:00 committed by GitHub
parent 889b0cebb2
commit f4cd71fd47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 274 additions and 73 deletions

View file

@ -48,3 +48,5 @@ const mockMatchMedia = jest.fn().mockImplementation(query => ({
dispatchEvent: jest.fn(),
}));
global.matchMedia = mockMatchMedia;
window.HTMLElement.prototype.scrollIntoView = jest.fn();