Ensure chats pane in settings is visible
This commit is contained in:
parent
b379ec115d
commit
38adef4233
9 changed files with 33 additions and 11 deletions
|
@ -4,6 +4,7 @@
|
|||
import { config } from './config';
|
||||
import {
|
||||
getEnvironment,
|
||||
isTestEnvironment,
|
||||
parseEnvironment,
|
||||
setEnvironment,
|
||||
} from '../environment';
|
||||
|
@ -12,4 +13,7 @@ setEnvironment(parseEnvironment(config.environment));
|
|||
|
||||
const environment = getEnvironment();
|
||||
|
||||
export { environment };
|
||||
const isTestOrMockEnvironment =
|
||||
isTestEnvironment(environment) || Boolean(process.env.MOCK_TEST);
|
||||
|
||||
export { environment, isTestOrMockEnvironment };
|
||||
|
|
|
@ -59,6 +59,7 @@ export class App extends EventEmitter {
|
|||
args: this.options.args.slice(),
|
||||
env: {
|
||||
...process.env,
|
||||
MOCK_TEST: 'true',
|
||||
SIGNAL_CI_CONFIG: this.options.config,
|
||||
},
|
||||
locale: 'en',
|
||||
|
|
|
@ -31,14 +31,27 @@ describe('settings', function (this: Mocha.Suite) {
|
|||
await bootstrap.teardown();
|
||||
});
|
||||
|
||||
it('settings window loads when opened', async () => {
|
||||
it('settings window and all panes load when opened', async () => {
|
||||
const window = await app.getWindow();
|
||||
|
||||
const newPagePromise = window.context().waitForEvent('page');
|
||||
await window.locator('.NavTabs__ItemIcon--Settings').click();
|
||||
const settingsWindow = await newPagePromise;
|
||||
await settingsWindow.getByText('Device Name').waitFor();
|
||||
|
||||
await settingsWindow.getByText('Appearance').click();
|
||||
await settingsWindow.getByText('Language').first().waitFor();
|
||||
|
||||
await settingsWindow.getByText('Chats').click();
|
||||
await settingsWindow.getByText('Sent media quality').waitFor();
|
||||
|
||||
await settingsWindow.getByText('Calls').click();
|
||||
await settingsWindow.getByText('Enable incoming calls').waitFor();
|
||||
|
||||
await settingsWindow.getByText('Notifications').click();
|
||||
await settingsWindow.getByText('Notification content').waitFor();
|
||||
|
||||
await settingsWindow.getByText('Privacy').click();
|
||||
await settingsWindow.getByText('Read receipts').waitFor();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -208,7 +208,7 @@ export function _bidiIsolate(text: string): string {
|
|||
* ```
|
||||
*/
|
||||
export function bidiIsolate(text: string): string {
|
||||
if (process.env.IS_TESTS != null) {
|
||||
if (window.SignalContext.isTestOrMockEnvironment()) {
|
||||
// Turn this off in tests to make it easier to compare strings
|
||||
return text;
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ export type MinimalSignalContextType = {
|
|||
getNodeVersion: () => string;
|
||||
getPath: (name: 'userData' | 'home' | 'install') => string;
|
||||
getVersion: () => string;
|
||||
isTestOrMockEnvironment: () => boolean;
|
||||
nativeThemeListener: NativeThemeType;
|
||||
restartApp: () => void;
|
||||
Settings: {
|
||||
|
|
|
@ -10,7 +10,7 @@ import { activeWindowService } from '../context/activeWindowService';
|
|||
import { config } from '../context/config';
|
||||
import { createNativeThemeListener } from '../context/createNativeThemeListener';
|
||||
import { createSetting } from '../util/preload';
|
||||
import { environment } from '../context/environment';
|
||||
import { environment, isTestOrMockEnvironment } from '../context/environment';
|
||||
import {
|
||||
localeDisplayNames,
|
||||
countryDisplayNames,
|
||||
|
@ -52,6 +52,7 @@ export const MinimalSignalContext: MinimalSignalContextType = {
|
|||
getHourCyclePreference: () => config.hourCyclePreference,
|
||||
getPreferredSystemLocales: () => config.preferredSystemLocales,
|
||||
getLocaleOverride: () => config.localeOverride,
|
||||
isTestOrMockEnvironment: () => isTestOrMockEnvironment,
|
||||
nativeThemeListener: createNativeThemeListener(ipcRenderer, window),
|
||||
restartApp: () => ipcRenderer.send('restart'),
|
||||
OS: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue