add-privileged-users-in-room (#9596)

This commit is contained in:
Marco Bartelt 2022-12-08 12:40:31 +01:00 committed by GitHub
parent 982c83d2a8
commit 95ac957fa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 927 additions and 3 deletions

View file

@ -174,7 +174,15 @@ export default class PowerSelector extends React.Component<IProps, IState> {
});
options.push({ value: CUSTOM_VALUE, text: _t("Custom level") });
const optionsElements = options.map((op) => {
return <option value={op.value} key={op.value}>{ op.text }</option>;
return (
<option
value={op.value}
key={op.value}
data-testid={`power-level-option-${op.value}`}
>
{ op.text }
</option>
);
});
picker = (
@ -184,6 +192,7 @@ export default class PowerSelector extends React.Component<IProps, IState> {
onChange={this.onSelectChange}
value={String(this.state.selectValue)}
disabled={this.props.disabled}
data-testid='power-level-select-element'
>
{ optionsElements }
</Field>