mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-26 17:54:14 +00:00
[backport cloud/1.35] refactor: start on removing FF for subscription tiers (#7679)
## Summary Backport of #7596 to cloud/1.35 branch. **Original PR:** https://github.com/Comfy-Org/ComfyUI_frontend/pull/7596 ### Changes - Removes feature flag for subscription tiers - Removes legacy code for non-subscription tier logic ### Conflict Resolution - `src/renderer/extensions/vueNodes/components/NodeHeader.vue`: Took PR version (simplified icon without FF conditional) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-7679-backport-cloud-1-35-refactor-start-on-removing-FF-for-subscription-tiers-2cf6d73d365081a1ba41c135c84c2e7f) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import { describe, expect, vi } from 'vitest'
|
||||
|
||||
import { LGraphNode } from '@/lib/litegraph/src/litegraph'
|
||||
import type { LGraphBadge } from '@/lib/litegraph/src/LGraphBadge'
|
||||
import type { LGraphIcon } from '@/lib/litegraph/src/LGraphIcon'
|
||||
|
||||
import { subgraphTest } from '../../litegraph/subgraph/fixtures/subgraphFixtures'
|
||||
|
||||
@@ -17,23 +15,10 @@ vi.mock('@/stores/workspace/colorPaletteStore', () => ({
|
||||
})
|
||||
}))
|
||||
|
||||
vi.mock('@/composables/useFeatureFlags', () => ({
|
||||
useFeatureFlags: () => ({
|
||||
flags: {
|
||||
subscriptionTiersEnabled: false // Test legacy badge behavior
|
||||
}
|
||||
})
|
||||
}))
|
||||
|
||||
const { updateSubgraphCredits } = usePriceBadge()
|
||||
const { updateSubgraphCredits, getCreditsBadge } = usePriceBadge()
|
||||
|
||||
const mockNode = new LGraphNode('mock node')
|
||||
const mockIcon: Partial<LGraphIcon> = { unicode: '\ue96b' }
|
||||
const badge: Partial<LGraphBadge> = {
|
||||
icon: mockIcon as LGraphIcon,
|
||||
text: '$0.05/Run'
|
||||
}
|
||||
mockNode.badges = [badge as LGraphBadge]
|
||||
mockNode.badges = [getCreditsBadge('$0.05/Run')]
|
||||
|
||||
function getBadgeText(node: LGraphNode): string {
|
||||
const badge = node.badges[0]
|
||||
|
||||
Reference in New Issue
Block a user