WIP: remove symlink
This commit is contained in:
parent
fe9a18a14e
commit
98f8464aeb
@ -9,19 +9,19 @@ chromeOptions.addArguments('--headless', '--disable-gpu', '--no-sandbox');
|
|||||||
|
|
||||||
let driver;
|
let driver;
|
||||||
|
|
||||||
beforeAll(async () => {
|
// beforeAll(async () => {
|
||||||
await symlink('../../../test/map1.svg', 'public/assets/images/test_map.svg');
|
// await symlink('../../../test/map1.svg', 'public/assets/images/test_map.svg');
|
||||||
});
|
// });
|
||||||
|
|
||||||
beforeEach(async () => {
|
beforeEach(async () => {
|
||||||
driver = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
|
driver = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
|
||||||
|
|
||||||
console.log('manage', await driver.manage());
|
// console.log('manage', await driver.manage());
|
||||||
|
|
||||||
await driver.get('http://localhost:3005');
|
await driver.get('http://localhost:3005');
|
||||||
});
|
});
|
||||||
|
|
||||||
it.only('loads the page', async () => {
|
it('loads the page', async () => {
|
||||||
expect(await driver.getTitle()).toEqual('Infantry Combat Solo Basic');
|
expect(await driver.getTitle()).toEqual('Infantry Combat Solo Basic');
|
||||||
|
|
||||||
// console.log('window', window);
|
// console.log('window', window);
|
||||||
@ -43,6 +43,7 @@ it.only('loads the page', async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('selects an off-board soldier', async () => {
|
it('selects an off-board soldier', async () => {
|
||||||
|
// it.only.each(Array(10).fill(null))('selects an off-board soldier', async () => {
|
||||||
await driver.switchTo().frame(await driver.findElement(By.css('object')));
|
await driver.switchTo().frame(await driver.findElement(By.css('object')));
|
||||||
|
|
||||||
const selector = '.counter[data-allegiance="attacker"][data-number="1"]',
|
const selector = '.counter[data-allegiance="attacker"][data-number="1"]',
|
||||||
@ -58,9 +59,9 @@ afterEach(async () => {
|
|||||||
await driver.quit();
|
await driver.quit();
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
// afterAll(async () => {
|
||||||
await unlink('public/assets/images/test_map.svg');
|
// await unlink('public/assets/images/test_map.svg');
|
||||||
});
|
// });
|
||||||
|
|
||||||
async function takeScreenshot(driver) {
|
async function takeScreenshot(driver) {
|
||||||
const dir = './test/screenshots';
|
const dir = './test/screenshots';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user