public void View_loaded_documents_details_from_user_update_history() { 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 user = client.Users[0]; Open(user); Click("История обновлений"); OpenedWindow(String.Format("История обновлений пользователя {0}", user.Login)); browser.Link("ShowUpdateDetailsLink" + updateEntity.Id).Click(); Thread.Sleep(2000); AssertText("Дата загрузки"); AssertText("Тип документа"); AssertText("Дата разбора"); AssertText("Имя файла"); AssertText("Статус"); AssertText("Разобран"); AssertText(supplier.Name); browser.Link("ShowDocumentDetailsLink" + documentLogEntity.Id).Click(); Check_document_view(document); }
public void View_loaded_documents_details_from_client_update_history() { 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); Open(client); Click("История обновлений"); OpenedWindow(String.Format("История обновлений клиента {0}", client.Name)); Assert.IsTrue(browser.Link(Find.ByText("Загрузка документов на сервер")).Exists); browser.Link("ShowUpdateDetailsLink" + updateEntity.Id).Click(); Thread.Sleep(2000); AssertText("Дата загрузки"); AssertText("Тип документа"); AssertText("Дата разбора"); AssertText("Имя файла"); AssertText("Статус"); AssertText("Разобран"); AssertText(supplier.Name); browser.Link("ShowDocumentDetailsLink" + documentLogEntity.Id).Click(); Check_document_view(document); }
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 View_loaded_documents_details_from_user_document_history() { 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); Open(client); Click("История документов"); OpenedWindow("История документов"); AssertText(supplier.Name); browser.Link("ShowDocumentDetailsLink" + documentLogEntity.Id).Click(); Thread.Sleep(1000); AssertText("Код товара"); AssertText("Наименование"); AssertText("Производитель"); AssertText("Страна"); AssertText("Количество"); AssertText("Срок годности"); Check_document_view(document); }
private void Check_document_view(Document document) { Thread.Sleep(2000); AssertText(document.ProviderDocumentId); AssertText(document.Lines[0].Producer); AssertText(document.Lines[0].Country); AssertText(ViewHelper.CostFormat(document.Lines[0].ProducerCost, 2)); AssertText(ViewHelper.CostFormat(document.Lines[0].Nds, 2)); AssertText(document.Lines[0].Certificates); }
private void Create_loaded_document_logs(out Client client, out Supplier supplier, out DocumentReceiveLog documentLogEntity, out Document document, out UpdateLogEntity updateLogEntity) { Create_loaded_document_logs_unparsed_document(out client, out supplier, out documentLogEntity, out updateLogEntity); document = DataMother.CreateTestDocument(supplier, client, documentLogEntity); }