feat: add `Advanced settings` on create Team and Channel (#32867)

Co-authored-by: Douglas Fabris <27704687+dougfabris@users.noreply.github.com>
pull/32959/head
Júlia Jaeger Foresti 1 year ago committed by GitHub
parent dd4270397d
commit 0c919db7b4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      .changeset/lemon-steaks-provide.md
  2. 173
      apps/meteor/client/sidebar/header/CreateChannel/CreateChannelModal.tsx
  3. 127
      apps/meteor/client/sidebar/header/CreateTeam/CreateTeamModal.tsx
  4. 173
      apps/meteor/client/sidebarv2/header/CreateChannelModal.tsx
  5. 127
      apps/meteor/client/sidebarv2/header/CreateTeamModal.tsx
  6. 1
      apps/meteor/tests/e2e/channel-management.spec.ts
  7. 4
      apps/meteor/tests/e2e/e2e-encryption.spec.ts
  8. 5
      apps/meteor/tests/e2e/page-objects/fragments/home-sidenav.ts
  9. 1
      apps/meteor/tests/e2e/team-management.spec.ts
  10. 4
      packages/i18n/src/locales/en.i18n.json

@ -0,0 +1,6 @@
---
'@rocket.chat/i18n': minor
'@rocket.chat/meteor': minor
---
Added an accordion for advanced settings on Create teams and channels

@ -12,6 +12,8 @@ import {
FieldError,
FieldHint,
FieldDescription,
Accordion,
AccordionItem,
} from '@rocket.chat/fuselage';
import { useUniqueId } from '@rocket.chat/fuselage-hooks';
import type { TranslationKey } from '@rocket.chat/ui-contexts';
@ -210,7 +212,7 @@ const CreateChannelModal = ({ teamId = '', onClose, reload }: CreateChannelModal
<Modal.Close tabIndex={-1} title={t('Close')} onClick={onClose} />
</Modal.Header>
<Modal.Content mbe={2}>
<FieldGroup>
<FieldGroup mbe={24}>
<Field>
<FieldLabel required htmlFor={nameId}>
{t('Name')}
@ -276,90 +278,99 @@ const CreateChannelModal = ({ teamId = '', onClose, reload }: CreateChannelModal
{isPrivate ? t('People_can_only_join_by_being_invited') : t('Anyone_can_access')}
</FieldHint>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={federatedId}>{t('Federation_Matrix_Federated')}</FieldLabel>
<Controller
control={control}
name='federated'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
aria-describedby={`${federatedId}-hint`}
id={federatedId}
ref={ref}
checked={value}
disabled={!canUseFederation}
onChange={onChange}
</FieldGroup>
<Accordion>
<AccordionItem title={t('Advanced_settings')}>
<FieldGroup>
<Box is='h5' fontScale='h5' color='titles-labels'>
{t('Security_and_permissions')}
</Box>
<Field>
<FieldRow>
<FieldLabel htmlFor={federatedId}>{t('Federation_Matrix_Federated')}</FieldLabel>
<Controller
control={control}
name='federated'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
aria-describedby={`${federatedId}-hint`}
id={federatedId}
ref={ref}
checked={value}
disabled={!canUseFederation}
onChange={onChange}
/>
)}
/>
)}
/>
</FieldRow>
<FieldHint id={`${federatedId}-hint`}>{t(getFederationHintKey(federatedModule, federationEnabled))}</FieldHint>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={encryptedId}>{t('Encrypted')}</FieldLabel>
<Controller
control={control}
name='encrypted'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={encryptedId}
ref={ref}
checked={value}
disabled={e2eDisabled || federated}
onChange={onChange}
aria-describedby={`${encryptedId}-hint`}
aria-labelledby='Encrypted_channel_Label'
</FieldRow>
<FieldHint id={`${federatedId}-hint`}>{t(getFederationHintKey(federatedModule, federationEnabled))}</FieldHint>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={encryptedId}>{t('Encrypted')}</FieldLabel>
<Controller
control={control}
name='encrypted'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={encryptedId}
ref={ref}
checked={value}
disabled={e2eDisabled || federated}
onChange={onChange}
aria-describedby={`${encryptedId}-hint`}
aria-labelledby='Encrypted_channel_Label'
/>
)}
/>
)}
/>
</FieldRow>
<FieldDescription id={`${encryptedId}-hint`}>{getEncryptedHint({ isPrivate, broadcast, encrypted })}</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={readOnlyId}>{t('Read_only')}</FieldLabel>
<Controller
control={control}
name='readOnly'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={readOnlyId}
aria-describedby={`${readOnlyId}-hint`}
ref={ref}
checked={value}
disabled={!canSetReadOnly || broadcast || federated}
onChange={onChange}
</FieldRow>
<FieldDescription id={`${encryptedId}-hint`}>{getEncryptedHint({ isPrivate, broadcast, encrypted })}</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={readOnlyId}>{t('Read_only')}</FieldLabel>
<Controller
control={control}
name='readOnly'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={readOnlyId}
aria-describedby={`${readOnlyId}-hint`}
ref={ref}
checked={value}
disabled={!canSetReadOnly || broadcast || federated}
onChange={onChange}
/>
)}
/>
)}
/>
</FieldRow>
<FieldHint id={`${readOnlyId}-hint`}>
{readOnly ? t('Read_only_field_hint_enabled', { roomType: 'channel' }) : t('Anyone_can_send_new_messages')}
</FieldHint>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={broadcastId}>{t('Broadcast')}</FieldLabel>
<Controller
control={control}
name='broadcast'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
aria-describedby={`${broadcastId}-hint`}
id={broadcastId}
ref={ref}
checked={value}
disabled={!!federated}
onChange={onChange}
</FieldRow>
<FieldHint id={`${readOnlyId}-hint`}>
{readOnly ? t('Read_only_field_hint_enabled', { roomType: 'channel' }) : t('Anyone_can_send_new_messages')}
</FieldHint>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={broadcastId}>{t('Broadcast')}</FieldLabel>
<Controller
control={control}
name='broadcast'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
aria-describedby={`${broadcastId}-hint`}
id={broadcastId}
ref={ref}
checked={value}
disabled={!!federated}
onChange={onChange}
/>
)}
/>
)}
/>
</FieldRow>
{broadcast && <FieldHint id={`${broadcastId}-hint`}>{t('Broadcast_hint_enabled', { roomType: 'channel' })}</FieldHint>}
</Field>
</FieldGroup>
</FieldRow>
{broadcast && <FieldHint id={`${broadcastId}-hint`}>{t('Broadcast_hint_enabled', { roomType: 'channel' })}</FieldHint>}
</Field>
</FieldGroup>
</AccordionItem>
</Accordion>
</Modal.Content>
<Modal.Footer>
<Modal.FooterControllers>

