Fix test; add some scripts

This commit is contained in:
2024-04-30 20:34:04 -07:00
parent fcb205ba0b
commit 1eda0dafd5
5 changed files with 11 additions and 10 deletions

View File

@@ -16,10 +16,10 @@ it('loads the page', async () => {
expect(await driver.getTitle()).toEqual('Infantry Combat Solo Basic');
});
it('selects a trooper by clicking on their counter', async () => {
it('selects an off-board soldier', async () => {
await driver.switchTo().frame(driver.findElement(By.css('object')));
const selector = '.counter[data-allegiance="liao"][data-number="1"]',
const selector = '.counter[data-allegiance="attacker"][data-number="1"]',
svg = await driver.findElement(By.css('svg')),
counter = await driver.findElement(By.css(selector), svg);