1
0
Fork 0

chore(paco): Hide the frontPocketFlapSize option

This commit is contained in:
Joost De Cock 2022-01-19 18:00:09 +01:00
parent 20c0419f35
commit 3da7cd5aee
2 changed files with 17 additions and 4 deletions

View file

@ -105,7 +105,14 @@ export default {
frontPockets: { bool: true },
backPockets: { bool: false },
// Not exposed to the user
frontPocketFlapSize: { pct: 3, min: 3, max: 3, snap: smallsteps, ...pctBasedOn('waist') },
frontPocketFlapSize: {
pct: 3,
min: 3,
max: 3,
snap: smallsteps,
...pctBasedOn('waist'),
hidden: true
},
// Advanced
legBalance: { pct: 57.5, min: 52.5, max: 62.5 },

View file

@ -124,9 +124,15 @@ export const testPatternConfig = (design, pattern, expect, models, patterns) =>
if (type === 'object' && typeof option.pct !== 'undefined') {
// Percentage option
it(` - '${name}' is a percentage option`, () => true)
it(` - Should be exposed in an option group`, () => {
expect(allOptiongroupOptions.indexOf(name) !== -1).to.be.true
})
// Snapped options can just be hidden instead
if (option.hidden) {
if (option.snap) it(` - '${name}' is a hidden snap option`, () => true)
else {
it(` - Should be exposed in an option group`, () => {
expect(allOptiongroupOptions.indexOf(name) !== -1).to.be.true
})
}
}
it(` - Should have a default value`, () => {
expect(typeof option.pct).to.equal('number')
})