Move students: hook up new component, remove old code#22208
Merged
Conversation
… manageStudentsRedux
islemaster
reviewed
May 4, 2018
| return false; | ||
| } | ||
| }; | ||
| }]); |
| const nameCells = wrapper.find('.uitest-name-cell'); | ||
| expect(nameCells.at(0).text()).to.equal('studentc'); | ||
| expect(nameCells.at(1).text()).to.equal('studentb'); | ||
| expect(nameCells.at(2).text()).to.equal('studenta'); |
Contributor
There was a problem hiding this comment.
We're also using chai-enzyme which enables enzyme-specific assertions like:
expect(nameCells.at(0)).to.have.text('studentc');
expect(nameCells.at(1)).to.have.text('studentb');
expect(nameCells.at(2)).to.have.text('studenta');
islemaster
reviewed
May 4, 2018
islemaster
left a comment
Contributor
There was a problem hiding this comment.
Hooray for tearing out old code!
I'll check again after the updates to transfers_controller_test.rb.
Contributor
Author
|
@islemaster thanks for the feedback! the |
islemaster
reviewed
May 5, 2018
| isMoveStudentsEnabled = () => { | ||
| const {loginType} = this.props; | ||
| return loginType === SectionLoginType.word || loginType === SectionLoginType.picture || loginType === SectionLoginType.email; | ||
| }; |
Contributor
There was a problem hiding this comment.
Sorry, one more thing: Can we add a test to ManageStudentsTableTest asserting this behavior? (Or maybe its inverse - we don't show a move students button for Google or Clever sections.)
Contributor
Author
There was a problem hiding this comment.
for sure, that's a good call 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


This PR is the last in a series to convert 'move students' from Angular to React. See my previous PR or the spec for context.
What does this code do?
/sections/transfersendpoint. specifically, the angular implementation was sending thestay_enrolled_in_current_sectionandstudent_idsparams as stringified boolean and array of integers, respectively. the new implementation sends a JSON request with boolean/[int].Examples
Manage Students tab
Routing to the 'manage students' tab, you should now see the new 'move students' button:

Default alphabetical student sorting
On opening the dialog, the students in the dialog table should be sorted alphabetically by name:

Success Notifications
When students are successfully transferred to a different section, the dialog should close and the
ManageStudentsTablecomponent (parent ofMoveStudents) will render a notification. This notification should be different based on whether the students were moved (and subsequently removed from the current section) or copied to the new section.If students were moved to new section:

If students were copied to new section:
