Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIO-9219: condition is not equal to based on select box #175

Merged
Merged
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions src/process/conditions/__tests__/conditions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,26 @@ describe('Condition processor', function () {
type: 'textfield',
input: true,
},
{
label: 'Text Hide When Is Not Equal',
applyMaskOn: 'change',
tableView: true,
validateWhenHidden: false,
key: 'textFieldHideWhenIsNotEqual',
conditional: {
show: false,
conjunction: 'all',
conditions: [
{
component: 'selectBoxes',
operator: 'isNotEqual',
value: '3'
}
]
},
type: 'textfield',
input: true,
},
{
type: 'button',
label: 'Submit',
Expand All @@ -130,13 +150,15 @@ describe('Condition processor', function () {
'3': true,
},
textField: 'test',
textFieldHideWhenIsNotEqual: 'test',
submit: true,
},
};

const context: ProcessContext<ConditionsScope> = processForm(form1, submission1);

expect(get(context, 'scope.conditionals[0].conditionallyHidden')).to.equal(false);
expect(get(context, 'scope.conditionals[1].conditionallyHidden')).to.equal(false);
});

it('Should always add components keyed by absolute path to conditional scope (simple components)', async function () {
Expand Down
Loading