Skip to content

NetSim: Teacher view dropdown bug#9809

Merged
islemaster merged 2 commits into
stagingfrom
netsim-teacher-view-dropdown-bug
Aug 3, 2016
Merged

NetSim: Teacher view dropdown bug#9809
islemaster merged 2 commits into
stagingfrom
netsim-teacher-view-dropdown-bug

Conversation

@islemaster

Copy link
Copy Markdown
Contributor

@sfilman reported a bug in the new Teacher View sent-by dropdown during our bug bash today (original report). The dropdown had an undefined entry instead of a list of message senders.

image

The fix is trivial (I was referring to the wrong property name). I've gone ahead and added some simple tests, too. The tests make use of these libraries, which it may be useful to know about:

  • Enzyme, the React test library for rendering components and querying the results.
  • chai-enzyme which adds BDD-style Chai assertions that use Enzyme queries and produces useful output when those assertions fail.

{this.props.i18n.logBrowserHeader_sentByAnyone()}
</option>
{_.uniq(this.props.logRows.map(row => row.sentBy))
{_.uniq(this.props.logRows.map(row => row['sent-by']))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the actual bugfix.

@davidsbailey

Copy link
Copy Markdown
Member

The fix itself looks good. I'll take a closer look at the tests and chai/enzyme today.

@islemaster

Copy link
Copy Markdown
Contributor Author

I'm going to go ahead and merge then, since the test changes are unit test only and are passing on CircleCI.

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.

2 participants