linting
This commit is contained in:
@@ -26,7 +26,7 @@ export interface PageStateValidationResult {
|
||||
}
|
||||
|
||||
export interface PageStateValidationInput {
|
||||
actualState: (selector: string) => boolean;
|
||||
actualState: (_selector: string) => boolean;
|
||||
validation: PageStateValidation;
|
||||
realMode?: boolean;
|
||||
}
|
||||
@@ -59,14 +59,14 @@ export class PageStateValidator
|
||||
* @returns Result with validation outcome
|
||||
*/
|
||||
validateState(
|
||||
actualState: (selector: string) => boolean,
|
||||
actualState: (_selector: string) => boolean,
|
||||
validation: PageStateValidation
|
||||
): Result<PageStateValidationResult, Error> {
|
||||
try {
|
||||
const { expectedStep, requiredSelectors, forbiddenSelectors = [] } = validation;
|
||||
|
||||
// Check required selectors are present
|
||||
const missingSelectors = requiredSelectors.filter(selector => !actualState(selector));
|
||||
const missingSelectors = requiredSelectors.filter(_selector => !actualState(_selector));
|
||||
|
||||
if (missingSelectors.length > 0) {
|
||||
const result: PageStateValidationResult = {
|
||||
@@ -79,7 +79,7 @@ export class PageStateValidator
|
||||
}
|
||||
|
||||
// Check forbidden selectors are absent
|
||||
const unexpectedSelectors = forbiddenSelectors.filter(selector => actualState(selector));
|
||||
const unexpectedSelectors = forbiddenSelectors.filter(_selector => actualState(_selector));
|
||||
|
||||
if (unexpectedSelectors.length > 0) {
|
||||
const result: PageStateValidationResult = {
|
||||
@@ -118,7 +118,7 @@ export class PageStateValidator
|
||||
* @returns Result with validation outcome
|
||||
*/
|
||||
validateStateEnhanced(
|
||||
actualState: (selector: string) => boolean,
|
||||
actualState: (_selector: string) => boolean,
|
||||
validation: PageStateValidation,
|
||||
realMode: boolean = false
|
||||
): Result<PageStateValidationResult, Error> {
|
||||
@@ -183,7 +183,7 @@ export class PageStateValidator
|
||||
}
|
||||
|
||||
// Check required selectors are present (with fallbacks for real mode)
|
||||
const missingSelectors = requiredSelectors.filter(selector => {
|
||||
const missingSelectors = requiredSelectors.filter(_selector => {
|
||||
if (realMode) {
|
||||
const relatedSelectors = selectorsToCheck.filter(s =>
|
||||
s.includes(expectedStep) ||
|
||||
@@ -212,7 +212,7 @@ export class PageStateValidator
|
||||
}
|
||||
|
||||
// Check forbidden selectors are absent
|
||||
const unexpectedSelectors = forbiddenSelectors.filter(selector => actualState(selector));
|
||||
const unexpectedSelectors = forbiddenSelectors.filter(_selector => actualState(_selector));
|
||||
|
||||
if (unexpectedSelectors.length > 0) {
|
||||
const result: PageStateValidationResult = {
|
||||
|
||||
Reference in New Issue
Block a user