public void CertificateDetailsFileTest() { Client client = null; Supplier supplier = null; DocumentReceiveLog documentLogEntity = null; Document document = null; UpdateLogEntity updateEntity = null; Create_loaded_document_logs(out client, out supplier, out documentLogEntity, out document, out updateEntity); var sert = new CertificateRequestLog { Line = document.Lines[0], Update = updateEntity }; Save(sert); Open("Main/Stat"); Css("#StatisticsTD a").Click(); AssertText("Статистика по сертификатам"); Thread.Sleep(2000); AssertText(supplier.Name); browser.Link("ShowDocumentDetailsLink" + documentLogEntity.Id).Click(); Thread.Sleep(1000); AssertText("Код товара"); AssertText("Наименование"); AssertText("Производитель"); AssertText("Страна"); AssertText("Количество"); AssertText("Срок годности"); Thread.Sleep(2000); AssertText(document.Lines[0].Producer); AssertText(document.Lines[0].Country); }
public void ShowTest() { var client = DataMother.CreateClientAndUsers(); var user = client.Users.First(); var afUpdate = new UpdateLogEntity(user); var supplier = DataMother.CreateSupplier(); var document = new FullDocument { Supplier = supplier, ClientCode = client.Id }; var line = document.NewLine(new DocumentLine { Product = "TestCertificateRequestLogProduct" }); var nuSert = new CertificateRequestLog { Line = line, Update = afUpdate }; Save(afUpdate, supplier, document, nuSert); Open("Main/Stat"); Css("#StatisticsTD a").Click(); AssertText("Статистика по сертификатам"); var otherRegion = session.QueryOver <Region>().List().Last(); Css("#filter_Region_Id").SelectByValue(otherRegion.Id.ToString()); Click("Показать"); Assert.That(browser.Text, !Is.StringContaining("TestCertificateRequestLogProduct")); Css("#filter_Region_Id").SelectByValue(client.MaskRegion.ToString()); Click("Показать"); AssertText("TestCertificateRequestLogProduct"); }