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

Screenshot tests #130

Merged
merged 50 commits into from Aug 11, 2022
Merged

Screenshot tests #130

merged 50 commits into from Aug 11, 2022

Conversation

ismailgulek
Copy link
Contributor

@ismailgulek ismailgulek commented Jul 4, 2022

Provides a screenshot testing using https://github.com/pointfreeco/swift-snapshot-testing library. I've configured the tests not to fail for newly-taken screenshots.

Tests run on the matrix of:

Devices Languages
iPhone 13 Pro Max, iPad(9th generation) en-GB, fr-FR, de-DE

Fixes #9

Requires Xcodegen 2.29.0+

@github-actions
Copy link

github-actions bot commented Jul 4, 2022

Warnings
⚠️ This pull request seems relatively large. Please consider splitting it into multiple smaller ones.
⚠️ Some of the commits are missing ticket numbers. Please consinder using them for better tracking.
⚠️ You seem to have made changes to views. Please consider adding screenshots.

Generated by 🚫 Danger Swift against 26b4024

@github-actions
Copy link

github-actions bot commented Jul 4, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/YNS3GE

@ismailgulek ismailgulek force-pushed the ismail/9_screenshot_tests branch 5 times, most recently from 1ecf993 to c5872b1 Compare July 7, 2022 14:51
@ismailgulek ismailgulek force-pushed the ismail/9_screenshot_tests branch 3 times, most recently from b531fad to 875be75 Compare July 26, 2022 11:40
@codecov-commenter
Copy link

codecov-commenter commented Jul 27, 2022

Codecov Report

Merging #130 (26b4024) into develop (87b2a41) will decrease coverage by 7.29%.
The diff coverage is 80.76%.

@@             Coverage Diff             @@
##           develop     #130      +/-   ##
===========================================
- Coverage    35.01%   27.71%   -7.30%     
===========================================
  Files          168      170       +2     
  Lines        11741    11757      +16     
  Branches      5747     5745       -2     
===========================================
- Hits          4111     3259     -852     
- Misses        7538     8428     +890     
+ Partials        92       70      -22     
Impacted Files Coverage Δ
...X/Sources/Screens/HomeScreen/View/HomeScreen.swift 0.00% <0.00%> (ø)
...X/Sources/Screens/RoomScreen/View/RoomScreen.swift 37.14% <ø> (-1.75%) ⬇️
...omScreen/View/Timeline/ImageRoomTimelineView.swift 0.00% <0.00%> (ø)
...ources/Services/BugReport/ScreenshotDetector.swift 0.00% <0.00%> (-26.09%) ⬇️
...ion/ServerSelection/ServerSelectionViewModel.swift 85.18% <50.00%> (-11.12%) ⬇️
...rces/Screens/SplashScreen/SplashScreenModels.swift 86.84% <66.66%> (-10.31%) ⬇️
...es/Other/SwiftUI/Animation/ElementAnimations.swift 77.77% <77.77%> (ø)
ElementX/Sources/AppDelegate.swift 86.66% <100.00%> (-13.34%) ⬇️
ElementX/Sources/Other/Tests.swift 100.00% <100.00%> (ø)
...rces/Screens/RoomScreen/View/MessageComposer.swift 56.66% <100.00%> (ø)
... and 101 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ismailgulek ismailgulek requested review from a team and pixlwave and removed request for a team July 28, 2022 07:58
Copy link
Contributor

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

Amazing to see this working, can't wait to use it! 🥳

I've added some comments inline, one thing I haven't added though is that I don't think we should use python 2 for this and should probably switch to python 3 as its more likely someone has installed that.

UITests/Sources/Application.swift Outdated Show resolved Hide resolved
UITests/Sources/AuthenticationCoordinatorUITests.swift Outdated Show resolved Hide resolved
UITests/Sources/SplashScreenUITests.swift Show resolved Hide resolved
UnitTests/Sources/BugReportViewModelTests.swift Outdated Show resolved Hide resolved
Tools/Scripts/get_simulator_time.rb Outdated Show resolved Hide resolved
UITests/Sources/AuthenticationCoordinatorUITests.swift Outdated Show resolved Hide resolved
UITests/SupportingFiles/UITests.xctestplan Outdated Show resolved Hide resolved
Copy link
Contributor

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

Looks great to me! Thanks for the changes to use python3 🙏

ElementX/Sources/Other/Tests.swift Show resolved Hide resolved
@sonarcloud
Copy link

sonarcloud bot commented Aug 11, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@ismailgulek ismailgulek merged commit 2cb6dc1 into develop Aug 11, 2022
@ismailgulek ismailgulek deleted the ismail/9_screenshot_tests branch August 11, 2022 12:02
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.

Set up screenshot tests
3 participants