root/trunk/eCard/eCardMVC/Platnosci.Tests/Web/UIAccountTest.cs @ 882

Wersja 882, 1.1 KB (wprowadzona przez alina, 16 years temu)

re #215 testowanie interfejsu (dot.Pay)

Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using NUnit.Framework;
6using WatiN.Core;
7using System.Web.Mvc;
8
9namespace Platnosci.Tests.Web
10{
11    [TestFixture]
12    public class UIAccountTest
13    {
14        [Test]
15        [Category("UI")]
16        public void checkLoginCorrect()
17        {
18            IE ie = new IE("http://localhost:3646/pl/Account/LogOn");
19            ie.TextField(Find.ByName("numer_faktury")).TypeText("24/HOL/2009");
20            ie.TextField(Find.ByName("nip")).TypeText("501379568");
21            ie.Button(Find.ById("loguj")).Click();
22            Assert.IsTrue(ie.ContainsText("została uregulowana"));
23        }
24        [Test]
25        [Category("UI")]
26        public void checkErrorLogin()
27        {
28            IE ie = new IE("http://localhost:3646/pl/Account/LogOn");
29            ie.TextField(Find.ByName("numer_faktury")).TypeText("");
30            ie.TextField(Find.ByName("nip")).TypeText("");
31            ie.Button(Find.ById("loguj")).Click();
32            Assert.IsTrue(ie.ContainsText("Logowanie nie powiodło się"));
33        }
34    }
35}
Notatka: Zobacz TracBrowser aby uzyskać więcej informacji.