|
Wersja 882, 1.6 KB
(wprowadzona przez alina, 16 years temu)
|
|
re #215 testowanie interfejsu (dot.Pay)
|
| Line | |
|---|
| 1 | using System;
|
|---|
| 2 | using System.Collections.Generic;
|
|---|
| 3 | using System.Linq;
|
|---|
| 4 | using System.Text;
|
|---|
| 5 | using NUnit.Framework;
|
|---|
| 6 | using WatiN.Core;
|
|---|
| 7 | using System.Web.Mvc;
|
|---|
| 8 |
|
|---|
| 9 | namespace Platnosci.Tests.Web
|
|---|
| 10 | {
|
|---|
| 11 | [TestFixture]
|
|---|
| 12 | public class UIPlatnosciTests
|
|---|
| 13 | {
|
|---|
| 14 | [Test]
|
|---|
| 15 | [Category("UI")]
|
|---|
| 16 | public void checkErrorPay()
|
|---|
| 17 | {
|
|---|
| 18 | string test = "test";
|
|---|
| 19 | IE ie = new IE("http://localhost:3646/pl/Account/LogOn");
|
|---|
| 20 | ie.TextField(Find.ByName("numer_faktury")).TypeText("27/ASZ/2009");
|
|---|
| 21 | ie.TextField(Find.ByName("nip")).TypeText("854956281");
|
|---|
| 22 | ie.Button(Find.ById("loguj")).Click();
|
|---|
| 23 |
|
|---|
| 24 | ie.TextField(Find.ByName("Payer.FirstName")).TypeText(test);
|
|---|
| 25 | ie.TextField(Find.ByName("Payer.LastName")).TypeText("");
|
|---|
| 26 | ie.Button(Find.ById("place")).Click();
|
|---|
| 27 | Assert.IsTrue(ie.ContainsText("Proszę podać"));
|
|---|
| 28 | }
|
|---|
| 29 | [Test]
|
|---|
| 30 | [Category("UI")]
|
|---|
| 31 | public void checkCorrectPay()
|
|---|
| 32 | {
|
|---|
| 33 | string test = "test";
|
|---|
| 34 | IE ie = new IE("http://localhost:3646/pl/Account/LogOn");
|
|---|
| 35 | ie.TextField(Find.ByName("numer_faktury")).TypeText("27/ASZ/2009");
|
|---|
| 36 | ie.TextField(Find.ByName("nip")).TypeText("854956281");
|
|---|
| 37 | ie.Button(Find.ById("loguj")).Click();
|
|---|
| 38 |
|
|---|
| 39 | ie.TextField(Find.ByName("Payer.FirstName")).TypeText(test);
|
|---|
| 40 | ie.TextField(Find.ByName("Payer.LastName")).TypeText(test);
|
|---|
| 41 | ie.Button(Find.ById("place")).Click();
|
|---|
| 42 | Assert.IsTrue(ie.ContainsText("Imię i nazwisko:" + test + " " + test));
|
|---|
| 43 | }
|
|---|
| 44 | }
|
|---|
| 45 | }
|
|---|
Notatka: Zobacz
TracBrowser
aby uzyskać więcej informacji.