This commit is contained in:
2025-12-12 23:49:56 +01:00
parent cae81b1088
commit 8f1db21fb1
29 changed files with 879 additions and 399 deletions

View File

@@ -438,7 +438,7 @@ export class PlaywrightAutomationAdapter implements IBrowserAutomation, Authenti
private static readonly PAUSE_CHECK_INTERVAL = 300;
/** Checkout confirmation callback - called before clicking checkout button */
private checkoutConfirmationCallback?: (price: CheckoutPrice, state: CheckoutState) => Promise<CheckoutConfirmation>;
private checkoutConfirmationCallback: ((price: CheckoutPrice, state: CheckoutState) => Promise<CheckoutConfirmation>) | undefined;
/** Page state validator instance */
private pageStateValidator: PageStateValidator;

View File

@@ -508,7 +508,7 @@ export class IRacingDomInteractor {
for (const sel of cands) {
try {
const els = Array.from(document.querySelectorAll(sel)) as HTMLInputElement[];
const els = Array.from(document.querySelectorAll(sel)) as HTMLElement[];
if (els.length === 0) continue;
for (const el of els) {
try {
@@ -516,10 +516,10 @@ export class IRacingDomInteractor {
(el as HTMLInputElement).checked = Boolean(should);
el.dispatchEvent(new Event('change', { bubbles: true }));
} else {
(el as HTMLElement).setAttribute('aria-checked', String(Boolean(should)));
el.setAttribute('aria-checked', String(Boolean(should)));
el.dispatchEvent(new Event('change', { bubbles: true }));
try {
(el as HTMLElement).click();
el.click();
} catch {
// ignore
}
@@ -615,7 +615,7 @@ export class IRacingDomInteractor {
const applied = await page.evaluate(
({ sel, val }) => {
try {
const els = Array.from(document.querySelectorAll(sel)) as HTMLElement[];
const els = Array.from(document.querySelectorAll(sel)) as HTMLInputElement[];
if (els.length === 0) return false;
for (const el of els) {
try {