UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

47 lines (46 loc) 2.28 kB
/*! * KoliBri - The accessible HTML-Standard */ import { executeSnapshotTests } from "./snapshot-testing"; export function executeInputSnapshotTests(ComponentName, components, extendedProps, options = {}) { const baseObj = Object.assign({ _label: 'Label', _name: 'field', _placeholder: 'Hier steht ein Platzhaltertext' }, (extendedProps || {})); const propVariants = [ Object.assign({}, baseObj), Object.assign(Object.assign({}, baseObj), { _accessKey: 'V' }), Object.assign(Object.assign({}, baseObj), { _shortKey: 'S' }), Object.assign(Object.assign({}, baseObj), { _alert: true }), Object.assign(Object.assign({}, baseObj), { _readOnly: true }), Object.assign(Object.assign({}, baseObj), { _disabled: true }), Object.assign(Object.assign({}, baseObj), { _msg: { _type: 'error', _description: 'Es ist ein Fehler aufgetreten' } }), Object.assign(Object.assign({}, baseObj), { _msg: { _type: 'error', _description: 'Es ist ein Fehler aufgetreten' }, _hideMsg: true, _touched: true }), Object.assign(Object.assign({}, baseObj), { _hint: 'Hint' }), Object.assign(Object.assign({}, baseObj), { _touched: true }), Object.assign(Object.assign({}, baseObj), { _icons: { left: { icon: 'codicon codicon-arrow-left', }, } }), Object.assign(Object.assign({}, baseObj), { _icons: { right: { icon: 'codicon codicon-arrow-right', }, } }), Object.assign(Object.assign({}, baseObj), { _icons: { left: { icon: 'codicon codicon-arrow-left', }, right: { icon: 'codicon codicon-arrow-right', }, } }), ]; if (options === null || options === void 0 ? void 0 : options.hasSmartButton) { propVariants.push(Object.assign(Object.assign({}, baseObj), { _smartButton: { _icons: ['codicon codicon-eye'], _hideLabel: true, _label: 'einblenden', } })); } executeSnapshotTests(ComponentName, components, propVariants); } //# sourceMappingURL=snapshot-input-testing.js.map