ConceptCreator/e2e/game-model/AddingGamesystems.spec.ts
Sebastian Böckelmann 9fea6587f3
Some checks failed
E2E Testing / test (push) Failing after 1m17s
Test failing Test
2024-01-27 00:11:02 +01:00

24 lines
945 B
TypeScript

import { BrowserContext, ElectronApplication, Page, _electron as electron } from 'playwright';
import { test, expect } from '@playwright/test';
import * as PATH from 'path';
import {GameModel} from "../../src/app/game-model/GameModel";
import {Gamesystem} from "../../src/app/game-model/gamesystems/Gamesystem";
test.describe('Adding Gamesystems', () => {
test("Test simple adding of Gamesystems", async () => {
const gameModel = new GameModel("GameModel");
const gamesystem = new Gamesystem("Gamesystem");
gameModel.addGamesystem(gamesystem);
expect(gameModel.gamesystems.includes(gamesystem)).toBeTruthy();
})
test("Test duplicates when adding Gamesystems", async () => {
const gameModel = new GameModel("GameModel");
const gamesystem = new Gamesystem("Gamesystem");
gameModel.addGamesystem(gamesystem);
gameModel.addGamesystem(gamesystem)
expect(gameModel.gamesystems.length).toEqual(2);
})
});