@ -12,6 +12,8 @@ import {
FieldError,
FieldDescription,
FieldHint,
Accordion,
AccordionItem,
} from '@rocket.chat/fuselage';
import { useUniqueId } from '@rocket.chat/fuselage-hooks';
import {
@ -169,7 +171,7 @@ const CreateTeamModal = ({ onClose }: { onClose: () => void }): ReactElement =>
<Box fontScale='p2' mbe={16}>
{t('Teams_new_description')}
</Box>
<FieldGroup>
<FieldGroup mbe={24}>
<Field>
<FieldLabel required htmlFor={nameId}>
{t('Teams_New_Name_Label')}
@ -229,62 +231,77 @@ const CreateTeamModal = ({ onClose }: { onClose: () => void }): ReactElement =>
{isPrivate ? t('People_can_only_join_by_being_invited') : t('Anyone_can_access')}
</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={readOnlyId}>{t('Teams_New_Read_only_Label')}</FieldLabel>
<Controller
control={control}
name='readOnly'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={readOnlyId}
aria-describedby={`${readOnlyId}-hint`}
disabled={!canChangeReadOnly}
onChange={onChange}
checked={value}
ref={ref}
</FieldGroup>
<Accordion>
<AccordionItem title={t('Advanced_settings')}>
<FieldGroup>
<Box is='h5' fontScale='h5' color='titles-labels'>
{t('Security_and_permissions')}
</Box>
<Field>
<FieldRow>
<FieldLabel htmlFor={encryptedId}>{t('Teams_New_Encrypted_Label')}</FieldLabel>
<Controller
control={control}
name='encrypted'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={encryptedId}
disabled={!canSetReadOnly || !canChangeEncrypted}
onChange={onChange}
aria-describedby={`${encryptedId}-hint`}
checked={value}
ref={ref}
/>
)}
/>
)}
/>
</FieldRow>
<FieldDescription id={`${readOnlyId}-hint`}>
{readOnly ? t('Read_only_field_hint_enabled', { roomType: 'team' }) : t('Anyone_can_send_new_messages')}
</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={encryptedId}>{t('Teams_New_Encrypted_Label')}</FieldLabel>
<Controller
control={control}
name='encrypted'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={encryptedId}
disabled={!canSetReadOnly || !canChangeEncrypted}
onChange={onChange}
aria-describedby={`${encryptedId}-hint`}
checked={value}
ref={ref}
</FieldRow>
<FieldDescription id={`${encryptedId}-hint`}>{getEncryptedHint({ isPrivate, broadcast, encrypted })}</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={readOnlyId}>{t('Teams_New_Read_only_Label')}</FieldLabel>
<Controller
control={control}
name='readOnly'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={readOnlyId}
aria-describedby={`${readOnlyId}-hint`}
disabled={!canChangeReadOnly}
onChange={onChange}
checked={value}
ref={ref}
/>
)}
/>
)}
/>
</FieldRow>
<FieldDescription id={`${encryptedId}-hint`}>{getEncryptedHint({ isPrivate, broadcast, encrypted })}</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={broadcastId}>{t('Teams_New_Broadcast_Label')}</FieldLabel>
<Controller
control={control}
name='broadcast'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch aria-describedby={`${broadcastId}-hint`} id={broadcastId} onChange={onChange} checked={value} ref={ref} />
)}
/>
</FieldRow>
{broadcast && <FieldDescription id={`${broadcastId}-hint`}>{t('Teams_New_Broadcast_Description')}</FieldDescription>}
</Field>
</FieldGroup>
</FieldRow>
<FieldDescription id={`${readOnlyId}-hint`}>
{readOnly ? t('Read_only_field_hint_enabled', { roomType: 'team' }) : t('Anyone_can_send_new_messages')}
</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={broadcastId}>{t('Teams_New_Broadcast_Label')}</FieldLabel>
<Controller
control={control}
name='broadcast'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
aria-describedby={`${broadcastId}-hint`}
id={broadcastId}
onChange={onChange}
checked={value}
ref={ref}
/>
)}
/>
</FieldRow>
{broadcast && <FieldDescription id={`${broadcastId}-hint`}>{t('Teams_New_Broadcast_Description')}</FieldDescription>}
</Field>
</FieldGroup>
</AccordionItem>
</Accordion>
</Modal.Content>
<Modal.Footer>
<Modal.FooterControllers>

