<commit_before>﻿using System;
using NUnit.Framework;

using set.web.test.Shared;

namespace set.web.test.Interface
{
    [TestFixture]
    public class FormTests : BaseInterfaceTest
    {
        [Test]
        public void should_save_new_feedback_via_popup_form()
        {
            var homeUrl = string.Format("{0}{1}", BASE_URL, ACTION_HOME);

            GoTo(homeUrl);

            Browser.FindElementById("btnOpenFeedBack").Click();
            Browser.FindElementById("FeedbackMessage").SendKeys("test feedback");
            Browser.FindElementById("btnSaveFeedback").Click();

            Browser.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(5));

            Assert.IsFalse(Browser.FindElementById("modalFeedback").Displayed);

            CloseBrowser();
        }
    }
}<commit_msg>DomainObject save and new test, save test<commit_after>﻿using System;
using NUnit.Framework;

using set.web.test.Shared;

namespace set.web.test.Interface
{
    [TestFixture]
    public class FormTests : BaseInterfaceTest
    {
        [Test]
        public void should_save_new_feedback_via_popup_form()
        {
            var homeUrl = string.Format("{0}{1}", BASE_URL, ACTION_HOME);

            GoTo(homeUrl);

            Browser.FindElementById("btnOpenFeedBack").Click();
            Browser.FindElementById("FeedbackMessage").SendKeys("test feedback");
            Browser.FindElementById("btnSaveFeedback").Click();

            Browser.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(5));

            Assert.IsFalse(Browser.FindElementById("modalFeedback").Displayed);

            CloseBrowser();
        }

        [Test]
        public void domainobject_save_and_new_after_only_save_form()
        {
            LoginAsUser();

            var url = string.Format("{0}{1}", BASE_URL, ACTION_NEW_DOMAIN_OBJECT);
            var domainObjListUrl = string.Format("{0}{1}", BASE_URL, ACTION_LIST_DOMAIN_OBJECTS);

            GoTo(url);

            Browser.FindElementById("Name").SendKeys("test domain obj with save and new");
            Browser.FindElementById("btnSaveAndNew").Click();

            Assert.IsNotNull(Browser);
            Assert.AreEqual(Browser.Url, url);

            Browser.FindElementById("Name").SendKeys("test domain obj with only save");
            Browser.FindElementById("btnSave").Click();

            Assert.IsNotNull(Browser);
            Assert.AreEqual(Browser.Url, domainObjListUrl);

            CloseBrowser();
        }
    }
}
{'fraction_non_alphanumeric': 0.11905713144226927, 'fraction_numerical': 0.003995205753096284, 'mean_word_length': 2.687776141384389, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '402904', 'n_tokens_mistral': 713, 'n_tokens_neox': 679, 'n_words': 104}