Skip to content

Commit b8ed047

Browse files
TamilarasanSF4853PureWeen
authored andcommitted
added mac failing condition
1 parent be57569 commit b8ed047

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/HybridWebViewFeatureTests.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public void VerifyHybridWebView_DefaultValues()
3030
Assert.That(hybridRootLabel, Is.EqualTo("HybridWebView1"), "Hybrid Root label should be displayed correctly.");
3131
var hybridDefaultFile = App.FindElement("DefaultFileLabel").GetText();
3232
Assert.That(hybridDefaultFile, Is.EqualTo("index.html"), "Default file should be index.Html.");
33-
VerifyScreenshot();
3433
}
3534

3635
[Test, Order(2)]
@@ -65,13 +64,14 @@ public void VerifyHybridWebView_SameDefaultFileWithDifferentHybridRoot()
6564
Assert.That(hybridDefaultFile, Is.EqualTo("index.html"), "Default file should be index.Html.");
6665
}
6766

67+
#if TEST_FAILS_ON_CATALYST // Issue Link: https://github.com/dotnet/maui/issues/32721
68+
6869
[Test, Order(4)]
6970
[Category(UITestCategories.WebView)]
7071
public void VerifyHybridWebView_EvaluateJavaScriptWithDifferentHybridRoot()
7172
{
7273
App.WaitForElement("ResetButton");
7374
App.Tap("ResetButton");
74-
Thread.Sleep(5000);
7575
App.WaitForElement("HybridWebView1Button");
7676
App.Tap("HybridWebView1Button");
7777
Thread.Sleep(2000); // Allow time for the UI to update
@@ -83,6 +83,7 @@ public void VerifyHybridWebView_EvaluateJavaScriptWithDifferentHybridRoot()
8383

8484
App.WaitForElement("HybridWebView2Button");
8585
App.Tap("HybridWebView2Button");
86+
Thread.Sleep(2000); // Allow time for the UI to update
8687
App.WaitForElement("EvaluateJavaScriptButton");
8788
App.Tap("EvaluateJavaScriptButton");
8889
App.WaitForElement("StatusLabel");
@@ -96,7 +97,6 @@ public void VerifyHybridWebView_EvaluateJavaScriptWithDifferentDefaultFile()
9697
{
9798
App.WaitForElement("ResetButton");
9899
App.Tap("ResetButton");
99-
Thread.Sleep(5000);
100100
App.WaitForElement("HybridWebView1Button");
101101
App.Tap("HybridWebView1Button");
102102
App.WaitForElement("ImageHtmlButton");
@@ -110,6 +110,7 @@ public void VerifyHybridWebView_EvaluateJavaScriptWithDifferentDefaultFile()
110110

111111
App.WaitForElement("NavigationHtmlButton");
112112
App.Tap("NavigationHtmlButton");
113+
Thread.Sleep(2000); // Allow time for the UI to update
113114
App.WaitForElement("EvaluateJavaScriptButton");
114115
App.Tap("EvaluateJavaScriptButton");
115116
App.WaitForElement("StatusLabel");
@@ -123,12 +124,12 @@ public void VerifyHybridWebViewWithShadow()
123124
{
124125
App.WaitForElement("ResetButton");
125126
App.Tap("ResetButton");
126-
Thread.Sleep(5000);
127127
App.WaitForElement("ShadowCheckBox");
128128
App.Tap("ShadowCheckBox");
129129
Thread.Sleep(2000); // Allow time for the UI to update
130130
VerifyScreenshot();
131131
}
132+
#endif
132133

133134
[Test, Order(8)]
134135
[Category(UITestCategories.WebView)]
@@ -141,13 +142,14 @@ public void VerifyHybridWebViewWithIsVisibleFalse()
141142
App.WaitForNoElement("HybridWebViewControl");
142143
}
143144

145+
#if TEST_FAILS_ON_CATALYST // Issue Link: https://github.com/dotnet/maui/issues/32721
146+
144147
[Test, Order(7)]
145148
[Category(UITestCategories.WebView)]
146149
public void VerifyHybridWebView_SendMessageToJavaScript()
147150
{
148151
App.WaitForElement("ResetButton");
149152
App.Tap("ResetButton");
150-
Thread.Sleep(5000);
151153
App.WaitForElement("HybridWebView2Button");
152154
App.Tap("HybridWebView2Button");
153155
App.WaitForElement("IndexHtmlButton");
@@ -158,6 +160,7 @@ public void VerifyHybridWebView_SendMessageToJavaScript()
158160
var message = App.FindElement("StatusLabel").GetText();
159161
Assert.That(message, Is.EqualTo("Message sent successfully. Result: Message received"), "JavaScript should receive the message sent from C#.");
160162
}
163+
#endif
161164

162165
#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS // Issue Link: https://github.com/dotnet/maui/issues/30575, https://github.com/dotnet/maui/issues/30605
163166
[Test, Order(10)]

0 commit comments

Comments
 (0)