ConceptCreator/e2e/game-model/RemovingGamesystems.spec.ts
Sebastian Böckelmann 6a8c34df52
Some checks failed
E2E Testing / test (push) Failing after 1m39s
Fix import of GameModel in Testcases
2024-03-22 07:53:02 +01:00

26 lines
953 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/project/game-model/GameModel";
import {Gamesystem} from "../../src/app/project/game-model/gamesystems/Gamesystem";
test.describe('Removing Gamesystems', () => {
test("Test simple removing of Gamesystems", async () => {
const gameModel = new GameModel("GameModel");
const gamesystem = new Gamesystem("Gamesystem");
gameModel.addGamesystem(gamesystem);
gameModel.removeGamesystem(gamesystem);
expect(gameModel.gamesystems.length).toEqual(0);
})
test("Test removing of empty gamesystems", async () => {
const gameModel = new GameModel("GameModel");
const gamesystem = new Gamesystem("Gamesystem");
gameModel.removeGamesystem(gamesystem);
expect(gameModel.gamesystems.length).toEqual(0);
})
});