This commit is contained in:
2025-12-16 13:53:23 +01:00
parent 84f05598a6
commit 29dc11deb9
127 changed files with 538 additions and 547 deletions

View File

@@ -7,7 +7,7 @@ describe('PageStateValidator', () => {
describe('validateState', () => {
it('should return valid when all required selectors are present', () => {
// Arrange
const actualState = (selector: string) => {
const actualState = (_selector: string) => {
return ['#add-car-button', '#cars-list'].includes(selector);
};
@@ -27,7 +27,7 @@ describe('PageStateValidator', () => {
it('should return invalid when required selectors are missing', () => {
// Arrange
const actualState = (selector: string) => {
const actualState = (_selector: string) => {
return selector === '#add-car-button'; // Only one of two selectors present
};
@@ -48,7 +48,7 @@ describe('PageStateValidator', () => {
it('should return invalid when forbidden selectors are present', () => {
// Arrange
const actualState = (selector: string) => {
const actualState = (_selector: string) => {
return ['#add-car-button', '#set-track'].includes(selector);
};
@@ -70,7 +70,7 @@ describe('PageStateValidator', () => {
it('should handle empty forbidden selectors array', () => {
// Arrange
const actualState = (selector: string) => {
const actualState = (_selector: string) => {
return selector === '#add-car-button';
};
@@ -89,7 +89,7 @@ describe('PageStateValidator', () => {
it('should handle undefined forbidden selectors', () => {
// Arrange
const actualState = (selector: string) => {
const actualState = (_selector: string) => {
return selector === '#add-car-button';
};
@@ -108,7 +108,7 @@ describe('PageStateValidator', () => {
it('should return error result when actualState function throws', () => {
// Arrange
const actualState = (selector: string) => {
const actualState = (_selector: string) => {
throw new Error('Selector evaluation failed');
};
@@ -144,7 +144,7 @@ describe('PageStateValidator', () => {
it('should validate complex state with both required and forbidden selectors', () => {
// Arrange - Simulate being on Cars page but Track page elements leaked through
const actualState = (selector: string) => {
const actualState = (_selector: string) => {
const presentSelectors = ['#add-car-button', '#cars-list', '#set-track'];
return presentSelectors.includes(selector);
};