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

Unit overview bugs #14509

Merged
merged 5 commits into from Apr 20, 2017
Merged

Unit overview bugs #14509

merged 5 commits into from Apr 20, 2017

Conversation

Bjvanminnen
Copy link
Contributor

@Bjvanminnen Bjvanminnen commented Apr 19, 2017

A few fixes for small unit overview bugs

Miniview should start in detail mode when that is the script default
image

No LEVEL text in pills on left
Teacher Info extends full heigh on FF/Safari/IE
image

Default all stages but the current one to be collapse in default view (both on overview page and in miniview)
image

@islemaster
Copy link
Contributor

Sorry for the delay on this, I'm looking now 👀

@@ -139,6 +141,13 @@ export default function reducer(state = initialState, action) {
};
}

if (action.type === SET_CURRENT_STAGE_ID) {
return {
...state,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unit test?

Copy link
Contributor

@islemaster islemaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lookin' good. Just a few nits.

},
],
fakeLevels(2),
fakeLevels(2),
fakeLevels(2)
];

console.log(levelsByLesson);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing you didn't mean to leave this console.log call in.

};
},

componentWillReceiveProps(nextProps) {
if (nextProps.currentStageId !== this.props.currentStageId) {
this.setState({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting... coverage suggests we test this behavior but not its negative case: A props change that does not change the current stage should not change the collapsed state. Worth covering?

});

it('renders a pill that says UNPLUGGED when first level is unplugged', () => {
it('renders a pill with no text when first level is unplugged', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a matching test "renders a pill with no text when last level is unplugged?"

@@ -744,6 +744,17 @@ def summarize
summary
end

# Similar to summarize, but returns an even more narrow set of fields, in particular
# bypasses stage summaries
def summarize_short
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this gets hit in tests, but it'd be nice to have a new unit test pinning just the behavior of summarize_short, since it's new public API for this model.

@Bjvanminnen Bjvanminnen merged commit 0e6f477 into staging Apr 20, 2017
@Bjvanminnen Bjvanminnen deleted the unitOverviewBugs branch April 20, 2017 20:29
This was referenced Apr 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants