Exemplo n.º 1
0
        public void ThenIFill_OutTheTestPlanchetesByManualDripping()
        {
            BDManualDrippingPage bDManualDrippingPage = new BDManualDrippingPage();
            MSDatabaseConnector  _msBDConnector       = new MSDatabaseConnector(Config.MSDbBatchDropperStab);
            string command        = $@"Select count ([Id]) FROM [BatchDropperStab].[dbo].[Batches] Where Status = 22";
            var    countOfBatches = _msBDConnector.QueryExecutorScalar(command);
            int    intCount;

            intCount = System.Convert.ToInt32(countOfBatches);

            if (intCount != 0)
            {
                string command1 = $@"SELECT [Id] FROM[BatchDropperStab].[dbo].[Batches] Where Status = 22 Order by ChangedOn desc";
                var    listOfID = _msBDConnector.QueryExecutor(command1);
                foreach (string i in listOfID)
                {
                    bDManualDrippingPage.ConfirmTestBatchField.WaitForClickability();
                    bDManualDrippingPage.ConfirmTestBatchField.SendKeys(i).SendKeys(Keys.Enter);
                    CommonSteps commonSteps = new CommonSteps();
                    commonSteps.ThenThePopupWithTitleShouldBeClosed();
                    BDReagentsWorkplacePage bDReagentsWorkplacePage = new BDReagentsWorkplacePage();
                    bDReagentsWorkplacePage.SetUsercode();
                    bDManualDrippingPage.AddClipboardCopyOfBatches();
                    bDManualDrippingPage.AddClipboardCopyOfTubes();
                    bDManualDrippingPage.ConfimEndOfDripping();
                    commonSteps.ThenThePopupWithTitleShouldBeClosed();
                }
            }
        }
        public void WhenIConfirmTest_BatchIdForContinueManualDripping()
        {
            BDMainPage mainPage = new BDMainPage();

            mainPage.OpenManualDripping();
            mainPage.AssertOpenManualDripping();
            MSDatabaseConnector _msBDConnector = new MSDatabaseConnector(Config.MSDbBatchDropperStab);
            string command   = $@"SELECT TOP(1) ID from [BatchDropperStab].[dbo].[Batches] Where [Name] like '%T-%' Order By ChangedOn desc";
            var    tESTBATCH = _msBDConnector.QueryExecutorScalar(command);
            // Бэтчдроппер БД, вытащить айди активного тестового бэтча измененного самым последним.
            BDManualDrippingPage manualDrippingPage = new BDManualDrippingPage();

            manualDrippingPage.ConfirmTestBatchId(tESTBATCH);
        }
        public void ThenTheTestWillBeDroppedInSamePlanshet(string nameoftest)
        {
            BDManualDrippingPage manualDrippingPage = new BDManualDrippingPage();

            IsTrue(manualDrippingPage.AssertNameOfDrippingTest(nameoftest), "Что-то пошло не так. Не найден тест в раскапывании.");
        }