1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-07-28 15:22:05 +03:00

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
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();