Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Fixes middle click not working for home button #9564

Merged
merged 1 commit into from
Jun 19, 2017

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Jun 19, 2017

Test Plan:

  • middle click on Home button
  • new tab is opened

Description

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.

Resolves #9562

Auditors: @bsclifton

Reviewer Checklist:

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

@NejcZdovc NejcZdovc added this to the 0.19.x (Nightly Channel) milestone Jun 19, 2017
@NejcZdovc NejcZdovc self-assigned this Jun 19, 2017
@NejcZdovc NejcZdovc requested a review from bsclifton June 19, 2017 07:41
Resolves brave#9562

Auditors: @bsclifton

Test Plan:
- middle click on Home button
- new tab is opened
@NejcZdovc NejcZdovc modified the milestones: 0.17.x (Beta Channel), 0.19.x (Nightly Channel) Jun 19, 2017
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Code works good; I tested with single and multiple (separated with |) and it worked as expected. You can of course also use cmd + click

However, the test is failing for me locally (reproducible each time):
npm run test -- --grep="opens home page in a new tab when middle mouse button is clicked"

It looks OK on travis:
https://travis-ci.org/brave/browser-laptop/jobs/244416657#L3093

@NejcZdovc
Copy link
Contributor Author

NejcZdovc commented Jun 19, 2017

@bsclifton thing is that this whole block is connected so you need to run the whole block (npm run test -- --grep="home button when enabled") otherwise number of open tabs will be wrong. I added this test into this existing one. What we can do is do beforeEach instead of before and adjust tests accordingly.

@NejcZdovc NejcZdovc requested a review from bsclifton June 19, 2017 21:59
Copy link
Member

@bsclifton bsclifton left a comment

Choose a reason for hiding this comment

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

Re-ran tests (thanks for the heads up that they're part of a block). Changes LGTM 😄 👍

@bsclifton
Copy link
Member

Ideal situation would be each test has what it needs (ex: get # of tabs, do a +1, then expect that number... or restructure to before each as mentioned above). For now, this totally works though 😄 Merging!

@bsclifton bsclifton merged commit 129522d into brave:master Jun 19, 2017
bsclifton added a commit that referenced this pull request Jun 19, 2017
Fixes middle click not working for  home button
bsclifton added a commit that referenced this pull request Jun 19, 2017
Fixes middle click not working for  home button
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants