Skip to content

Commit

Permalink
Test classifier props when URL params change
Browse files Browse the repository at this point in the history
  • Loading branch information
eatyourgreens committed Mar 16, 2022
1 parent 55388a6 commit 9cb0b7d
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/app-project/src/screens/ClassifyPage/ClassifyPage.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ describe('Component > ClassifyPage', function () {
it('should show classifier popup tutorials', function () {
expect(classifier.prop('showTutorial')).to.be.true()
})

it('should update the classifier when the workflow changes', function () {
wrapper.setProps({ workflowID: '3456' })
classifier = wrapper.find(ClassifierWrapper)
expect(classifier.prop('workflowID')).to.equal('3456')
})
})

describe('with a grouped workflow', function () {
Expand Down Expand Up @@ -148,6 +154,12 @@ describe('Component > ClassifyPage', function () {
it('should show classifier popup tutorials', function () {
expect(classifier.prop('showTutorial')).to.be.true()
})

it('should update the classifier when the subject set changes', function () {
wrapper.setProps({ subjectSetID: '5678' })
classifier = wrapper.find(ClassifierWrapper)
expect(classifier.prop('subjectSetID')).to.equal('5678')
})
})

describe('with an indexed subject set', function () {
Expand Down Expand Up @@ -234,6 +246,12 @@ describe('Component > ClassifyPage', function () {
it('should show classifier popup tutorials', function () {
expect(classifier.prop('showTutorial')).to.be.true()
})

it('should update the classifier when the subject changes', function () {
wrapper.setProps({ subjectID: '8901' })
classifier = wrapper.find(ClassifierWrapper)
expect(classifier.prop('subjectID')).to.equal('8901')
})
})
})
})
Expand Down

0 comments on commit 9cb0b7d

Please sign in to comment.