Skip to content

Commit

Permalink
Remove feedback check for mobile compatibility (#7092)
Browse files Browse the repository at this point in the history
* remove feedback check for mobile compatibility

* run mobile feedback tests only for drawing workflow case

* update inputs for mobile feedback tests making for drawing task only
  • Loading branch information
lcjohnso authored May 6, 2024
1 parent 0f3b2db commit 2ef08f9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 7 additions & 0 deletions app/pages/lab/mobile/mobile-section-container.fixtures.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,13 @@ const validationFixtures = {
},
taskFeedbackEnabled: {
task: {
type: 'drawing',
tools: [
{
type: 'rectangle',
details: []
}
],
feedback: {
enabled: true
}
Expand Down
2 changes: 0 additions & 2 deletions app/pages/lab/mobile/mobile-section-container.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,13 @@ function drawingTaskHasNoSubtasks({ task }) {
const validatorFns = {
single: {
taskQuestionNotTooLong,
taskFeedbackDisabled,
workflowHasSingleTask,
workflowNotTooManyShortcuts: workflowHasNoMoreThanXShortcuts(2),
workflowDoesNotUseGroupedSubjectSelection,
workflowQuestionHasOneOrLessImages
},
multiple: {
taskQuestionNotTooLong,
taskFeedbackDisabled,
workflowHasSingleTask,
workflowNotTooManyShortcuts: workflowHasNoMoreThanXShortcuts(2),
workflowDoesNotUseGroupedSubjectSelection,
Expand Down
5 changes: 2 additions & 3 deletions app/pages/lab/mobile/mobile-section-container.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ describe('<MobileSectionContainer />', function () {
testValidationProp('taskInstructionNotTooLong', validationFixtures.taskInstructionTooLong, false);
});

it('should check whether the task uses feedback', function () {
testValidationProp('taskFeedbackDisabled');
it('should check whether the task uses feedback if the task type is drawing', function () {
testValidationProp('taskFeedbackDisabled', validationFixtures.workflowHasValidDrawingTask, true);
testValidationProp('taskFeedbackDisabled', validationFixtures.taskFeedbackEnabled, false);
});

Expand Down Expand Up @@ -187,7 +187,6 @@ describe('<MobileSectionContainer />', function () {
it('should equal false if any of the validations aren\'t met', function () {
[
fixtures.validationFixtures.taskQuestionTooLong,
fixtures.validationFixtures.taskFeedbackEnabled,
fixtures.validationFixtures.workflowHasMultipleTasks,
fixtures.validationFixtures.workflowTooManyShortcuts,
fixtures.validationFixtures.workflowUsesGroupedSubjectSelection
Expand Down

0 comments on commit 2ef08f9

Please sign in to comment.