tests: give mock clients numbered captions
This commit is contained in:
@@ -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}")`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user