Skip to content

Commit f201311

Browse files
authored
Fix StackLayout's sizeChildrenGenerallyWithConcreteMajorProposal implementation (#369)
* Fix StackLayout's sizeChildrenGenerallyWithConcreteMajorProposal implementation * Add StackLayout's prioritize support * Update update for StackLayout * Update resize implementation for StackLayout * Update commitPlacements to handle layoutDirection
1 parent 67fa085 commit f201311

File tree

2 files changed

+253
-135
lines changed

2 files changed

+253
-135
lines changed

Example/OpenSwiftUIUITests/Layout/Stack/HVStackUITests.swift

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -144,11 +144,9 @@ struct HVStackUITests {
144144
.background { Color.black }
145145
}
146146
}
147-
withKnownIssue("Proposal implmentation is not correct") {
148-
openSwiftUIAssertSnapshot(
149-
of: ContentView()
150-
)
151-
}
147+
openSwiftUIAssertSnapshot(
148+
of: ContentView()
149+
)
152150
}
153151

154152
@Test
@@ -166,10 +164,25 @@ struct HVStackUITests {
166164
.background { Color.black }
167165
}
168166
}
169-
withKnownIssue("Proposal implmentation is not correct") {
170-
openSwiftUIAssertSnapshot(
171-
of: ContentView()
172-
)
167+
openSwiftUIAssertSnapshot(
168+
of: ContentView()
169+
)
170+
}
171+
172+
@Test("Verify red and blue should have the same size")
173+
func sameSizeInVStack() {
174+
struct ContentView: View {
175+
var body: some View {
176+
VStack(spacing: 20) {
177+
Color.red
178+
Color.yellow
179+
.frame(width: 10, height: 10)
180+
Color.blue
181+
}
182+
}
173183
}
184+
openSwiftUIAssertSnapshot(
185+
of: ContentView()
186+
)
174187
}
175188
}

0 commit comments

Comments
 (0)