Пример #1
0
        public void Can_activate_deactivate_FRL()
        {
            //Deactivate FRL
            var _confirmFRLModal = _fraudManagerPage.DeactivateFRL(_frlData);

            Assert.AreEqual("Fraud Risk Level has been successfully deactivated.", _confirmFRLModal.SuccessAlert.Text);
            //Close modal
            _confirmFRLModal.CloseConfirmationModal();

            Assert.AreEqual("Inactive", _fraudManagerPage.GetFRLStatus(_frlData));

            _fraudManagerPage.CancelActivationFRL(_frlData);
            Assert.AreEqual("Inactive", _fraudManagerPage.GetFRLStatus(_frlData));

            //Activate FRL
            _confirmFRLModal = _fraudManagerPage.ActivateFRL(_frlData);
            Assert.AreEqual("Fraud Risk Level has been successfully activated.", _confirmFRLModal.SuccessAlert.Text);

            //Close modal
            _confirmFRLModal.CloseConfirmationModal();
            Assert.AreEqual("Active", _fraudManagerPage.GetFRLStatus(_frlData));
        }
Пример #2
0
        public override void BeforeAll()
        {
            base.BeforeAll();

            _dashboardPage = _driver.LoginToAdminWebsiteAsSuperAdmin();

            FRLCode = (_ts.Milliseconds + 1000 * (_ts.Seconds + 60 * (_ts.Minutes + 60 * _ts.Hours))).ToString();
            FRLName = Guid.NewGuid().ToString();

            //generate fraud risk level form data
            _frlData = TestDataGenerator.CreateFraudRiskLevelData(
                DefaultLicensee,
                DefaultBrand,
                FRLCode,
                FRLName,
                Remarks
                );

            _fraudManagerPage = _dashboardPage.Menu.OpenFraudManager();
            var _newFRLform = _fraudManagerPage.OpenNewFraudRiskLevelForm();

            _newFRLform.SetFraudRiskLevelFields(_frlData);

            var viewFRLForm = _newFRLform.SubmitFraudRiskLevel();

            Assert.AreEqual("The Fraud Risk Level has been successfully created", viewFRLForm.SuccessAlert.Text);
            viewFRLForm.CloseTab("View Fraud Risk Level");

            //Activate FRL
            var _confirmFRLModal = _fraudManagerPage.ActivateFRL(_frlData);

            //Close modal
            _confirmFRLModal.CloseConfirmationModal();

            viewFRLForm.CloseTab("Fraud Manager");
        }