ConceptCreator/e2e/game-model/gamesystems/productGamesystems/EqualInnerStates.spec.ts
Sebastian Böckelmann e336bf19f9
Some checks failed
E2E Testing / test (push) Failing after 1m54s
Fix import of GameModel in Testcases properly this time
2024-03-22 08:05:07 +01:00

26 lines
1.2 KiB
TypeScript

import { test, expect } from '@playwright/test';
import {ProductStateTrainer} from "./ProductStateTrainer";
test.describe('Test Check Equal of Innerstates', () => {
test("Test invalid input for equal checking", async()=> {
const gamesystem = ProductStateTrainer.givenFullProductGamesystemWithTwoStates();
expect(gamesystem.states[0].equalInnerStates(null)).toBeFalsy();
expect(gamesystem.states[0].equalInnerStates(undefined)).toBeFalsy();
})
test("Test empty input for equal checking", async ()=> {
const gamesystem = ProductStateTrainer.givenFullProductGamesystemWithTwoStates();
expect(gamesystem.states[0].equalInnerStates([])).toBeFalsy();
})
test("Test identical inner states for equal", async ()=> {
const gamesystem = ProductStateTrainer.givenFullProductGamesystemWithTwoStates();
expect(gamesystem.states[0].equalInnerStates(gamesystem.states[0].innerStates)).toBeTruthy();
})
test("Test slightly derivating inner states for Equal", async ()=> {
const gamesystem = ProductStateTrainer.givenFullProductGamesystemWithTwoStates();
expect(gamesystem.states[0].equalInnerStates(gamesystem.states[1].innerStates)).toBeFalsy();
})
});