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

@ -7,6 +7,7 @@ import {
createProject,
tomlToSettings,
TEST_COLORS,
orRunWhenFullSuiteEnabled,
} from './test-utils'
import { SettingsLevel } from 'lib/settings/settingsTypes'
import { SETTINGS_FILE_NAME, PROJECT_SETTINGS_FILE_NAME } from 'lib/constants'
@ -60,7 +61,7 @@ test.describe('Testing settings', () => {
page,
homePage,
}) => {
test.fixme(process.env.GITHUB_HEAD_REF !== 'all-e2e')
test.fixme(orRunWhenFullSuiteEnabled())
const u = await getUtils(page)
await test.step(`Setup`, async () => {
await page.setBodyDimensions({ width: 1200, height: 500 })
@ -173,7 +174,7 @@ test.describe('Testing settings', () => {
})
test('Project and user settings can be reset', async ({ page, homePage }) => {
test.fixme(process.env.GITHUB_HEAD_REF !== 'all-e2e')
test.fixme(orRunWhenFullSuiteEnabled())
const u = await getUtils(page)
await test.step(`Setup`, async () => {
await page.setBodyDimensions({ width: 1200, height: 500 })
@ -263,7 +264,7 @@ test.describe('Testing settings', () => {
`Project settings override user settings on desktop`,
{ tag: ['@electron', '@skipWin'] },
async ({ context, page }, testInfo) => {
test.fixme(process.env.GITHUB_HEAD_REF !== 'all-e2e')
test.fixme(orRunWhenFullSuiteEnabled())
const projectName = 'bracket'
const { dir: projectDirName } = await context.folderSetupFn(
async (dir) => {
@ -405,7 +406,7 @@ test.describe('Testing settings', () => {
tag: '@electron',
},
async ({ context, page, tronApp }, testInfo) => {
test.fixme(process.env.GITHUB_HEAD_REF !== 'all-e2e')
test.fixme(orRunWhenFullSuiteEnabled())
if (!tronApp) {
fail()
}
@ -463,7 +464,7 @@ test.describe('Testing settings', () => {
'project settings reload on external change',
{ tag: '@electron' },
async ({ context, page }, testInfo) => {
test.fixme(process.env.GITHUB_HEAD_REF !== 'all-e2e')
test.fixme(orRunWhenFullSuiteEnabled())
const { dir: projectDirName } = await context.folderSetupFn(
async () => {}
)
@ -984,7 +985,7 @@ fn cube`
toolbar,
cmdBar,
}, testInfo) => {
test.fixme(process.env.GITHUB_HEAD_REF !== 'all-e2e')
test.fixme(orRunWhenFullSuiteEnabled())
await context.folderSetupFn(async (dir) => {
const projectDir = join(dir, 'project-000')
await fsp.mkdir(projectDir, { recursive: true })