-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RUM-7475 [SR][SwiftUI] Update snapshot tests
- Loading branch information
Showing
10 changed files
with
119 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
.../SRFixtures/Sources/SRFixtures/Resources/Assets.xcassets/Flowers_1.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Flowers_1.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+926 KB
...s/Sources/SRFixtures/Resources/Assets.xcassets/Flowers_1.imageset/Flowers_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions
65
...ionReplay/SRSnapshotTests/SRFixtures/Sources/SRFixtures/ViewControllers/SwiftUIView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Unless explicitly stated otherwise all files in this repository are licensed under the Apache License Version 2.0. | ||
* This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
* Copyright 2019-Present Datadog, Inc. | ||
*/ | ||
|
||
import SwiftUI | ||
|
||
@available(iOS 13.0, *) | ||
struct SwiftUIView: View { | ||
var body: some View { | ||
VStack(spacing: 10) { | ||
Text("Hello, SwiftUI!") | ||
.font(.headline) | ||
|
||
if #available(iOS 14.0, *) { | ||
if #available(iOS 15.0, *) { | ||
Label("Label with Icon", systemImage: "star.fill") | ||
.font(.subheadline) | ||
.foregroundStyle(.secondary) | ||
} | ||
} | ||
|
||
TextField("Enter text", text: .constant("Placeholder text")) | ||
.textFieldStyle(RoundedBorderTextFieldStyle()) | ||
.padding(8) | ||
|
||
Button(action: {}) { | ||
if #available(iOS 15.0, *) { | ||
Text("SwiftUI Button") | ||
.padding() | ||
.foregroundStyle(.background) | ||
.background(Color.blue) | ||
.cornerRadius(8) | ||
} | ||
} | ||
|
||
Divider() | ||
.frame(height: 2) | ||
.background(Color.purple) | ||
.padding(.horizontal, 20) | ||
.padding(.vertical, 6) | ||
|
||
Image("dd_logo", bundle: .module) | ||
.resizable() | ||
.scaledToFit() | ||
.background(Color.purple) | ||
.frame(width: 120, height: 120) | ||
.clipped() | ||
|
||
Image("Flowers_1", bundle: .module) | ||
.resizable() | ||
.scaledToFit() | ||
.background(Color.purple) | ||
.frame(width: 120, height: 120) | ||
.clipped() | ||
|
||
List { | ||
Text("Item 1") | ||
Text("Item 2") | ||
}.frame(height: 140) | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...SnapshotTests/SRSnapshotTests/_snapshots_/pointers/testSwiftUI()-maskAll-privacy.png.json
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
...RSnapshotTests/_snapshots_/pointers/testSwiftUI()-maskAll_images-maskAll-privacy.png.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"hash":"7fd7cbf998758b4cc8b158b9e71da0d082080664"} |
1 change: 1 addition & 0 deletions
1
...ts/_snapshots_/pointers/testSwiftUI()-maskAll_images-maskSensitiveInputs-privacy.png.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"hash":"3d49c0331f488fa86d8a7329aa3d51270c94254d"} |
1 change: 1 addition & 0 deletions
1
...napshots_/pointers/testSwiftUI()-maskNonBundledOnly_images-maskAllInputs-privacy.png.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"hash":"598e97a5a0faaced2f11948d9189a7b498a1a355"} |
1 change: 0 additions & 1 deletion
1
...s/SRSnapshotTests/_snapshots_/pointers/testSwiftUI()-maskSensitiveInputs-privacy.png.json
This file was deleted.
Oops, something went wrong.