Open OlhaKucheriava opened 2 years ago
Maybe the following enhancement of the test case would help (it did for me at least):
xrmApp.Entity.Save();
var notification = client.Browser.Driver.FindElement(By.XPath("//span[@data-id='warningNotification']"));
Assert.Equal("Topic : Required fields must be filled in.", notification.Text);
This allows you to actually check the correct warning message and you have actually more control over your test case.
Maybe the following enhancement of the test case would help (it did for me at least):
xrmApp.Entity.Save(); var notification = client.Browser.Driver.FindElement(By.XPath("//span[@data-id='warningNotification']")); Assert.Equal("Topic : Required fields must be filled in.", notification.Text);
This allows you to actually check the correct warning message and you have actually more control over your test case.
Yes. I know the workaround, thanks! I just think that this bug should be fixed as this could create false passed test cases for some users and they will never know it.
Bug Report
EasyRepro Version EasyRepro-develop-2021ReleaseWave2
UCI or Classic Web
Online or On Premise
Browser
Browser
Describe the bug
Run the test case with the code below. Or have any other test case, where you create a record and do not fill in the required field on the form and save this record
Code to reproduce
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license.
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.Dynamics365.UIAutomation.Api.UCI; using Microsoft.Dynamics365.UIAutomation.Browser; using System; using System.Security;
namespace Microsoft.Dynamics365.UIAutomation.Sample.UCI { [TestClass] public class CreateAccountUCI {
} -->
Expected behavior
test case should fail as required fields are not filled in
Actual behavior: test case is marked as passed even though the record was not saved,