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:
parent
889b0cebb2
commit
f4cd71fd47
8 changed files with 274 additions and 73 deletions
|
@ -48,3 +48,5 @@ const mockMatchMedia = jest.fn().mockImplementation(query => ({
|
|||
dispatchEvent: jest.fn(),
|
||||
}));
|
||||
global.matchMedia = mockMatchMedia;
|
||||
|
||||
window.HTMLElement.prototype.scrollIntoView = jest.fn();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue