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

add tests for bottom step button #1387

Merged
merged 2 commits into from
Jan 1, 2020
Merged

add tests for bottom step button #1387

merged 2 commits into from
Jan 1, 2020

Conversation

pythongiant
Copy link

@pythongiant pythongiant commented Dec 23, 2019

concerns #1369 (<=== Replace 0000 with the Issue Number)

Hi, I have completed task 1 specified in #1369

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with npm test
  • code is in uniquely-named feature branch and has no merge conflicts
  • PR is descriptively titled
  • ask @publiclab/is-reviewers for help, in a comment below
  • Insert-step functionality is working correct as expected.

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

@welcome
Copy link

welcome bot commented Dec 23, 2019

Thanks for opening this pull request!
There may be some errors, but don't worry! We're here to help! 👍🎉😄

@pythongiant
Copy link
Author

image
Huh Travis Failed but locally my tests worked

@codecov
Copy link

codecov bot commented Dec 23, 2019

Codecov Report

Merging #1387 into main will not change coverage.
The diff coverage is 50%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1387   +/-   ##
=======================================
  Coverage   66.12%   66.12%           
=======================================
  Files         125      125           
  Lines        2571     2571           
  Branches      404      404           
=======================================
  Hits         1700     1700           
  Misses        871      871
Impacted Files Coverage Δ
examples/lib/scopeQuery.js 18.51% <ø> (ø) ⬆️
examples/lib/insertPreview.js 13.51% <0%> (ø) ⬆️
examples/lib/intermediateHtmlStepUi.js 11.11% <0%> (ø) ⬆️
examples/lib/defaultHtmlStepUi.js 10.73% <0%> (ø) ⬆️
src/modules/EdgeDetect/Module.js 96.15% <100%> (ø) ⬆️
src/modules/EdgeDetect/EdgeUtils.js 86.95% <100%> (ø) ⬆️
examples/lib/mapHtmltypes.js 8% <100%> (ø) ⬆️
src/modules/Blur/Blur.js 100% <100%> (ø) ⬆️

@pythongiant
Copy link
Author

@pythongiant
Copy link
Author

CC: @jywarren

@pythongiant
Copy link
Author

Works now

@debck
Copy link
Member

debck commented Dec 23, 2019

Also, change in the PR description from Fixes to concerns so that merging this doesn't close the issue.

@keshav234156
Copy link
Member

@pythongiant This is testing radio button not the add step.For that choose some different value which is not present in radio group

test/ui-2/test/DropDownButtonStep.test.js Outdated Show resolved Hide resolved
test/ui-2/test/DropDownButtonStep.test.js Outdated Show resolved Hide resolved
@keshav234156
Copy link
Member

@pythongiant look good now you have check src of the first image is different from the second image so that it assures us that different step is being added. You can do it with
expect($('.step:last img')[0].src).not.toEqual($('.step:first img')[0].src);
with small changes as required .

This won't work for the blend as steps have to be greater than 2 otherwise src of both would be equal. So change to some other module like blur.

@pythongiant
Copy link
Author

@keshav234156 i have done the required changes. Check it out now?

@keshav234156
Copy link
Member

@pythongiant Great !!!you finally did it.

@pythongiant
Copy link
Author

@debck accept and merge?

Copy link
Member

@debck debck left a comment

Choose a reason for hiding this comment

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

Great Work 🎉

@pythongiant
Copy link
Author

@jywarren merge?

Copy link
Member

@harshkhandeparkar harshkhandeparkar left a comment

Choose a reason for hiding this comment

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

This isn't a change request but it would be good if you add some comments and leave empty lines to increase readability. Otherwise, it is all good.

@pythongiant
Copy link
Author

@harshkhandeparkar I have refactored the code a bit, check it out?

test/ui-2/test/DropDownButtonStep.test.js Outdated Show resolved Hide resolved
test/ui-2/test/DropDownButtonStep.test.js Outdated Show resolved Hide resolved
@keshav234156
Copy link
Member

@pythongiant Please do the changes as requested by @harshkhandeparkar

@pythongiant
Copy link
Author

@keshav234156 check it out?

Copy link
Member

@harshkhandeparkar harshkhandeparkar left a comment

Choose a reason for hiding this comment

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

Also, I don't think you need the extra images. What generated those?

test/ui-2/test/DropDownButtonStep.test.js Outdated Show resolved Hide resolved
@pythongiant
Copy link
Author

@harshkhandeparkar fixed it!

Copy link
Member

@harshkhandeparkar harshkhandeparkar left a comment

Choose a reason for hiding this comment

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

Awesome!

Copy link
Member

@jywarren jywarren left a comment

Choose a reason for hiding this comment

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

So awesome! Thanks, just syncing and hopefully we'll merge this next!

@jywarren jywarren merged commit 13270a6 into publiclab:main Jan 1, 2020
@welcome
Copy link

welcome bot commented Jan 1, 2020

Congrats on merging your first pull request! 🙌🎉⚡️
Your code will be published to https://beta.sequencer.publiclab.org in a day or two.
In the meantime, can you tell us your Twitter handle so we can thank you properly?
Now that you've completed this, you can help someone else take their first step!
See: Public Lab's coding community!

@jywarren
Copy link
Member

jywarren commented Jan 1, 2020

Fantastic!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants