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

Feature/screenshot test crop screenshots to content #524

Closed

Conversation

adrianjost
Copy link
Contributor

@adrianjost adrianjost commented Jan 28, 2020

Issue: Screenshot Tests should fail earlier

Sorry for the gigantic PR! Most of the changed files are only the new cropped screenshots.

Description

  • take full screenshots using puppeteer so long stories will be captured completly
  • mocked all external images with base64 or repo internal Images
  • auto crop screenshots to its actual content using sharp
  • adjusted some stories to work with this setup (puppeteer screenshots actually have some bugs)
    • puppeteer only takes a really small screenshot if only position: fixed or absolute elements are on the page. The solution is to add a grey rectangle anywhere on the page (was required for FloatingFAB component)
    • added some rectangles around some stories for the same reason but I couldn't find the reason for that.
  • reduced the diff threshold to fail more often (should not happen that often anymore, because all screenshot updates are on the same system when using the sc-bot update command)
  • added an documentation hint to the screenshot action, how to update screenshots.

@pullapprove pullapprove bot added the waiting for review Someone should review this ASAP label Jan 28, 2020
@adrianjost adrianjost added the WIP someone is working on that label Jan 28, 2020
@adrianjost adrianjost removed the waiting for review Someone should review this ASAP label Jan 28, 2020
@mergify mergify bot removed the has conflicts label Jan 28, 2020
@hpi-schul-clud-bot
Copy link
Contributor

❤️ I have deployed this pull-request for you:

Docs: http://docs.524.nuxt.schul-cloud.surge.sh
Storybook: http://stories.524.nuxt.schul-cloud.surge.sh

@codecov
Copy link

codecov bot commented Jan 28, 2020

Codecov Report

Merging #524 into develop will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop     #524   +/-   ##
========================================
  Coverage    85.45%   85.45%           
========================================
  Files          118      118           
  Lines         1155     1155           
  Branches       176      176           
========================================
  Hits           987      987           
  Misses         163      163           
  Partials         5        5
Impacted Files Coverage Δ
src/components/base/BaseInput/BaseInputDefault.vue 100% <ø> (ø) ⬆️
src/components/molecules/MintEcLinkContainer.vue 100% <ø> (ø) ⬆️

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 4593699...9610601. Read the comment docs.

@adrianjost adrianjost self-assigned this Jan 28, 2020
@adrianjost adrianjost force-pushed the feature/screenshot-test-crop-screenshots-to-content branch from 97175f2 to 09c0e24 Compare February 4, 2020 20:37
@adrianjost adrianjost added waiting Waiting for external input and removed WIP someone is working on that labels Feb 4, 2020
@pullapprove pullapprove bot added the waiting for review Someone should review this ASAP label Feb 4, 2020
@adrianjost adrianjost added the WIP someone is working on that label Feb 4, 2020
@adrianjost adrianjost force-pushed the feature/screenshot-test-crop-screenshots-to-content branch from 88f7d6a to 49f66e0 Compare February 18, 2020 17:41
@adrianjost adrianjost force-pushed the feature/screenshot-test-crop-screenshots-to-content branch from 9ef2374 to e9bce8c Compare February 18, 2020 17:54
@mergify mergify bot removed the has conflicts label Mar 7, 2020
@adrianjost
Copy link
Contributor Author

@schul-cloud-bot update screenshots

@mergify mergify bot removed the has conflicts label Apr 3, 2020
@adrianjost
Copy link
Contributor Author

@schul-cloud-bot update screenshots

@adrianjost adrianjost removed WIP someone is working on that waiting Waiting for external input labels Apr 3, 2020
@adrianjost adrianjost closed this Apr 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for review Someone should review this ASAP
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants