Refactor logic to skip unreliable tests (#5919)

This commit is contained in:
Jace Browning
2025-03-20 23:52:30 -04:00
committed by GitHub
parent 89d1f7f3d3
commit 06b35b76ff
23 changed files with 106 additions and 56 deletions

View File

@ -55,6 +55,10 @@ export const commonPoints = {
export const editorSelector = '[role="textbox"][data-language="kcl"]'
type PaneId = 'variables' | 'code' | 'files' | 'logs'
export function orRunWhenFullSuiteEnabled() {
return process.env.GITHUB_HEAD_REF !== 'all-e2e'
}
async function waitForPageLoadWithRetry(page: Page) {
await expect(async () => {
await page.goto('/')
@ -932,8 +936,8 @@ function failOnConsoleErrors(page: Page, testInfo?: TestInfo) {
// Fail when running on CI and FAIL_ON_CONSOLE_ERRORS is set
// use expect to prevent page from closing and not cleaning up
expect(`An error was detected in the console: \r\n message:${exception.message} \r\n name:${exception.name} \r\n stack:${exception.stack}
*Either fix the console error or add it to the whitelist defined in ./lib/console-error-whitelist.ts (if the error can be safely ignored)
*Either fix the console error or add it to the whitelist defined in ./lib/console-error-whitelist.ts (if the error can be safely ignored)
`).toEqual('Console error detected')
} else {
// the (test-results/exceptions.txt) file will be uploaded as part of an upload artifact in GH