-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathLocalization.test.ts
More file actions
25 lines (22 loc) · 1.28 KB
/
Localization.test.ts
File metadata and controls
25 lines (22 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { buildUrlWithMockAdapter, defaultMockCallAdapterState, test } from './fixture';
import { waitForCallCompositeToLoad, stableScreenshot, waitForSelector, dataUiId } from '../../common/utils';
import { expect } from '@playwright/test';
import { IDS } from '../../common/constants';
test.describe('Localization tests', async () => {
test('Configuration page title and participant button in call should be localized', async ({ page, serverUrl }) => {
const initialState = defaultMockCallAdapterState();
initialState.page = 'configuration';
initialState.call = undefined;
await page.goto(buildUrlWithMockAdapter(serverUrl, initialState, { useFrLocale: 'true' }));
await waitForCallCompositeToLoad(page);
expect(await stableScreenshot(page)).toMatchSnapshot('localized-call-configuration-page.png');
});
test('Participant button in call should be localized', async ({ page, serverUrl }) => {
const initialState = defaultMockCallAdapterState();
await page.goto(buildUrlWithMockAdapter(serverUrl, initialState, { useFrLocale: 'true' }));
await waitForSelector(page, dataUiId(IDS.videoGallery));
expect(await stableScreenshot(page)).toMatchSnapshot('localized-call-screen.png');
});
});