Files
klz-cables.com/.pnpm-store/v10/files/a8/d35ac8e59365dd4e43da1a70395cfad133b8f3383cceef8c195e1fac090eadbb21cf3dfeb588bdf34e9fc249ce68f8ddb16f103808e9b3ab0bde60d09c89a8
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

53 lines
1.8 KiB
Plaintext

import { describe, it, expect } from 'vitest';
import { traverseFields } from './traverseFields.js';
describe('traverseFields', ()=>{
const tabsField = {
type: 'tabs',
tabs: [
{
label: 'Tab 1',
name: 'tab1',
fields: [
{
type: 'tabs',
tabs: [
{
label: 'Ui Only Tab',
fields: [
{
type: 'group',
name: 'group1',
label: 'Group 1',
fields: [
{
type: 'text',
name: 'text1',
label: 'Text 1'
}
]
}
]
}
]
}
]
}
]
};
describe('tabs traversal', ()=>{
it('should return correct dot notation in parentPath', ()=>{
traverseFields({
fields: [
tabsField
],
callback: ({ field, parentPath })=>{
if (field.type === 'text' && field.name === 'text1') {
expect(parentPath).toEqual('tab1.group1.');
}
}
});
});
});
});
//# sourceMappingURL=traverseFields.spec.js.map