test: add setting to ignore version compatibility toast warnings in e2e tests (#7004)

There's a warning toast shown if the frontend is considered out-of-date
(relative to the version in the requirements.txt of
comfyanonymous/ComfyUI). As a result, e2e tests run on older release
branches (e.g., when backporting or hotfixing) can sometimes trigger the
warning which obviously causes visual regression tests to fail. This PR
adds a hidden setting to disable the warning and sets it to `true` in
the e2e test fixtures.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7004-test-add-setting-to-ignore-version-compatibility-toast-warnings-in-e2e-tests-2b86d73d3650812d9e07f54a0c86b996)
by [Unito](https://www.unito.io)
This commit is contained in:
Christian Byrne
2025-11-29 18:56:19 -08:00
committed by GitHub
parent 5b03d3fcbc
commit 2b751200be
5 changed files with 54 additions and 3 deletions

View File

@@ -1117,5 +1117,12 @@ export const CORE_SETTINGS: SettingParams[] = [
tooltip: 'Use new Asset API for model browsing',
defaultValue: isCloud ? true : false,
experimental: true
},
{
id: 'Comfy.VersionCompatibility.DisableWarnings',
name: 'Disable version compatibility warnings',
type: 'hidden',
defaultValue: false,
versionAdded: '1.34.1'
}
]

View File

@@ -4,6 +4,7 @@ import { gt, valid } from 'semver'
import { computed } from 'vue'
import config from '@/config'
import { useSettingStore } from '@/platform/settings/settingStore'
import { useSystemStatsStore } from '@/stores/systemStatsStore'
const DISMISSAL_DURATION_MS = 7 * 24 * 60 * 60 * 1000 // 7 days
@@ -12,6 +13,7 @@ export const useVersionCompatibilityStore = defineStore(
'versionCompatibility',
() => {
const systemStatsStore = useSystemStatsStore()
const settingStore = useSettingStore()
const frontendVersion = computed(() => config.app_version)
const backendVersion = computed(
@@ -87,7 +89,10 @@ export const useVersionCompatibilityStore = defineStore(
})
const shouldShowWarning = computed(() => {
return hasVersionMismatch.value && !isDismissed.value
const warningsDisabled = settingStore.get(
'Comfy.VersionCompatibility.DisableWarnings'
)
return hasVersionMismatch.value && !isDismissed.value && !warningsDisabled
})
const warningMessage = computed(() => {

View File

@@ -523,7 +523,8 @@ const zSettings = z.object({
'main.sub.setting.name': z.any(),
'single.setting': z.any(),
'LiteGraph.Node.DefaultPadding': z.boolean(),
'LiteGraph.Pointer.TrackpadGestures': z.boolean()
'LiteGraph.Pointer.TrackpadGestures': z.boolean(),
'Comfy.VersionCompatibility.DisableWarnings': z.boolean()
})
export type EmbeddingsResponse = z.infer<typeof zEmbeddingsResponse>