Comfy-Org / Comfy-Org/ComfyUI_frontend

test: Ensure slot rendering tests include all competing name fields for full priority chain coverage

Open
#10,522 0 comments 0 reactions 1 assignee Claimed by @christian-byrne View on GitHub
area:testing
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Follow-up from PR #10013

**Requested by:** @christian-byrne
**Related PR:** https://github.com/Comfy-Org/ComfyUI_frontend/pull/10013
**Related comment:** https://github.com/Comfy-Org/ComfyUI_frontend/pull/10013#discussion_r2951853850

## Context

When testing slot label rendering priority (e.g., in `OutputSlot.test.ts`, `InputSlot.test.ts`), test cases that assert a specific field is rendered should also include the other competing fields (`label`, `localized_name`, `name`) in the test `slotData`. This ensures the full priority chain is exercised and that higher-priority fields correctly override lower-priority ones.

### Example pattern

```typescript
it('renders label when present on slotData', () => {
const wrapper = mountOutputSlot({
name: 'internal_name',
localized_name: 'Localized Name',
label: 'My Custom Label'
})

expect(wrapper.text()).toContain('My Custom Label')
expect(wrapper.text()).not.toContain('internal_name')
expect(wrapper.text()).not.toContain('Localized Name')
})
```

## Task

Audit existing slot rendering tests (e.g., `OutputSlot.test.ts`, `InputSlot.test.ts`, and related subgraph slot tests) and update any test cases that only partially populate `slotData` to include all competing name fields, asserting that lower-priority fields are not rendered when a higher-priority one is present.

┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-10522-test-Ensure-slot-rendering-tests-include-all-competing-name-fields-for-full-priority-32e6d73d365081bdb736dfc51e06cbd5) by [Unito](https://www.unito.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.