Esempio n. 1
0
        public void Can_not_create_duplicate_FRl_by_name()
        {
            var frlDataEdited = TestDataGenerator.CreateFraudRiskLevelData(
                _frlData.Licensee,
                _frlData.Brand,
                (_ts.Milliseconds + 1000 * (_ts.Seconds + 60 * (_ts.Minutes + 60 * _ts.Hours))).ToString(),
                _frlData.FRLName,
                "Remarks where duplicate by name."
                );

            var _newFRLForm = _fraudManagerPage.OpenNewFraudRiskLevelForm();

            _newFRLForm.SetFraudRiskLevelFields(frlDataEdited);
            _newFRLForm.SubmitFraudRiskLevel();

            Assert.AreEqual("Fraud Risk Level name should be unique per brand.", _newFRLForm.ValidationMessage.Text);
        }
Esempio n. 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");
        }