Add E2E test of ThemeChoicePanel
(#10469)
* Add E2E test of ThemeChoicePanel Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Edit a comment Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Apply feedback Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove obsolete data-testId attributes They has become obsolete with bfa8152538a3a0804ac14e231578d0cba73aa308. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Update a jest snapshot Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> --------- Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
This commit is contained in:
parent
52017f62e1
commit
c4f59d4d56
4 changed files with 135 additions and 5 deletions
|
@ -168,7 +168,7 @@ export default class ThemeChoicePanel extends React.Component<IProps, IState> {
|
|||
(findHighContrastTheme(this.state.theme) || isHighContrastTheme(this.state.theme))
|
||||
) {
|
||||
return (
|
||||
<div data-testid="theme-choice-panel-highcontrast">
|
||||
<div>
|
||||
<StyledCheckbox
|
||||
checked={isHighContrastTheme(this.state.theme)}
|
||||
onChange={(e) => this.highContrastThemeChanged(e.target.checked)}
|
||||
|
@ -197,7 +197,7 @@ export default class ThemeChoicePanel extends React.Component<IProps, IState> {
|
|||
let systemThemeSection: JSX.Element | undefined;
|
||||
if (themeWatcher.isSystemThemeSupported()) {
|
||||
systemThemeSection = (
|
||||
<div>
|
||||
<div data-testid="checkbox-use-system-theme">
|
||||
<StyledCheckbox
|
||||
checked={this.state.useSystemTheme}
|
||||
onChange={(e) => this.onUseSystemThemeChanged(e.target.checked)}
|
||||
|
@ -248,7 +248,7 @@ export default class ThemeChoicePanel extends React.Component<IProps, IState> {
|
|||
<div className="mx_SettingsTab_section mx_ThemeChoicePanel">
|
||||
<span className="mx_SettingsTab_subheading">{_t("Theme")}</span>
|
||||
{systemThemeSection}
|
||||
<div className="mx_ThemeSelectors" data-testid="theme-choice-panel-selectors">
|
||||
<div className="mx_ThemeSelectors">
|
||||
<StyledRadioGroup
|
||||
name="theme"
|
||||
definitions={orderedThemes.map((t) => ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue