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
Unit overview bugs #14509
Conversation
2e911ad
to
06ccd11
Compare
06ccd11
to
e545d99
Compare
09b45f3
to
e09cee5
Compare
e09cee5
to
9b18285
Compare
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit test?
There was a problem hiding this 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); |
There was a problem hiding this comment.
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({ |
There was a problem hiding this comment.
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', () => { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
A few fixes for small unit overview bugs
Miniview should start in detail mode when that is the script default
No LEVEL text in pills on left
Teacher Info extends full heigh on FF/Safari/IE
Default all stages but the current one to be collapse in default view (both on overview page and in miniview)