@ -12,6 +12,8 @@ import {
FieldError,
FieldHint,
FieldDescription,
Accordion,
AccordionItem,
} from '@rocket.chat/fuselage';
import { useUniqueId } from '@rocket.chat/fuselage-hooks';
import type { TranslationKey } from '@rocket.chat/ui-contexts';
@ -210,7 +212,7 @@ const CreateChannelModal = ({ teamId = '', onClose, reload }: CreateChannelModal
<Modal.Close tabIndex={-1} title={t('Close')} onClick={onClose} />
</Modal.Header>
<Modal.Content mbe={2}>
<FieldGroup>
<FieldGroup mbe={24}>
<Field>
<FieldLabel required htmlFor={nameId}>
{t('Name')}
@ -276,90 +278,99 @@ const CreateChannelModal = ({ teamId = '', onClose, reload }: CreateChannelModal
{isPrivate ? t('People_can_only_join_by_being_invited') : t('Anyone_can_access')}
</FieldHint>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={federatedId}>{t('Federation_Matrix_Federated')}</FieldLabel>
<Controller
control={control}
name='federated'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
aria-describedby={`${federatedId}-hint`}
id={federatedId}
ref={ref}
checked={value}
disabled={!canUseFederation}
onChange={onChange}
</FieldGroup>
<Accordion>
<AccordionItem title={t('Advanced_settings')}>
<FieldGroup>
<Box is='h5' fontScale='h5' color='titles-labels'>
{t('Security_and_permissions')}
</Box>
<Field>
<FieldRow>
<FieldLabel htmlFor={federatedId}>{t('Federation_Matrix_Federated')}</FieldLabel>
<Controller
control={control}
name='federated'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
aria-describedby={`${federatedId}-hint`}
id={federatedId}
ref={ref}
checked={value}
disabled={!canUseFederation}
onChange={onChange}
/>
)}
/>
)}
/>
</FieldRow>
<FieldHint id={`${federatedId}-hint`}>{t(getFederationHintKey(federatedModule, federationEnabled))}</FieldHint>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={encryptedId}>{t('Encrypted')}</FieldLabel>
<Controller
control={control}
name='encrypted'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={encryptedId}
ref={ref}
checked={value}
disabled={e2eDisabled || federated}
onChange={onChange}
aria-describedby={`${encryptedId}-hint`}
aria-labelledby='Encrypted_channel_Label'
</FieldRow>
<FieldHint id={`${federatedId}-hint`}>{t(getFederationHintKey(federatedModule, federationEnabled))}</FieldHint>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={encryptedId}>{t('Encrypted')}</FieldLabel>
<Controller
control={control}
name='encrypted'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={encryptedId}
ref={ref}
checked={value}
disabled={e2eDisabled || federated}
onChange={onChange}
aria-describedby={`${encryptedId}-hint`}
aria-labelledby='Encrypted_channel_Label'
/>
)}
/>
)}
/>
</FieldRow>
<FieldDescription id={`${encryptedId}-hint`}>{getEncryptedHint({ isPrivate, broadcast, encrypted })}</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={readOnlyId}>{t('Read_only')}</FieldLabel>
<Controller
control={control}
name='readOnly'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={readOnlyId}
aria-describedby={`${readOnlyId}-hint`}
ref={ref}
checked={value}
disabled={!canSetReadOnly || broadcast || federated}
onChange={onChange}
</FieldRow>
<FieldDescription id={`${encryptedId}-hint`}>{getEncryptedHint({ isPrivate, broadcast, encrypted })}</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={readOnlyId}>{t('Read_only')}</FieldLabel>
<Controller
control={control}
name='readOnly'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={readOnlyId}
aria-describedby={`${readOnlyId}-hint`}
ref={ref}
checked={value}
disabled={!canSetReadOnly || broadcast || federated}
onChange={onChange}
/>
)}
/>
)}
/>
</FieldRow>
<FieldHint id={`${readOnlyId}-hint`}>
{readOnly ? t('Read_only_field_hint_enabled', { roomType: 'channel' }) : t('Anyone_can_send_new_messages')}
</FieldHint>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={broadcastId}>{t('Broadcast')}</FieldLabel>
<Controller
control={control}
name='broadcast'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
aria-describedby={`${broadcastId}-hint`}
id={broadcastId}
ref={ref}
checked={value}
disabled={!!federated}
onChange={onChange}
</FieldRow>
<FieldHint id={`${readOnlyId}-hint`}>
{readOnly ? t('Read_only_field_hint_enabled', { roomType: 'channel' }) : t('Anyone_can_send_new_messages')}
</FieldHint>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={broadcastId}>{t('Broadcast')}</FieldLabel>
<Controller
control={control}
name='broadcast'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
aria-describedby={`${broadcastId}-hint`}
id={broadcastId}
ref={ref}
checked={value}
disabled={!!federated}
onChange={onChange}
/>
)}
/>
)}
/>
</FieldRow>
{broadcast && <FieldHint id={`${broadcastId}-hint`}>{t('Broadcast_hint_enabled', { roomType: 'channel' })}</FieldHint>}
</Field>
</FieldGroup>
</FieldRow>
{broadcast && <FieldHint id={`${broadcastId}-hint`}>{t('Broadcast_hint_enabled', { roomType: 'channel' })}</FieldHint>}
</Field>
</FieldGroup>
</AccordionItem>
</Accordion>
</Modal.Content>
<Modal.Footer>
<Modal.FooterControllers>

