Exemple #1
0
        public void Can_edit_backend_ip_regulation()
        {
            var form = _backendIpRegulationsPage.OpenNewBackendIpRegulationForm();
            var data = new BackendIpRegulationData
            {
                IpAddress        = TestDataGenerator.GetRandomIpAddress(),
                AdvancedSettings = false,
                Description      = TestDataGenerator.GetRandomStringWithSpecialSymbols(10)
            };
            var submittedBackendIpRegulationForm = form.Submit(data);

            Assert.AreEqual("IP Regulation has been successfully created", submittedBackendIpRegulationForm.ConfirmationMessage);

            submittedBackendIpRegulationForm.Close();
            var editForm = _backendIpRegulationsPage.OpenEditBackendIpRegulationForm(data.IpAddress);
            var editData = new EditBackendIpRegulationData
            {
                IpAddress   = TestDataGenerator.GetRandomIpAddress(),
                Description = TestDataGenerator.GetRandomStringWithSpecialSymbols(10)
            };

            editForm.ClearFieldsOnForm();
            var submittedBackendIpRegulationEditForm = editForm.Submit(editData);

            Assert.AreEqual("IP Regulation has been successfully updated", submittedBackendIpRegulationEditForm.ConfirmationMessage);
        }
Exemple #2
0
        public void Cannot_create_ip_regulation_with_invalid_ipv4()
        {
            var form = _backendIpRegulationsPage.OpenNewBackendIpRegulationForm();
            var data = new BackendIpRegulationData
            {
                IpAddress        = TestDataGenerator.GetRandomIpAddress() + TestDataGenerator.GetRandomStringWithSpecialSymbols(5),
                AdvancedSettings = false,
                Description      = TestDataGenerator.GetRandomStringWithSpecialSymbols(10)
            };
            var submittedBackendIpRegulationForm = form.Submit(data);

            Assert.AreEqual("IP address is invalid", submittedBackendIpRegulationForm.IpAddressValidation);
        }
Exemple #3
0
        public void Can_delete_backend_ip_regulation()
        {
            var form = _backendIpRegulationsPage.OpenNewBackendIpRegulationForm();
            var data = new BackendIpRegulationData
            {
                IpAddress        = TestDataGenerator.GetRandomIpAddress(),
                AdvancedSettings = false,
                Description      = TestDataGenerator.GetRandomStringWithSpecialSymbols(10)
            };
            var submittedBackendIpRegulationForm = form.Submit(data);

            Assert.AreEqual("IP Regulation has been successfully created", submittedBackendIpRegulationForm.ConfirmationMessage);

            submittedBackendIpRegulationForm.Close();

            _backendIpRegulationsPage.DeleteIpRegulation(data.IpAddress);

            Assert.True(_backendIpRegulationsPage.IsIpRegulationExists(data.IpAddress));
        }