Skip to content

Commit 4763a0f

Browse files
authored
Setup Stage for Validating CarouselView2 (#29283)
* Setup Stage for Validating CarouselView2 * Update ui-tests.yml * Update ui-tests.yml * - force LineBreakModeInCarouselViewShouldWork to only use CV1
1 parent 1fea6a7 commit 4763a0f

File tree

2 files changed

+52
-11
lines changed

2 files changed

+52
-11
lines changed

eng/pipelines/common/ui-tests.yml

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ parameters:
88
androidApiLevels: [ 30 ]
99
iosVersions: [ 'latest' ]
1010
provisionatorChannel: 'latest'
11+
timeoutInMinutes: 120
1112
skipProvisioning: true
1213
agentPoolAccessToken: ''
1314
categoryGroupsToTest:
@@ -143,7 +144,7 @@ stages:
143144
${{ each categoryGroup in parameters.categoryGroupsToTest }}:
144145
${{ categoryGroup }}:
145146
CATEGORYGROUP: ${{ categoryGroup }}
146-
timeoutInMinutes: 240 # how long to run the job before automatically cancelling
147+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }} # how long to run the job before automatically cancelling
147148
workspace:
148149
clean: all
149150
displayName: ${{ coalesce(project.desc, project.name) }} (v${{ version }})
@@ -180,7 +181,7 @@ stages:
180181
- ${{ each version in parameters.iosVersions }}:
181182
- ${{ if not(containsValue(project.iosVersionsExclude, version)) }}:
182183
- job: CV2_ios_ui_tests_mono_${{ project.name }}_${{ replace(version, '.', '_') }}
183-
timeoutInMinutes: 240 # how long to run the job before automatically cancelling
184+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }} # how long to run the job before automatically cancelling
184185
workspace:
185186
clean: all
186187
displayName: ${{ coalesce(project.desc, project.name) }} (v${{ version }})
@@ -209,6 +210,44 @@ stages:
209210
testConfigurationArgs: "CollectionView2"
210211
skipProvisioning: ${{ parameters.skipProvisioning }}
211212

