Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

fixed the unnecessary firing of TOGGLE_PROJECT_SEARCH action#2882

Merged
jasonLaster merged 3 commits into
firefox-devtools:masterfrom
karthikJagadeesh:fix-2800
May 13, 2017
Merged

fixed the unnecessary firing of TOGGLE_PROJECT_SEARCH action#2882
jasonLaster merged 3 commits into
firefox-devtools:masterfrom
karthikJagadeesh:fix-2800

Conversation

@karthikJagadeesh
Copy link
Copy Markdown
Contributor

Associated Issue: #2800

I made the necessary changes looking at the issue description. However, the test fails when I try to push the changes.

Am only beginning to learn Redux now, how do I proceed further?

Comment thread src/actions/ui.js Outdated
} else {
dispatch({
const projectSearchState = getProjectSearchState(getState());
if (toggleValue === null) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

my bet is that this should be undefined.

Here's the failing test. https://github.com/jasonLaster/debugger.html/blob/preview-story/src/actions/tests/ui.js#L15-L22

You can run it with jest. jest src/actions/ and make changes to debug it :)

Copy link
Copy Markdown
Contributor Author

@karthikJagadeesh karthikJagadeesh May 12, 2017

Choose a reason for hiding this comment

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

Test passes after changing null to undefined!

@jasonLaster
Copy link
Copy Markdown
Contributor

jasonLaster commented May 12, 2017 via email

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2017

Codecov Report

Merging #2882 into master will increase coverage by 0.13%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2882      +/-   ##
==========================================
+ Coverage   58.53%   58.66%   +0.13%     
==========================================
  Files          63       63              
  Lines        2390     2371      -19     
  Branches      490      488       -2     
==========================================
- Hits         1399     1391       -8     
+ Misses        991      980      -11
Impacted Files Coverage Δ
src/actions/ui.js 82.75% <83.33%> (-1.86%) ⬇️
src/components/Outline.js 80% <0%> (-3.79%) ⬇️
assets/images/Svg.js 84.61% <0%> (ø) ⬆️
src/components/shared/previewFunction.js 100% <0%> (ø) ⬆️
src/utils/frame.js 69.66% <0%> (+8.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b8b994d...02e2e8b. Read the comment docs.

Copy link
Copy Markdown
Contributor

@jasonLaster jasonLaster left a comment

Choose a reason for hiding this comment

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

👍 Love it

@jasonLaster jasonLaster merged commit 51805ad into firefox-devtools:master May 13, 2017
@karthikJagadeesh karthikJagadeesh deleted the fix-2800 branch May 15, 2017 16:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants