| 841 | const activeWorkspace = (page) => page.locator('[data-workspace-tab][aria-selected="true"]').first().getAttribute('data-workspace-tab').catch(() => ''); |
| 842 | /** The same text as the fresh view of the project, apart from numbers (times, memory) and spacing. */ |
| 843 | const sameText = (left, right) => left.replace(/\d[\d,.:]*/g, '#').replace(/\s+/g, ' ') === right.replace(/\d[\d,.:]*/g, '#').replace(/\s+/g, ' '); |
| 844 | async function switchTo(page, project) { |
| 845 | await page.locator('.atlas-project-switcher summary').first().click(); |
| 846 | await page.locator('.atlas-project-picker button', { has: page.locator('.atlas-project-result-name', { hasText: new RegExp(`^${project}`) }) }).first().click(); |