Clearing Entity Click View on Clear and other notes
This commit is contained in:
@@ -58,33 +58,12 @@ test.describe('Build Calculator', () => {
|
||||
const calc = website.buildCalculatorPage;
|
||||
await calc.goto();
|
||||
|
||||
const buttons = page.locator('.keyContainer > div > div');
|
||||
console.log('Initial Q button text:', await buttons.filter({ hasText: /^Q/ }).first().textContent());
|
||||
|
||||
// Wait for Blazor re-render to complete by waiting for the button text to stabilize
|
||||
// (it goes from QAcropolis → empty during re-render → back to QAcropolis)
|
||||
let tries = 0;
|
||||
let text = '';
|
||||
while (tries < 20) {
|
||||
await page.waitForTimeout(500);
|
||||
try {
|
||||
text = (await buttons.filter({ hasText: /^Q/ }).first().textContent() || '').trim();
|
||||
if (text && text.length > 1) break;
|
||||
} catch { }
|
||||
tries++;
|
||||
}
|
||||
console.log(`After Blazor render (${(tries+1)*0.5}s): Q button text: ${JSON.stringify(text)}`);
|
||||
|
||||
await calc.filter.selectFaction("Q'Rath");
|
||||
await calc.filter.selectImmortal('Orzum');
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
console.log('After filter Q button text:', await buttons.filter({ hasText: /^Q/ }).first().textContent());
|
||||
|
||||
expect(await calc.timeline.containsEntity('Acropolis')).toBe(false);
|
||||
|
||||
await calc.hotkeys.clickKey('Q');
|
||||
await page.waitForTimeout(1000);
|
||||
|
||||
expect(await calc.entityView.getEntityName()).toBe('Acropolis');
|
||||
expect(await calc.timeline.containsEntity('Acropolis')).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user