| 141 | }))); |
| 142 | }; |
| 143 | const openSymbol = async (name) => { |
| 144 | const input = page.locator('[data-testid="atlas-command-input"]'); |
| 145 | await input.click(); |
| 146 | await input.fill(''); |
| 147 | await input.pressSequentially(name, { delay: 15 }); |
| 148 | await page.waitForSelector(`[data-testid="atlas-search-row"][data-name="${name}"]`, { timeout: 30000 }); |
| 149 | await page.locator(`[data-testid="atlas-search-row"][data-name="${name}"]`).click(); |
| 150 | await page.waitForFunction((symbol) => globalThis.__atlasTwin?.symbol === symbol, name, { timeout: 40000 }); |
| 151 | await page.waitForFunction(() => document.querySelector('[data-testid="atlas-twin"]')?.getAttribute('data-status') === 'ready', undefined, { timeout: 40000 }); |
| 152 | }; |
| 153 | const guard = async (area) => { |
| 154 | const subject = await page.evaluate((name) => { |
| 155 | const seam = name === 'twin' ? globalThis.__atlasTwin : name === 'flow' ? globalThis.__atlasFlow : globalThis.__atlasChatReader; |