213+
- stage: ios_ui_tests_mono_carv2
214+
displayName: iOS UITests Mono CarouselView2
215+
dependsOn: build_ui_tests
216+
jobs:
217+
- ${{ each project in parameters.projects }}:
218+
- ${{ if ne(project.ios, '') }}:
219+
- ${{ each version in parameters.iosVersions }}:
220+
- ${{ if not(containsValue(project.iosVersionsExclude, version)) }}:
221+
- job: CARV2_ios_ui_tests_mono_${{ project.name }}_${{ replace(version, '.', '_') }}
222+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }} # how long to run the job before automatically cancelling
223+
workspace:
224+
clean: all
225+
displayName: ${{ coalesce(project.desc, project.name) }} (v${{ version }})
226+
pool: ${{ parameters.iosPool }}
227+
variables:
228+
REQUIRED_XCODE: $(DEVICETESTS_REQUIRED_XCODE)
229+
APPIUM_HOME: $(System.DefaultWorkingDirectory)/.appium/
230+
steps:
231+
- template: ui-tests-steps.yml
232+
parameters:
233+
platform: ios
234+
${{ if eq(version, 'latest') }}:
235+
version: 16.4
236+
${{ if ne(version, 'latest') }}:
237+
version: ${{ version }}
238+
path: ${{ project.ios }}
239+
app: ${{ project.app }}
240+
${{ if eq(version, 'latest') }}:
241+
device: ios-simulator-64
242+
${{ if ne(version, 'latest') }}:
243+
device: ios-simulator-64_${{ version }}
244+
provisionatorChannel: ${{ parameters.provisionatorChannel }}
245+
agentPoolAccessToken: ${{ parameters.agentPoolAccessToken }}
246+
runtimeVariant : "Mono"
247+
testFilter: "CarouselView"
248+
testConfigurationArgs: "CollectionView2"
249+
skipProvisioning: ${{ parameters.skipProvisioning }}
250+
212251
- ${{ if or(parameters.BuildEverything, and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'devdiv'))) }}:
213252
- stage: ios_ui_tests_nativeaot
214253
displayName: iOS UITests NativeAOT
@@ -224,7 +263,7 @@ stages:
224263
${{ each categoryGroup in parameters.categoryGroupsToTest }}:
225264
${{ categoryGroup }}:
226265
CATEGORYGROUP: ${{ categoryGroup }}
227-
timeoutInMinutes: 240 # how long to run the job before automatically cancelling
266+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }} # how long to run the job before automatically cancelling
228267
workspace:
229268
clean: all
230269
displayName: ${{ coalesce(project.desc, project.name) }} (v${{ version }})
@@ -264,7 +303,7 @@ stages:
264303
${{ each categoryGroup in parameters.categoryGroupsToTest }}:
265304
${{ categoryGroup }}:
266305
CATEGORYGROUP: ${{ categoryGroup }}
267-
timeoutInMinutes: 240 # how long to run the job before automatically cancelling
306+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }} # how long to run the job before automatically cancelling
268307
workspace:
269308
clean: all
270309
displayName: ${{ coalesce(project.desc, project.name) }}
@@ -296,7 +335,7 @@ stages:
296335
${{ each categoryGroup in parameters.categoryGroupsToTest }}:
297336
${{ categoryGroup }}:
298337
CATEGORYGROUP: ${{ categoryGroup }}
299-
timeoutInMinutes: 240 # how long to run the job before automatically cancelling
338+
timeoutInMinutes: ${{ parameters.timeoutInMinutes }} # how long to run the job before automatically cancelling
300339
workspace:
301340
clean: all
302341
displayName: ${{ coalesce(project.desc, project.name) }}

src/Controls/tests/TestCases.HostApp/Issues/Issue28930.xaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
44
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
5+
xmlns:local="clr-namespace:Maui.Controls.Sample"
56
x:Class="Maui.Controls.Sample.Issues.Issue28930">
67
<VerticalStackLayout>
78
<Border Stroke="Violet"
@@ -10,22 +11,23 @@
1011
<VerticalStackLayout Spacing="10">
1112
<Label Text="CAROUSEL"
1213
TextTransform="Uppercase" />
13-
<CarouselView x:Name="MyCarousel"
14+
<!--https://github.com/dotnet/maui/issues/29402 -->
15+
<local:CarouselView1 x:Name="MyCarousel"
1416
AutomationId="MyCarousel"
1517
HorizontalOptions="Fill"
1618
VerticalOptions="Start"
1719
MinimumHeightRequest="120"
1820
HeightRequest="140"
1921
HorizontalScrollBarVisibility="Never"
2022
EmptyView="No data">
21-
<CarouselView.ItemsSource>
23+
<local:CarouselView1.ItemsSource>
2224
<x:Array Type="{x:Type x:String}">
2325
<x:String>Item 1</x:String>
2426
<x:String>Item 2</x:String>
2527
<x:String>Item 3</x:String>
2628
</x:Array>
27-
</CarouselView.ItemsSource>
28-
<CarouselView.ItemTemplate>
29+
</local:CarouselView1.ItemsSource>
30+
<local:CarouselView1.ItemTemplate>
2931
<DataTemplate>
3032
<Grid ColumnDefinitions="*,*,*,*"
3133
RowDefinitions="*,Auto">
@@ -138,8 +140,8 @@
138140
</Grid>
139141
</Grid>
140142
</DataTemplate>
141-
</CarouselView.ItemTemplate>
142-
</CarouselView>
143+
</local:CarouselView1.ItemTemplate>
144+
</local:CarouselView1>
143145
</VerticalStackLayout>
144146
</Border>
145147
</VerticalStackLayout>

0 commit comments

Comments
 (0)