angular/tools/saucelabs-daemon/ipc-messages.ts
Joey Perrott 9dbe6fc18b refactor: update license text to point to angular.dev (#57901)
Update license text to point to angular.dev instead of angular.io

PR Close #57901
2024-09-24 15:33:00 +02:00

39 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.dev/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;