Skip to content

Commit a3d9747

Browse files
test: fix SingleSelect selector in AssetFilterBar test
Use findAllComponents with label filter to specifically find the sort dropdown instead of the first SingleSelect, which could be the ownership filter when mutable assets are present. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 9eeaf6a commit a3d9747

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests-ui/platform/assets/components/AssetFilterBar.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,10 @@ describe('AssetFilterBar', () => {
105105
await nextTick()
106106

107107
// Update sort
108-
const sortSelect = wrapper.findComponent({ name: 'SingleSelect' })
109-
await sortSelect.vm.$emit('update:modelValue', 'popular')
108+
const sortSelect = wrapper
109+
.findAllComponents({ name: 'SingleSelect' })
110+
.find((component) => component.props('label') === 'assetBrowser.sortBy')
111+
await sortSelect!.vm.$emit('update:modelValue', 'popular')
110112

111113
await nextTick()
112114

0 commit comments

Comments
 (0)