Files
Greg Magolan 5a9059be38 build: share Saucelabs browsers between karma test targets using background Saucelabs daemon and custom karma launcher (#49200)
This upgrades the Saucelabs Bazel step on CI to use the more efficient Saucelabs daemon

PR Close #49200
2023-05-15 09:21:46 -07:00

36 lines
1.2 KiB
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
/** Message that can be sent to the daemon to start a given test. */
export class StartTestMessage {
readonly type = 'start-test';
constructor(public url: string, public browserId: string, public testDescription: string) {}
}
/** Message that can be sent to the daemon if a test completed. */
export class EndTestMessage {
readonly type = 'end-test';
}
/** Message being sent from the daemon if a request browser is not available. */
export class NoAvailableBrowserMessage {
readonly type = 'browser-not-ready';
}
/** Message that indicates an internal error in background service. */
export class InternalErrorMessage {
readonly type = 'internal-error';
constructor(public msg: string) {}
}
/** Type of messages the background service can receive. */
export type BackgroundServiceReceiveMessages = StartTestMessage|EndTestMessage;
/** Type of messages the background services can send to clients. */
export type BackgroundServiceSendMessages = NoAvailableBrowserMessage|InternalErrorMessage;