Skip to content

Commit

Permalink
Assert initial window width to ensure correctness of asserts that fol…
Browse files Browse the repository at this point in the history
…low.
  • Loading branch information
koendehondt committed Jan 26, 2024
1 parent bb858f6 commit 377b41d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ SpMorphicBoxLayoutTest >> testBeHomogeneous [
{ #category : #tests }
SpMorphicBoxLayoutTest >> testBeHomogeneousWorksWhenContractingWindow [

| presenter p1 p2 p3 windowWidth presenterWidth width1 width2 width3 |
| presenter p1 p2 p3 windowWidth presenterWidth width1 width2 width3 initialWindowWidth |
"not working on CI :("
self skipOnPharoCITestingEnvironment.

Expand All @@ -114,6 +114,8 @@ SpMorphicBoxLayoutTest >> testBeHomogeneousWorksWhenContractingWindow [
[
presenter open.
backend waitUntilUIRedrawed.
initialWindowWidth := presenter window adapter widget width.
self assert: initialWindowWidth equals: 400.
presenter withWindowDo: [ :window |
window adapter widgetDo: [ :widget |
"Make the presenter's width a multiple of 3,
Expand All @@ -136,7 +138,7 @@ SpMorphicBoxLayoutTest >> testBeHomogeneousWorksWhenContractingWindow [
{ #category : #tests }
SpMorphicBoxLayoutTest >> testBeHomogeneousWorksWhenExpandingWindow [

| presenter p1 p2 p3 windowWidth presenterWidth width1 width2 width3 |
| presenter p1 p2 p3 windowWidth presenterWidth width1 width2 width3 initialWindowWidth |
presenter := SpPresenter new.
presenter layout: (SpBoxLayout newHorizontal
beHomogeneous;
Expand All @@ -152,6 +154,8 @@ SpMorphicBoxLayoutTest >> testBeHomogeneousWorksWhenExpandingWindow [
[
presenter open.
backend waitUntilUIRedrawed.
initialWindowWidth := presenter window adapter widget width.
self assert: initialWindowWidth equals: 400.
presenter withWindowDo: [ :window |
window adapter widgetDo: [ :widget |
"Make the presenter's width a multiple of 3,
Expand Down

0 comments on commit 377b41d

Please sign in to comment.