-
Notifications
You must be signed in to change notification settings - Fork 2k
[release/11.0.1xx-preview7] Bundle test-only stabilizations #37081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 26 commits
1ce1efe
937bab4
798f38e
01008eb
7ce61e3
945e7af
45ca022
8dfc493
a2fc75c
216d3bd
cadfb47
d12539d
ac88ad4
f1050c3
f2b686f
116c8f4
70956e8
2644776
4b9b9c2
ddff225
98ea8bb
c824c4a
db10e41
405a994
b7e949d
67525bd
83da465
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| #!/usr/bin/env pwsh | ||
| #Requires -Modules Pester | ||
|
|
||
| BeforeAll { | ||
| $screenResolutionScript = Join-Path $PSScriptRoot '../../eng/scripts/Set-ScreenResolution.ps1' | ||
| $tokens = $null | ||
| $parseErrors = $null | ||
| $ast = [System.Management.Automation.Language.Parser]::ParseFile( | ||
| $screenResolutionScript, | ||
| [ref]$tokens, | ||
| [ref]$parseErrors) | ||
|
|
||
| if ($parseErrors.Count -gt 0) { | ||
| throw "Set-ScreenResolution.ps1 has parse errors: $($parseErrors -join '; ')" | ||
| } | ||
|
|
||
| $functionDefinitions = $ast.FindAll({ | ||
| param($node) | ||
| $node -is [System.Management.Automation.Language.FunctionDefinitionAst] | ||
| }, $true) | ||
|
|
||
| foreach ($functionName in @( | ||
| 'Get-ScreenResolutionProbeAction', | ||
| 'Test-ScreenResolutionApplySucceeded' | ||
| )) { | ||
| $definition = $functionDefinitions | | ||
| Where-Object Name -EQ $functionName | | ||
| Select-Object -First 1 | ||
|
|
||
| if ($null -eq $definition) { | ||
| throw "Function '$functionName' was not found in Set-ScreenResolution.ps1" | ||
| } | ||
|
|
||
| Invoke-Expression $definition.Extent.Text | ||
| } | ||
|
|
||
| $setResolutionDefinition = $functionDefinitions | | ||
| Where-Object Name -EQ 'Set-ScreenResolution' | | ||
| Select-Object -First 1 | ||
|
|
||
| if ($null -eq $setResolutionDefinition) { | ||
| throw "Function 'Set-ScreenResolution' was not found in Set-ScreenResolution.ps1" | ||
| } | ||
|
|
||
| $setResolutionBody = $setResolutionDefinition.Extent.Text | ||
| } | ||
|
|
||
| Describe 'Set-ScreenResolution native result decisions' { | ||
| It 'returns <Expected> for CDS_TEST result <Result>' -ForEach @( | ||
| @{ Result = 0; Expected = 'Apply' } | ||
| @{ Result = -1; Expected = 'Apply' } | ||
| @{ Result = -2; Expected = 'Reject' } | ||
| @{ Result = -3; Expected = 'Apply' } | ||
| @{ Result = -4; Expected = 'Apply' } | ||
| @{ Result = -5; Expected = 'Apply' } | ||
| ) { | ||
| Get-ScreenResolutionProbeAction -Result $Result | Should -Be $Expected | ||
| } | ||
|
|
||
| It 'returns <Expected> for real apply result <Result>' -ForEach @( | ||
| @{ Result = 0; Expected = $true } | ||
| @{ Result = 1; Expected = $true } | ||
| @{ Result = -1; Expected = $false } | ||
| @{ Result = -2; Expected = $false } | ||
| @{ Result = -3; Expected = $false } | ||
| @{ Result = -4; Expected = $false } | ||
| @{ Result = -5; Expected = $false } | ||
| ) { | ||
| Test-ScreenResolutionApplySucceeded -Result $Result | Should -Be $Expected | ||
| } | ||
|
|
||
| It 'uses the pure decisions in the native flow' { | ||
| $setResolutionBody | Should -Match 'Get-ScreenResolutionProbeAction\s+-Result\s+\$testResult' | ||
| $setResolutionBody | Should -Match 'Test-ScreenResolutionApplySucceeded\s+-Result\s+\$changeResult' | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,6 +196,8 @@ public void VerifyTextWhenClearButtonVisibleSetNever() | |
| App.Tap("Apply"); | ||
| App.WaitForElement("TestEntry"); | ||
| App.Tap("TestEntry"); | ||
| if (App is AppiumIOSApp) | ||
| Assert.That(App.WaitForKeyboardToShow(), Is.True, "The iOS keyboard did not appear before the snapshot."); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Flagged by: 1/3 reviewers + repo specialist after dispute
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks — agreed this is a remaining coverage opportunity. I kept this aggregate scoped to the exact Entry path that failed in Preview 7. The shared helper is also used by cases where the iOS keyboard may intentionally be absent or transition differently, so making the wait unconditional could create new failures. I am treating this as non-blocking and will add the guard to another specific call site if exact CI evidence shows the same race there. |
||
| VerifyScreenshotWithKeyboardHandling(); | ||
| } | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.