Example #1
0
        public void AmountValidationTest()
        {
            var task1 = new Task1(this.Driver);
            task1.NavigateToPage(GetHost() + "task_1");
            task1.AddAmount("product1", "101");

            Assert.True(task1.IsAlertVisible(), "Alert Message is not visible");
            task1.DismissAlert();
        }
Example #2
0
        public void AlertTextValidationTest()
        {
            const string expectedMessage = "Łączna ilość produktów w koszyku nie może przekroczyć 100.";
            var task1 = new Task1(this.Driver);
            task1.NavigateToPage(GetHost() + "task_1");
            task1.AddAmount("product1", "101");

            Assert.True(task1.IsAlertVisible(), "Alert Message is not visible");
            Assert.True(task1.GetValidationText().Equals(expectedMessage), "Improper alert message, expected {0}, actual {1}", expectedMessage, task1.GetValidationText());
            task1.DismissAlert();
        }