Skip to content
Open
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
17f9989
Block Bindings: Add unit test coverage for source
ockham Nov 17, 2025
60d228f
Hoist select for getFieldsList tests
ockham Nov 17, 2025
56be9ae
Check all field values, remove redundant tests
ockham Nov 18, 2025
910318e
Cover all fields in field key fallback test
ockham Nov 18, 2025
d45fba8
Fall back to undefined
ockham Nov 19, 2025
176fd43
Check for fallback to field name
ockham Nov 19, 2025
eddc7d1
Expect getValues() to fall back to field labels if present
ockham Nov 19, 2025
170f855
Block Bindings: Untangle core/term-data source
ockham Nov 3, 2025
3d4dcc5
Fall back to field name instead of empty object
ockham Nov 19, 2025
fe1ce94
Refactor for legibility
ockham Nov 19, 2025
01d5be3
Wrap term count in parens
ockham Nov 19, 2025
46b3aad
Return empty array from getFieldsList() if taxonomy/termId or termDat…
ockham Nov 19, 2025
12bca88
Make test more descriptive
ockham Nov 19, 2025
521f6c9
Tweak test description
ockham Nov 19, 2025
2599580
Remove obsolete TODO
ockham Nov 19, 2025
c51128b
Tweak Navigation block test
ockham Nov 19, 2025
2fed169
Remove redundant Navigation Submenu test
ockham Nov 19, 2025
ff7a920
Compare to const imported from term-data.js
ockham Nov 19, 2025
db85574
Add test coverage for Navigation block
ockham Nov 19, 2025
54f9a6b
Reuse variable
ockham Nov 19, 2025
dbba6bf
Remove setValues and canUserEditValue tests
ockham Nov 19, 2025
eac7e3e
Remove unnecessary optional chaining
ockham Nov 24, 2025
d6ef32d
Reorganize logic a bit
ockham Nov 24, 2025
c6f0f62
id, not termId
ockham Nov 24, 2025
7d779ba
Reuse termData
ockham Nov 24, 2025
b981dfa
Rearrange tests
ockham Nov 24, 2025
dc632b7
No need for beforeAll
ockham Nov 24, 2025
91bacbe
Check all fields
ockham Nov 24, 2025
4f0d9e8
Fall back to field label
ockham Nov 24, 2025
0f3e1df
Fix logic
ockham Nov 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove redundant Navigation Submenu test
  • Loading branch information
ockham committed Nov 24, 2025
commit 2fed16914b6a302a390a5da7caad3956d2f2e90e
44 changes: 0 additions & 44 deletions packages/editor/src/bindings/test/term-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,50 +300,6 @@ describe( 'term-data bindings', () => {
} );
} );

it( 'should use block attributes for navigation-submenu blocks', () => {
const select = ( store ) => {
if ( store === blockEditorStore ) {
return {
getBlockName: () => 'core/navigation-submenu',
getBlockAttributes: () => ( {
id: 789,
type: 'category',
} ),
};
}
if ( store === coreDataStore ) {
return {
getEntityRecord: ( kind, taxonomy, termId ) => {
if (
kind === 'taxonomy' &&
taxonomy === 'category' &&
termId === 789
) {
return {
name: 'Tutorials',
};
}
return null;
},
};
}
};

const values = termDataBindings.getValues( {
select,
context: {},
bindings: {
content: {
source: 'core/term-data',
args: { field: 'name' },
},
},
clientId: '123abc456',
} );

expect( values.content ).toBe( 'Tutorials' );
} );

it( 'should convert "tag" type to "post_tag" taxonomy', () => {
const select = ( store ) => {
if ( store === blockEditorStore ) {
Expand Down