@ -12,6 +12,8 @@ import {
FieldError,
FieldDescription,
FieldHint,
Accordion,
AccordionItem,
} from '@rocket.chat/fuselage';
import { useUniqueId } from '@rocket.chat/fuselage-hooks';
import {
@ -171,7 +173,7 @@ const CreateTeamModal = ({ onClose }: CreateTeamModalProps) => {
<Box fontScale='p2' mbe={16}>
{t('Teams_new_description')}
</Box>
<FieldGroup>
<FieldGroup mbe={24}>
<Field>
<FieldLabel required htmlFor={nameId}>
{t('Teams_New_Name_Label')}
@ -231,62 +233,77 @@ const CreateTeamModal = ({ onClose }: CreateTeamModalProps) => {
{isPrivate ? t('People_can_only_join_by_being_invited') : t('Anyone_can_access')}
</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={readOnlyId}>{t('Teams_New_Read_only_Label')}</FieldLabel>
<Controller
control={control}
name='readOnly'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={readOnlyId}
aria-describedby={`${readOnlyId}-hint`}
disabled={!canChangeReadOnly}
onChange={onChange}
checked={value}
ref={ref}
</FieldGroup>
<Accordion>
<AccordionItem title={t('Advanced_settings')}>
<FieldGroup>
<Box is='h5' fontScale='h5' color='titles-labels'>
{t('Security_and_permissions')}
</Box>
<Field>
<FieldRow>
<FieldLabel htmlFor={encryptedId}>{t('Teams_New_Encrypted_Label')}</FieldLabel>
<Controller
control={control}
name='encrypted'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={encryptedId}
disabled={!canSetReadOnly || !canChangeEncrypted}
onChange={onChange}
aria-describedby={`${encryptedId}-hint`}
checked={value}
ref={ref}
/>
)}
/>
)}
/>
</FieldRow>
<FieldDescription id={`${readOnlyId}-hint`}>
{readOnly ? t('Read_only_field_hint_enabled', { roomType: 'team' }) : t('Anyone_can_send_new_messages')}
</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={encryptedId}>{t('Teams_New_Encrypted_Label')}</FieldLabel>
<Controller
control={control}
name='encrypted'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={encryptedId}
disabled={!canSetReadOnly || !canChangeEncrypted}
onChange={onChange}
aria-describedby={`${encryptedId}-hint`}
checked={value}
ref={ref}
</FieldRow>
<FieldDescription id={`${encryptedId}-hint`}>{getEncryptedHint({ isPrivate, broadcast, encrypted })}</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={readOnlyId}>{t('Teams_New_Read_only_Label')}</FieldLabel>
<Controller
control={control}
name='readOnly'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
id={readOnlyId}
aria-describedby={`${readOnlyId}-hint`}
disabled={!canChangeReadOnly}
onChange={onChange}
checked={value}
ref={ref}
/>
)}
/>
)}
/>
</FieldRow>
<FieldDescription id={`${encryptedId}-hint`}>{getEncryptedHint({ isPrivate, broadcast, encrypted })}</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={broadcastId}>{t('Teams_New_Broadcast_Label')}</FieldLabel>
<Controller
control={control}
name='broadcast'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch aria-describedby={`${broadcastId}-hint`} id={broadcastId} onChange={onChange} checked={value} ref={ref} />
)}
/>
</FieldRow>
{broadcast && <FieldDescription id={`${broadcastId}-hint`}>{t('Teams_New_Broadcast_Description')}</FieldDescription>}
</Field>
</FieldGroup>
</FieldRow>
<FieldDescription id={`${readOnlyId}-hint`}>
{readOnly ? t('Read_only_field_hint_enabled', { roomType: 'team' }) : t('Anyone_can_send_new_messages')}
</FieldDescription>
</Field>
<Field>
<FieldRow>
<FieldLabel htmlFor={broadcastId}>{t('Teams_New_Broadcast_Label')}</FieldLabel>
<Controller
control={control}
name='broadcast'
render={({ field: { onChange, value, ref } }): ReactElement => (
<ToggleSwitch
aria-describedby={`${broadcastId}-hint`}
id={broadcastId}
onChange={onChange}
checked={value}
ref={ref}
/>
)}
/>
</FieldRow>
{broadcast && <FieldDescription id={`${broadcastId}-hint`}>{t('Teams_New_Broadcast_Description')}</FieldDescription>}
</Field>
</FieldGroup>
</AccordionItem>
</Accordion>
</Modal.Content>
<Modal.Footer>
<Modal.FooterControllers>

