MCPcopy
hub / github.com/signalapp/Signal-Desktop / start

Method start

ts/test-mock/playwright.node.ts:63–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

61 }
62
63 public async start(): Promise<void> {
64 try {
65 // launch the electron processs
66 this.#privApp = await electron.launch({
67 executablePath: this.#options.main,
68 args: this.#options.args.slice(),
69 env: {
70 ...process.env,
71 MOCK_TEST: 'true',
72 SIGNAL_CI_CONFIG: this.#options.config,
73 },
74 locale: 'en',
75 timeout: 30 * SECOND,
76 });
77
78 // wait for the first window to load
79 await pTimeout(
80 (async () => {
81 const page = await this.getWindow();
82 if (process.env.TRACING) {
83 await page.context().tracing.start({
84 name: 'tracing',
85 screenshots: true,
86 snapshots: true,
87 });
88 }
89 await page?.emulateMedia({ reducedMotion: 'reduce' });
90 await page?.waitForLoadState('load');
91 })(),
92 { milliseconds: 20 * SECOND }
93 );
94 } catch (e) {
95 this.#privApp?.process().kill('SIGKILL');
96 throw e;
97 }
98
99 this.#privApp.on('close', () => this.emit('close'));
100
101 drop(this.#printLoop());
102 }
103
104 public async waitForProvisionURL(): Promise<string> {
105 return this.#waitForEvent('provisioning-url');

Callers 15

startAppMethod · 0.95
startAppFunction · 0.45
startFunction · 0.45
afterEveryAuthConnectFunction · 0.45
onEmptyFunction · 0.45
LightboxFunction · 0.45
BarsFunction · 0.45
TypingBubbleAvatarFunction · 0.45
TypingBubbleFunction · 0.45
TimelineFloatingHeaderFunction · 0.45

Calls 6

getWindowMethod · 0.95
emitMethod · 0.95
#printLoopMethod · 0.95
dropFunction · 0.90
processMethod · 0.80
onMethod · 0.45

Tested by

no test coverage detected