2024-01-26 23:42:34 +01:00
|
|
|
import { BrowserContext, ElectronApplication, Page, _electron as electron } from 'playwright';
|
|
|
|
import { test, expect } from '@playwright/test';
|
|
|
|
import * as PATH from 'path';
|
2024-03-22 08:05:07 +01:00
|
|
|
import {GameModel} from "../../src/app/projects/game-model/GameModel";
|
|
|
|
import {Gamesystem} from "../../src/app/projects/game-model/gamesystems/Gamesystem";
|
2024-01-26 23:42:34 +01:00
|
|
|
|
|
|
|
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);
|
|
|
|
})
|
|
|
|
});
|