Remove circular dependency.

This commit is contained in:
HarelM
2026-07-09 15:38:41 +03:00
parent dd04c14d96
commit b76d9cbe29
3 changed files with 11 additions and 8 deletions
+5 -5
View File
@@ -1,12 +1,12 @@
import { v1 as uuid } from "uuid";
import type { MaputnikDriver } from "./maputnik-driver";
import { PlaywrightHelper } from "./playwright-helper";
export class ModalDriver {
constructor(private readonly driver: MaputnikDriver) {}
private readonly helper = new PlaywrightHelper();
public when = {
fillLayers: async (opts: { type: string; layer?: string; id?: string }) => {
const { when, get, then } = this.driver;
const { when, get, then } = this.helper;
const id = opts.id ?? `${opts.type}:${uuid()}`;
await when.select("add-layer.layer-type.select", opts.type);
@@ -28,11 +28,11 @@ export class ModalDriver {
},
open: async () => {
await this.driver.when.click("layer-list:add-layer");
await this.helper.when.click("layer-list:add-layer");
},
close: async (key: string) => {
await this.driver.when.click(key + ".close-modal");
await this.helper.when.click(key + ".close-modal");
},
};
}