tests: give mock clients numbered captions

This commit is contained in:
Peter Fajdiga
2025-01-15 11:47:26 +01:00
parent 9feeb0f23e
commit bca0158df9
2 changed files with 6 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ class MockKwinClient {
private static readonly borderThickness = 10;
public readonly shadeable: boolean = false;
public readonly caption = "App";
public caption = "App";
public minSize: Readonly<QmlSize> = new MockQmlSize(0, 0);
public readonly transient: boolean;
public readonly move: boolean = false;
@@ -197,4 +197,8 @@ class MockKwinClient {
public getFrameGeometryCopy() {
return this._frameGeometry.clone();
}
public toString() {
return `MockKwinClient("${this.caption}")`;
}
}

View File

@@ -41,6 +41,7 @@ class MockWorkspace {
public createClientsWithFrames(...frames: MockQmlRect[]) {
const clients = frames.map(rect => new MockKwinClient(rect));
clients.forEach((client, index) => client.caption = `Client ${index}`);
this.createWindows(...clients);
return clients;
}