-
Notifications
You must be signed in to change notification settings - Fork 2k
Expand file tree
/
Copy pathIssue32275.cs
More file actions
99 lines (88 loc) · 2.84 KB
/
Copy pathIssue32275.cs
File metadata and controls
99 lines (88 loc) · 2.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#if ANDROID || IOS // SafeAreaEdges not supported on Catalyst and Windows
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
namespace Microsoft.Maui.TestCases.Tests.Issues;
public class Issue32275 : _IssuesUITest
{
public override string Issue => "Shell Flyout SafeArea Rendering";
protected override bool ResetAfterEachTest => true;
public Issue32275(TestDevice device) : base(device) { }
// Test 1: Open flyout with default items and capture screenshot
[Test, Order(1)]
[Category(UITestCategories.SafeAreaEdges)]
public void VerifyDefaultFlyoutItemsRendering()
{
App.WaitForElement("PageLoaded");
App.ShowFlyout();
VerifyScreenshot();
}
// Test 2: Open flyout with header/footer and capture screenshot
[Test, Order(2)]
[Category(UITestCategories.SafeAreaEdges)]
public void VerifyFlyoutWithHeaderFooter()
{
App.WaitForElement("ToggleHeaderFooter");
App.Tap("ToggleHeaderFooter");
App.WaitForElement("PageLoaded");
App.ShowFlyout();
App.WaitForElement("Header");
App.WaitForElement("Footer");
VerifyScreenshot();
}
// Test 3: Tap ToggleFlyoutContentTemplate, then open flyout and capture screenshot
[Test, Order(3)]
[Category(UITestCategories.SafeAreaEdges)]
public void VerifyCustomFlyoutContentTemplateRendering()
{
App.WaitForElement("ToggleFlyoutContentTemplate");
App.Tap("ToggleFlyoutContentTemplate");
App.WaitForElement("PageLoaded");
App.ShowFlyout();
VerifyScreenshot();
}
// Test 4: ToggleFlyoutContentTemplate + header/footer, open flyout and capture screenshot
[Test, Order(4)]
[Category(UITestCategories.SafeAreaEdges)]
public void VerifyCustomFlyoutContentTemplateWithHeaderFooter()
{
App.WaitForElement("ToggleFlyoutContentTemplate");
App.Tap("ToggleFlyoutContentTemplate");
App.WaitForElement("ToggleHeaderFooter");
App.Tap("ToggleHeaderFooter");
App.WaitForElement("PageLoaded");
App.ShowFlyout();
App.WaitForElement("Header");
App.WaitForElement("Footer");
VerifyScreenshot();
}
// Test 5: Tap Toggle Flyout Content, open flyout, capture screenshot
[Test, Order(5)]
[Category(UITestCategories.SafeAreaEdges)]
public void VerifyCustomFlyoutContentRendering()
{
App.WaitForElement("ToggleContent");
App.Tap("ToggleContent");
App.WaitForElement("PageLoaded");
App.ShowFlyout();
App.WaitForElement("ContentView");
VerifyScreenshot();
}
// Test 6: Toggle Flyout Content + header/footer, open flyout, capture screenshot
[Test, Order(6)]
[Category(UITestCategories.SafeAreaEdges)]
public void VerifyCustomFlyoutContentWithHeaderFooter()
{
App.WaitForElement("ToggleContent");
App.Tap("ToggleContent");
App.WaitForElement("ToggleHeaderFooter");
App.Tap("ToggleHeaderFooter");
App.WaitForElement("PageLoaded");
App.ShowFlyout();
App.WaitForElement("ContentView");
App.WaitForElement("Header");
App.WaitForElement("Footer");
VerifyScreenshot();
}
}
#endif