@ -320,6 +320,7 @@ test.describe.serial('channel-management', () => {
await poHomeChannel.sidenav.openNewByLabel('Channel');
await poHomeChannel.sidenav.inputChannelName.fill(channelName);
await poHomeChannel.sidenav.checkboxPrivateChannel.click();
await poHomeChannel.sidenav.advancedSettingsAccordion.click();
await poHomeChannel.sidenav.checkboxReadOnly.click();
await poHomeChannel.sidenav.btnCreate.click();

@ -351,6 +351,7 @@ test.describe.serial('e2e-encryption', () => {
await poHomeChannel.sidenav.openNewByLabel('Channel');
await poHomeChannel.sidenav.inputChannelName.fill(channelName);
await poHomeChannel.sidenav.advancedSettingsAccordion.click();
await poHomeChannel.sidenav.checkboxEncryption.click();
await poHomeChannel.sidenav.btnCreate.click();
@ -661,6 +662,7 @@ test.describe.serial('e2ee room setup', () => {
await poHomeChannel.sidenav.openNewByLabel('Channel');
await poHomeChannel.sidenav.inputChannelName.fill(channelName);
await poHomeChannel.sidenav.advancedSettingsAccordion.click();
await poHomeChannel.sidenav.checkboxEncryption.click();
await poHomeChannel.sidenav.btnCreate.click();
@ -711,6 +713,7 @@ test.describe.serial('e2ee room setup', () => {
await poHomeChannel.sidenav.openNewByLabel('Channel');
await poHomeChannel.sidenav.inputChannelName.fill(channelName);
await poHomeChannel.sidenav.advancedSettingsAccordion.click();
await poHomeChannel.sidenav.checkboxEncryption.click();
await poHomeChannel.sidenav.btnCreate.click();
@ -758,6 +761,7 @@ test.describe.serial('e2ee room setup', () => {
await poHomeChannel.sidenav.openNewByLabel('Channel');
await poHomeChannel.sidenav.inputChannelName.fill(channelName);
await poHomeChannel.sidenav.advancedSettingsAccordion.click();
await poHomeChannel.sidenav.checkboxEncryption.click();
await poHomeChannel.sidenav.btnCreate.click();

@ -9,6 +9,10 @@ export class HomeSidenav {
this.page = page;
}
get advancedSettingsAccordion(): Locator {
return this.page.getByRole('dialog').getByRole('button', { name: 'Advanced settings', exact: true });
}
get checkboxPrivateChannel(): Locator {
return this.page.locator('label', { has: this.page.getByRole('checkbox', { name: 'Private' }) });
}
@ -154,6 +158,7 @@ export class HomeSidenav {
async createEncryptedChannel(name: string) {
await this.openNewByLabel('Channel');
await this.inputChannelName.type(name);
await this.advancedSettingsAccordion.click();
await this.checkboxEncryption.click();
await this.btnCreate.click();
}

@ -46,6 +46,7 @@ test.describe.serial('teams-management', () => {
test('expect create "targetTeamReadOnly" readonly', async ({ page }) => {
await poHomeTeam.sidenav.openNewByLabel('Team');
await poHomeTeam.inputTeamName.type(targetTeamReadOnly);
await poHomeTeam.sidenav.advancedSettingsAccordion.click();
await poHomeTeam.textReadOnly.click();
await poHomeTeam.addMember('user1');
await poHomeTeam.btnTeamCreate.click();

@ -6498,5 +6498,7 @@
"Workspace_and_user_settings": "Workspace and user settings",
"Sidebar_Sections_Order": "Sidebar sections order",
"Sidebar_Sections_Order_Description": "Select the categories in your preferred order",
"Incoming_Calls": "Incoming calls"
"Incoming_Calls": "Incoming calls",
"Advanced_settings": "Advanced settings",
"Security_and_permissions": "Security and permissions"
}

Loading…
Cancel
Save