Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pointfreeco/swift-snapshot-testing
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.12.0
Choose a base ref
...
head repository: pointfreeco/swift-snapshot-testing
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1.13.0
Choose a head ref
  • 3 commits
  • 81 files changed
  • 3 contributors

Commits on Sep 12, 2023

  1. Formalize Inline Snapshot Testing (#764)

    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * fix
    
    * beta 6
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * fix
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * wip
    
    * small things
    
    * wip
    
    * DocC + swift-format (#765)
    
    * DocC and swift-format support
    
    * wip
    
    * wip
    
    * wip
    
    ---------
    
    Co-authored-by: Brandon Williams <mbrandonw@hey.com>
    stephencelis and mbrandonw authored Sep 12, 2023
    10

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    69df57d View commit details
  2. fix format CI

    stephencelis committed Sep 12, 2023
    Copy the full SHA
    589e48c View commit details
  3. Run swift-format

    stephencelis authored and github-actions[bot] committed Sep 12, 2023
    Copy the full SHA
    696b86a View commit details
Showing with 7,354 additions and 6,936 deletions.
  1. +7 −13 .github/workflows/ci.yml
  2. +29 −0 .github/workflows/format.yml
  3. +0 −913 Documentation/Available-Snapshot-Strategies.md
  4. +0 −82 Documentation/Defining-Custom-Snapshot-Strategies.md
  5. +9 −2 Makefile
  6. +16 −0 Package.resolved
  7. +39 −8 Package.swift
  8. +103 −50 README.md
  9. +591 −0 Sources/InlineSnapshotTesting/AssertInlineSnapshot.swift
  10. +75 −0 Sources/InlineSnapshotTesting/Documentation.docc/InlineSnapshotTesting.md
  11. +1 −0 Sources/InlineSnapshotTesting/Exports.swift
  12. +0 −327 Sources/SnapshotTesting/AssertInlineSnapshot.swift
  13. +187 −163 Sources/SnapshotTesting/AssertSnapshot.swift
  14. +15 −11 Sources/SnapshotTesting/Async.swift
  15. +8 −8 Sources/SnapshotTesting/Common/Internal.swift
  16. +1,881 −1,438 Sources/SnapshotTesting/Common/PlistEncoder.swift
  17. +10 −6 Sources/SnapshotTesting/Common/String+SpecialCharacters.swift
  18. +1,024 −995 Sources/SnapshotTesting/Common/View.swift
  19. +5 −5 Sources/SnapshotTesting/Common/XCTAttachment.swift
  20. +14 −8 Sources/SnapshotTesting/Diff.swift
  21. +5 −3 Sources/SnapshotTesting/Diffing.swift
  22. +19 −0 Sources/SnapshotTesting/Documentation.docc/AssertSnapshot.md
  23. +97 −0 Sources/SnapshotTesting/Documentation.docc/CustomStrategies.md
  24. +11 −0 Sources/SnapshotTesting/Documentation.docc/Deprecations.md
  25. +25 −0 Sources/SnapshotTesting/Documentation.docc/SnapshotTesting.md
  26. +63 −0 Sources/SnapshotTesting/Documentation.docc/Snapshotting.md
  27. +9 −5 Sources/SnapshotTesting/Extensions/Wait.swift
  28. +324 −0 Sources/SnapshotTesting/Internal/Deprecations.swift
  29. +0 −4 Sources/SnapshotTesting/SnapshotTestCase.swift
  30. +48 −28 Sources/SnapshotTesting/Snapshotting.swift
  31. +56 −12 Sources/SnapshotTesting/Snapshotting/Any.swift
  32. +61 −40 Sources/SnapshotTesting/Snapshotting/CALayer.swift
  33. +136 −111 Sources/SnapshotTesting/Snapshotting/CGPath.swift
  34. +42 −12 Sources/SnapshotTesting/Snapshotting/CaseIterable.swift
  35. +3 −1 Sources/SnapshotTesting/Snapshotting/Data.swift
  36. +0 −7 Sources/SnapshotTesting/Snapshotting/Description.swift
  37. +40 −2 Sources/SnapshotTesting/Snapshotting/{Codable.swift → Encodable.swift}
  38. +91 −77 Sources/SnapshotTesting/Snapshotting/NSBezierPath.swift
  39. +149 −135 Sources/SnapshotTesting/Snapshotting/NSImage.swift
  40. +63 −39 Sources/SnapshotTesting/Snapshotting/NSView.swift
  41. +29 −21 Sources/SnapshotTesting/Snapshotting/NSViewController.swift
  42. +52 −38 Sources/SnapshotTesting/Snapshotting/SceneKit.swift
  43. +52 −38 Sources/SnapshotTesting/Snapshotting/SpriteKit.swift
  44. +9 −6 Sources/SnapshotTesting/Snapshotting/String.swift
  45. +78 −70 Sources/SnapshotTesting/Snapshotting/SwiftUIView.swift
  46. +46 −39 Sources/SnapshotTesting/Snapshotting/UIBezierPath.swift
  47. +254 −227 Sources/SnapshotTesting/Snapshotting/UIImage.swift
  48. +63 −34 Sources/SnapshotTesting/Snapshotting/UIView.swift
  49. +118 −75 Sources/SnapshotTesting/Snapshotting/UIViewController.swift
  50. +46 −11 Sources/SnapshotTesting/Snapshotting/URLRequest.swift
  51. +24 −0 Tests/InlineSnapshotTestingTests/InlineSnapshotTesting.xctestplan
  52. +258 −0 Tests/InlineSnapshotTestingTests/InlineSnapshotTestingTests.swift
  53. +0 −550 Tests/SnapshotTestingTests/InlineSnapshotTests.swift
  54. +1,005 −893 Tests/SnapshotTestingTests/SnapshotTestingTests.swift
  55. +63 −60 Tests/SnapshotTestingTests/TestHelpers.swift
  56. +1 −0 Tests/SnapshotTestingTests/WaitTests.swift
  57. +0 −15 ...otTestingTests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotEscapedNewlineLastLine.1.swift
  58. +0 −13 Tests/SnapshotTestingTests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotMultiLine.1.swift
  59. +0 −13 Tests/SnapshotTestingTests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotSingleLine.1.swift
  60. +0 −13 ...otTestingTests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotWithExtendedDelimiter1.1.swift
  61. +0 −13 ...otTestingTests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotWithExtendedDelimiter2.1.swift
  62. +0 −13 ...ests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotWithExtendedDelimiterSingleLine1.1.swift
  63. +0 −13 ...ests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotWithExtendedDelimiterSingleLine2.1.swift
  64. +0 −13 ...ingTests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotWithLongerExtendedDelimiter1.1.swift
  65. +0 −13 ...ingTests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotWithLongerExtendedDelimiter2.1.swift
  66. +0 −13 ...ngTests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotWithShorterExtendedDelimiter1.1.swift
  67. +0 −13 ...ngTests/__Snapshots__/InlineSnapshotTests/testCreateSnapshotWithShorterExtendedDelimiter2.1.swift
  68. +0 −22 ...hotTestingTests/__Snapshots__/InlineSnapshotTests/testUpdateSeveralSnapshotsSwapingLines1.1.swift
  69. +0 −22 ...hotTestingTests/__Snapshots__/InlineSnapshotTests/testUpdateSeveralSnapshotsSwapingLines2.1.swift
  70. +0 −20 ...hotTestingTests/__Snapshots__/InlineSnapshotTests/testUpdateSeveralSnapshotsWithLessLines.1.swift
  71. +0 −22 ...hotTestingTests/__Snapshots__/InlineSnapshotTests/testUpdateSeveralSnapshotsWithMoreLines.1.swift
  72. +0 −13 Tests/SnapshotTestingTests/__Snapshots__/InlineSnapshotTests/testUpdateSnapshot.1.swift
  73. +0 −19 Tests/SnapshotTestingTests/__Snapshots__/InlineSnapshotTests/testUpdateSnapshotCombined1.1.swift
  74. +0 −13 ...otTestingTests/__Snapshots__/InlineSnapshotTests/testUpdateSnapshotWithExtendedDelimiter1.1.swift
  75. +0 −13 ...otTestingTests/__Snapshots__/InlineSnapshotTests/testUpdateSnapshotWithExtendedDelimiter2.1.swift
  76. +0 −13 Tests/SnapshotTestingTests/__Snapshots__/InlineSnapshotTests/testUpdateSnapshotWithLessLines.1.swift
  77. +0 −13 ...ingTests/__Snapshots__/InlineSnapshotTests/testUpdateSnapshotWithLongerExtendedDelimiter1.1.swift
  78. +0 −13 ...ingTests/__Snapshots__/InlineSnapshotTests/testUpdateSnapshotWithLongerExtendedDelimiter2.1.swift
  79. +0 −15 Tests/SnapshotTestingTests/__Snapshots__/InlineSnapshotTests/testUpdateSnapshotWithMoreLines.1.swift
  80. +0 −13 ...ngTests/__Snapshots__/InlineSnapshotTests/testUpdateSnapshotWithShorterExtendedDelimiter1.1.swift
  81. +0 −13 ...ngTests/__Snapshots__/InlineSnapshotTests/testUpdateSnapshotWithShorterExtendedDelimiter2.1.swift
20 changes: 7 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -13,14 +13,12 @@ jobs:
strategy:
matrix:
xcode:
- "13.2.1" # Swift 5.5.2
- "13.4.1" # Swift 5.6.1
- "14.0" # Swift 5.7
- "14.3.1"

name: macOS 12 (Xcode ${{ matrix.xcode }})
runs-on: macos-12
name: macOS 13 (Xcode ${{ matrix.xcode }})
runs-on: macos-13
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run tests
@@ -30,8 +28,6 @@ jobs:
strategy:
matrix:
swift:
- "5.5"
- "5.6"
- "5.7"

name: Ubuntu (Swift ${{ matrix.swift }})
@@ -40,16 +36,14 @@ jobs:
- uses: swift-actions/setup-swift@v1
with:
swift-version: ${{ matrix.swift }}
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: swift test

windows:
strategy:
matrix:
swift:
- "5.5"
- "5.6"
#- "5.7"
- "5.8"

name: Windows (Swift ${{ matrix.swift }})
runs-on: windows-2019
@@ -65,6 +59,6 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- run: swift build
- run: swift test
29 changes: 29 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Format

on:
push:
branches:
- main

concurrency:
group: format-${{ github.ref }}
cancel-in-progress: true

jobs:
swift_format:
name: swift-format
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- name: Xcode Select
run: sudo xcode-select -s /Applications/Xcode_14.3.1.app
- name: Install
run: brew install swift-format
- name: Format
run: make format
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Run swift-format
branch: 'main'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading