Skip to content

Commit f5882e0

Browse files
committed
Fix ActionUIViewTests
We removed ActionUIViewTests Equatable conformance because views were not refreshing on state change. These tests relied on equality comparison.
1 parent 4a0a23a commit f5882e0

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

ActionUITests/Common/ActionUIViewTests.swift

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ final class ActionUIViewTests: XCTestCase {
5656
let view2 = ActionUIView(element: element2, model: viewModel, windowUUID: "uuid")
5757

5858
// Act & Assert
59-
XCTAssertEqual(view1, view2, "Views with identical children should be equal")
59+
// XCTAssertEqual(view1, view2, "Views with identical children should be equal")
6060
}
6161

6262
func testEquatableWithDifferentChildren() {
@@ -87,7 +87,7 @@ final class ActionUIViewTests: XCTestCase {
8787
let view2 = ActionUIView(element: element2, model: viewModel, windowUUID: "uuid")
8888

8989
// Act & Assert
90-
XCTAssertNotEqual(view1, view2, "Views with different children should not be equal")
90+
// XCTAssertNotEqual(view1, view2, "Views with different children should not be equal")
9191
}
9292

9393
func testEquatableWithIdenticalRows() {
@@ -130,7 +130,7 @@ final class ActionUIViewTests: XCTestCase {
130130
let view2 = ActionUIView(element: element2, model: viewModel, windowUUID: "uuid")
131131

132132
// Act & Assert
133-
XCTAssertEqual(view1, view2, "Views with identical rows should be equal")
133+
// XCTAssertEqual(view1, view2, "Views with identical rows should be equal")
134134
}
135135

136136
func testEquatableWithDifferentRows() {
@@ -165,7 +165,7 @@ final class ActionUIViewTests: XCTestCase {
165165
let view2 = ActionUIView(element: element2, model: viewModel, windowUUID: "uuid")
166166

167167
// Act & Assert
168-
XCTAssertNotEqual(view1, view2, "Views with different rows should not be equal")
168+
// XCTAssertNotEqual(view1, view2, "Views with different rows should not be equal")
169169
}
170170

171171
func testEquatableWithIdenticalContent() {
@@ -192,7 +192,7 @@ final class ActionUIViewTests: XCTestCase {
192192
let view2 = ActionUIView(element: element2, model: viewModel, windowUUID: "uuid")
193193

194194
// Act & Assert
195-
XCTAssertEqual(view1, view2, "Views with identical content should be equal")
195+
// XCTAssertEqual(view1, view2, "Views with identical content should be equal")
196196
}
197197

198198
func testEquatableWithDifferentContent() {
@@ -219,7 +219,7 @@ final class ActionUIViewTests: XCTestCase {
219219
let view2 = ActionUIView(element: element2, model: viewModel, windowUUID: "uuid")
220220

221221
// Act & Assert
222-
XCTAssertNotEqual(view1, view2, "Views with different content should not be equal")
222+
// XCTAssertNotEqual(view1, view2, "Views with different content should not be equal")
223223
}
224224

225225
func testEquatableWithIdenticalMixedSubviews() {
@@ -252,7 +252,7 @@ final class ActionUIViewTests: XCTestCase {
252252
let view2 = ActionUIView(element: element2, model: viewModel, windowUUID: "uuid")
253253

254254
// Act & Assert
255-
XCTAssertEqual(view1, view2, "Views with identical mixed subviews should be equal")
255+
// XCTAssertEqual(view1, view2, "Views with identical mixed subviews should be equal")
256256
}
257257

258258
func testEquatableWithDifferentMixedSubviews() {
@@ -285,7 +285,7 @@ final class ActionUIViewTests: XCTestCase {
285285
let view2 = ActionUIView(element: element2, model: viewModel, windowUUID: "uuid")
286286

287287
// Act & Assert
288-
XCTAssertNotEqual(view1, view2, "Views with different mixed subviews should not be equal")
288+
// XCTAssertNotEqual(view1, view2, "Views with different mixed subviews should not be equal")
289289
}
290290

291291
func testEquatableWithDifferentState() {
@@ -304,7 +304,7 @@ final class ActionUIViewTests: XCTestCase {
304304
let view2 = ActionUIView(element: element, model: viewModel2, windowUUID: "uuid")
305305

306306
// Act & Assert
307-
XCTAssertNotEqual(view1, view2, "Views with different state should not be equal")
307+
// XCTAssertNotEqual(view1, view2, "Views with different state should not be equal")
308308
}
309309

310310
func testEquatableWithDifferentWindowUUID() {
@@ -321,7 +321,7 @@ final class ActionUIViewTests: XCTestCase {
321321
let view2 = ActionUIView(element: element, model: viewModel, windowUUID: "uuid2")
322322

323323
// Act & Assert
324-
XCTAssertNotEqual(view1, view2, "Views with different windowUUID should not be equal")
324+
// XCTAssertNotEqual(view1, view2, "Views with different windowUUID should not be equal")
325325
}
326326

327327
func testEquatableWithEmptyAndNilSubviewsEarlyReturn() {
@@ -344,7 +344,7 @@ final class ActionUIViewTests: XCTestCase {
344344
let view2 = ActionUIView(element: element2, model: viewModel, windowUUID: "uuid")
345345

346346
// Act & Assert
347-
XCTAssertEqual(view1, view2, "Views with nil and empty subviews should be equal with early return")
347+
// XCTAssertEqual(view1, view2, "Views with nil and empty subviews should be equal with early return")
348348
}
349349

350350
func testEquatableWithDifferentSubviewKeys() {
@@ -373,7 +373,7 @@ final class ActionUIViewTests: XCTestCase {
373373
let view2 = ActionUIView(element: element2, model: viewModel, windowUUID: "uuid")
374374

375375
// Act & Assert
376-
XCTAssertNotEqual(view1, view2, "Views with different subview keys should not be equal")
376+
// XCTAssertNotEqual(view1, view2, "Views with different subview keys should not be equal")
377377
}
378378

379379
func testBodyProducesValidView() {

0 commit comments

Comments
 (0)