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

Added test for Apply button #1579

Merged
merged 4 commits into from
Jul 12, 2020
Merged

Added test for Apply button #1579

merged 4 commits into from
Jul 12, 2020

Conversation

ataata107
Copy link

@ataata107 ataata107 commented Jan 26, 2020

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

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with npm run test-all
  • 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!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Please make sure to get at least two reviews before asking for merging the PR as that would make the PR more reliable on our part
Thanks!

@ataata107
Copy link
Author

@publiclab/is-reviewers

@codecov
Copy link

codecov bot commented Jan 26, 2020

Codecov Report

Merging #1579 into main will increase coverage by 10.29%.
The diff coverage is 63.90%.

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1579       +/-   ##
===========================================
+ Coverage   55.11%   65.41%   +10.29%     
===========================================
  Files         117      132       +15     
  Lines        2344     2741      +397     
  Branches      360      438       +78     
===========================================
+ Hits         1292     1793      +501     
+ Misses       1052      948      -104     
Impacted Files Coverage Δ
examples/lib/scopeQuery.js 18.51% <ø> (ø)
src/Modules.js 100.00% <ø> (ø)
src/modules/WebglDistort/Module.js 2.29% <0.00%> (ø)
src/ui/SetInputStep.js 12.90% <0.00%> (-1.39%) ⬇️
src/modules/ColorHalftone/Module.js 3.63% <3.63%> (ø)
examples/lib/defaultHtmlStepUi.js 11.35% <4.08%> (-0.85%) ⬇️
examples/lib/intermediateHtmlStepUi.js 11.11% <5.55%> (+0.94%) ⬆️
examples/lib/insertPreview.js 13.15% <20.00%> (-0.36%) ⬇️
src/util/getImageDimensions.js 20.00% <20.00%> (ø)
src/util/isGif.js 20.00% <20.00%> (ø)
... and 100 more

//Lets change the default value
expect(Length1).toBe(2);
// Let's check the source of the image output by the default values
const src1 = await page.evaluate(() => document.querySelectorAll('.step img')[1].src);
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to check for all of these every time?

Copy link
Member

Choose a reason for hiding this comment

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

I think a bit of extra testing is ok for the UI tests we badly need; we can do another phase of refining and optimizing them later but it doesn't add much overhead here! But thanks for thinking of this!

@gitpod-io
Copy link

gitpod-io bot commented Jul 10, 2020

@jywarren jywarren merged commit 23ddf1f into publiclab:main Jul 12, 2020
@jywarren
Copy link
Member

Thank you for these tests! Much appreciated!!!

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.

4 participants