Skip to content

Commit 3327fb7

Browse files
committed
updated tests
1 parent aded588 commit 3327fb7

File tree

5 files changed

+10
-3
lines changed

5 files changed

+10
-3
lines changed

Sources/BuilderIO/Components/BuilderImage.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ struct BuilderImage: BuilderViewProtocol {
4646
.aspectRatio(self.aspectRatio ?? 1, contentMode: self.contentMode)
4747
.overlay(ProgressView())
4848
case .error:
49-
EmptyView()
49+
Rectangle()
50+
.fill(Color.clear)
5051
case .loaded(let uiImage):
5152
if fitContent {
5253
// Content fits over the image, image acts as background

Tests/BuilderIOTests/BuilderIOPageViewTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class BuilderIOPageViewTests: XCTestCase {
2929

3030
let hostingController = makeHostingController(for: "/text", width: 375, height: 812)
3131

32-
      let expectation = XCTestExpectation(description: "Wait for view to render")
32+
let expectation = XCTestExpectation(description: "Wait for view to render")
3333

3434
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
3535

@@ -46,7 +46,7 @@ class BuilderIOPageViewTests: XCTestCase {
4646

4747
let hostingController = makeHostingController(for: "/layout", width: 375, height: 812)
4848

49-
      let expectation = XCTestExpectation(description: "Wait for view to render")
49+
let expectation = XCTestExpectation(description: "Wait for view to render")
5050

5151
DispatchQueue.main.asyncAfter(deadline: .now() + 2) {
5252

Tests/BuilderIOTests/Helper/BuilderIOMockManager.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ class BuilderIOMockManager {
126126
"https://pngimg.com/uploads/macbook/small/macbook_PNG65.png",
127127
"extension": "png",
128128
],
129+
[
130+
"name": "gloss",
131+
"url":
132+
"https://cdn.builder.io/api/v1/image/assets%2F89d6bbb44070475d9580fd22f21ef8f1%2F4c0ff0da35b24347bb87443f268979bd?width=2000",
133+
"extension": "jpg",
134+
],
129135
]
130136

131137
func registerImageMock(statusCode: Int = 200) {
60.5 KB
Loading
47.4 KB
Loading

0 commit comments

Comments
 (0)