style: format locator selector
parent
4d4308af78
commit
8ee62f0ac8
|
|
@ -16,7 +16,8 @@ function resolveLocator(
|
||||||
page: LocatorPage,
|
page: LocatorPage,
|
||||||
opts: { ref?: string; selector?: string },
|
opts: { ref?: string; selector?: string },
|
||||||
) {
|
) {
|
||||||
const selector = typeof opts.selector === "string" ? opts.selector.trim() : "";
|
const selector =
|
||||||
|
typeof opts.selector === "string" ? opts.selector.trim() : "";
|
||||||
if (selector) return page.locator(selector);
|
if (selector) return page.locator(selector);
|
||||||
const ref = typeof opts.ref === "string" ? opts.ref.trim() : "";
|
const ref = typeof opts.ref === "string" ? opts.ref.trim() : "";
|
||||||
if (ref) return refLocator(page, ref);
|
if (ref) return refLocator(page, ref);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue