public void PurchaseToy_EnterEmptyPhoneNumber_EmptyFieldErrorAppears() { const string emptyFieldErrorText = "Заполните это поле"; var mainPage = new MainPage(browser); var toyInfoPage = new ToyInfoPage(browser); mainPage.SelectToyClick(); toyInfoPage.PurchaseToyClick(); toyInfoPage.SendOrderClick(); Assert.AreEqual(emptyFieldErrorText, toyInfoPage.GetNameErrorText()); }
public void OrderToy_EnterEmptyPhoneNumber_EmptyFieldErrorAppears() { TakeScreenshotWhenTestFailed(() => { const string emptyFieldErrorText = "Заполните это поле"; var mainPage = new MainPage(Driver); var toyInfoPage = new ToyInfoPage(Driver); mainPage.SelectToyClick(); toyInfoPage.PurchaseToyClick(); toyInfoPage.SendOrderClick(); Assert.AreEqual(emptyFieldErrorText, toyInfoPage.GetNameErrorText()); }); }
public void PurchaseToy_EnterInvalidMailForChiperItem_InvalidEmailErrorAppears() { TakeScreenshotWhenTestFailed(() => { const string emailErrorText = "Неверный формат"; var mainPage = new MainPage(Driver); var toyInfoPage = new ToyInfoPage(Driver); mainPage.SelectToyClick(); toyInfoPage.PurchaseToyClick(); toyInfoPage.ChiperEnterEmail(TestDataReader.GetTestData("Email")); toyInfoPage.SendOrderClick(); Assert.AreEqual(emailErrorText, toyInfoPage.ChiperGetEmailError()); }); }