Пример #1
0
        public void ThenIAssertThatTheCreatedAndModifiedDatepickersOnThePageAreReadonly(string entityName)
        {
            var entityOnEditPage = new GenericEntityEditPage(entityName, _contextConfiguration);

            Assert.True(WebElementUtils.IsReadonly(entityOnEditPage.CreateAtDatepickerField));
            Assert.True(WebElementUtils.IsReadonly(entityOnEditPage.ModifiedAtDatepickerField));
        }
Пример #2
0
        public void WhenINavigateToTheCreatePage(string entityName)
        {
            _entityName = entityName;
            var page = new GenericEntityPage(entityName, _contextConfiguration);

            page.Navigate();
            _createPage = page.ClickCreateButton();
        }
Пример #3
0
        public void WhenICreateAValidEntity(string validStr, string entityName)
        {
            bool isValid;

            switch (validStr)
            {
            case "valid":
                isValid = true;
                break;

            case "invalid":
                isValid = false;
                break;

            default:
                throw new Exception("Please specify whether a 'valid' or 'invalid' entity is required");
            }

            var page    = new GenericEntityEditPage(entityName, _contextConfiguration);
            var factory = new EntityDetailFactory(_contextConfiguration);

            factory.ApplyDetails(entityName, isValid);
            page.SubmitButton.Click();
        }