Skip to content

Commit

Permalink
Remove unnecessary data-qa-id
Browse files Browse the repository at this point in the history
  • Loading branch information
rique223 committed Jan 13, 2025
1 parent 337a5fe commit 55b63ff
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 55 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const AccountPreferencesPage = (): ReactElement => {
<PageFooter isDirty={isDirty}>
<ButtonGroup>
<Button onClick={() => reset(preferencesValues)}>{t('Cancel')}</Button>
<Button form={preferencesFormId} data-qa='AccountPreferencesPageSaveButton' primary type='submit'>
<Button form={preferencesFormId} primary type='submit'>
{t('Save_changes')}
</Button>
</ButtonGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const PreferencesSoundSection = () => {
control={control}
render={({ field: { onChange, value } }) => (
<Slider
aria-labelledby={masterVolumeId}
aria-label={t('Master_volume')}
aria-describedby={`${masterVolumeId}-hint`}
value={value}
minValue={0}
Expand All @@ -55,7 +55,7 @@ const PreferencesSoundSection = () => {
control={control}
render={({ field: { onChange, value } }) => (
<Slider
aria-labelledby={notificationsSoundVolumeId}
aria-label={t('Notification_volume')}
aria-describedby={`${notificationsSoundVolumeId}-hint`}
value={value}
minValue={0}
Expand All @@ -71,7 +71,9 @@ const PreferencesSoundSection = () => {
</FieldRow>
</Field>
<Field>
<FieldLabel aria-describedby={`${callRingerVolumeId}-hint`}>{t('Call_ringer_volume')}</FieldLabel>
<FieldLabel aria-describedby={`${callRingerVolumeId}-hint`}>

Check failure on line 74 in apps/meteor/client/views/account/preferences/PreferencesSoundSection.tsx

View workflow job for this annotation

GitHub Actions / 🔎 Code Check / Code Lint

Replace `⏎↹↹↹↹↹↹{t('Call_ringer_volume')}⏎↹↹↹↹↹` with `{t('Call_ringer_volume')}`
{t('Call_ringer_volume')}
</FieldLabel>
<FieldHint id={`${callRingerVolumeId}-hint`} mbe={4}>
{t('Call_ringer_volume_hint')}
</FieldHint>
Expand All @@ -81,7 +83,7 @@ const PreferencesSoundSection = () => {
control={control}
render={({ field: { onChange, value } }) => (
<Slider
aria-labelledby={callRingerVolumeId}
aria-label={t('Call_ringer_volume')}
aria-describedby={`${callRingerVolumeId}-hint`}
value={value}
minValue={0}
Expand Down
6 changes: 1 addition & 5 deletions apps/meteor/tests/e2e/page-objects/account-profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ export class AccountProfile {
}

get preferencesCallRingerVolumeSlider(): Locator {
return this.page.locator('label:has-text("Call ringer volume")').locator('..').locator('input[type="range"]');
}

get preferencesBtnSubmit(): Locator {
return this.page.locator('[data-qa="AccountPreferencesPageSaveButton"]');
return this.page.getByRole('slider', { name: 'Call Ringer Volume' });
}

get btnClose(): Locator {
Expand Down
48 changes: 3 additions & 45 deletions apps/meteor/tests/e2e/video-conference-ring.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,26 @@ import type { Page } from '@playwright/test';
import { IS_EE } from './config/constants';
import { createAuxContext } from './fixtures/createAuxContext';
import { Users } from './fixtures/userStates';
import { HomeChannel, AccountProfile } from './page-objects';
import { HomeChannel } from './page-objects';
import { expect, test } from './utils/test';

test.use({ storageState: Users.user1.state });

test.describe('video conference ringing', () => {
let poHomeChannel: HomeChannel;
let poAccountProfile: AccountProfile;

test.skip(!IS_EE, 'Enterprise Only');

test.beforeEach(async ({ page }) => {
poHomeChannel = new HomeChannel(page);
poAccountProfile = new AccountProfile(page);

await page.goto('/home');
});

let auxContext: { page: Page; poHomeChannel: HomeChannel; poAccountProfile: AccountProfile };
let auxContext: { page: Page; poHomeChannel: HomeChannel };
test.beforeEach(async ({ browser }) => {
const { page } = await createAuxContext(browser, Users.user2);
auxContext = { page, poHomeChannel: new HomeChannel(page), poAccountProfile: new AccountProfile(page) };
auxContext = { page, poHomeChannel: new HomeChannel(page) };
});

test.afterEach(async () => {
Expand All @@ -46,44 +44,4 @@ test.describe('video conference ringing', () => {

await auxContext.page.close();
});

test('expect call to be ringing/dialing according to volume preference', async ({ page }) => {
await poHomeChannel.sidenav.userProfileMenu.click();
await poHomeChannel.sidenav.accountPreferencesOption.click();

await poAccountProfile.preferencesSoundAccordionOption.click();
await poAccountProfile.preferencesCallRingerVolumeSlider.fill('50');

await poAccountProfile.preferencesBtnSubmit.click();
await poAccountProfile.btnClose.click();

await auxContext.poHomeChannel.sidenav.userProfileMenu.click();
await auxContext.poHomeChannel.sidenav.accountPreferencesOption.click();

await auxContext.poAccountProfile.preferencesSoundAccordionOption.click();
await auxContext.poAccountProfile.preferencesCallRingerVolumeSlider.fill('25');

await auxContext.poAccountProfile.preferencesBtnSubmit.click();
await auxContext.poAccountProfile.btnClose.click();

await poHomeChannel.sidenav.openChat('user2');
await auxContext.poHomeChannel.sidenav.openChat('user1');

await poHomeChannel.content.btnCall.click();
await poHomeChannel.content.menuItemVideoCall.click();
await poHomeChannel.content.btnStartVideoCall.click();

console.log(
await poHomeChannel.videoConfRingtoneVolume.evaluate((el: HTMLAudioElement) => ({
volume: el.volume,
currentTime: el.currentTime,
duration: el.duration,
paused: el.paused,
muted: el.muted,
src: el.src,
readyState: el.readyState,
networkState: el.networkState,
})),
);
});
});

0 comments on commit 55b63ff

Please sign in to comment.