Clearing Entity Click View on Clear and other notes

This commit is contained in:
2026-06-01 11:37:40 -04:00
parent 3974fcfb91
commit 026aebd5ad
13 changed files with 248 additions and 147 deletions
+1 -3
View File
@@ -11,9 +11,7 @@ class Website {
} else {
const hook = process.env.TEST_HOOK || '';
this.deploymentType = hook.includes('localhost') ? 'Local' : 'Dev';
this.baseUrl = this.deploymentType === 'Dev'
? 'https://calm-mud-04916b210.1.azurestaticapps.net'
: 'https://localhost:7234';
this.baseUrl = 'https://localhost:7234';
}
const BuildCalculatorPage = require('../pages/buildCalculatorPage');
-21
View File
@@ -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);