text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ChangeListManager">
    <list default="true" id="c92cdb01-ca6b-46ab-a1f4-f3b8957ca89a" name="Default" comment="First task - prepared environment">
      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/test/test_add_group.py" afterPath="$PROJECT_DIR$/test/test_add_group.py" />
    </list>
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
      <file leaf-file-name="groups.feature" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/bdd/groups.feature">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="357">
              <caret line="21" column="39" lean-forward="false" selection-start-line="21" selection-start-column="39" selection-end-line="21" selection-end-column="39" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="group_steps.py" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/bdd/group_steps.py">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="272">
              <caret line="52" column="0" lean-forward="false" selection-start-line="52" selection-start-column="0" selection-end-line="62" selection-end-column="97" />
              <folding>
                <element signature="e#1#41#0" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="db.py" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/fixture/db.py">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="54">
              <caret line="13" column="8" lean-forward="false" selection-start-line="13" selection-start-column="8" selection-end-line="13" selection-end-column="8" />
              <folding>
                <element signature="e#0#22#0" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="group.py" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/fixture/group.py">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="224">
              <caret line="82" column="47" lean-forward="false" selection-start-line="82" selection-start-column="47" selection-end-line="82" selection-end-column="47" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="group_scenarios.py" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/bdd/group_scenarios.py">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="255">
              <caret line="15" column="0" lean-forward="true" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
              <folding>
                <element signature="e#1#32#0" expanded="true" />
              </folding>
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="test_add_group.py" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/test/test_add_group.py">
          <provider selected="true" editor-type-id="text-editor">
            <state relative-caret-position="102">
              <caret line="6" column="36" lean-forward="false" selection-start-line="6" selection-start-column="36" selection-end-line="6" selection-end-column="36" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="FileTemplateManagerImpl">
    <option name="RECENT_TEMPLATES">
      <list>
        <option value="Python Script" />
      </list>
    </option>
  </component>
  <component name="FindInProjectRecents">
    <findStrings>
      <find>wd \= self\.app\.wd\n            wd\.find_element_by_name\(\"firstname\"\)\.click\(\)\n            wd\.find_element_by_name\(\"firstname\"\)\.clear\(\)\n            wd\.find_element_by_name\(\"firstname\"\)\.send_keys\(contact\.firstname\)\n            wd\.find_element_by_name\(\"middlename\"\)\.click\(\)\n            wd\.find_element_by_name\(\"middlename\"\)\.clear\(\)\n            wd\.find_element_by_name\(\"middlename\"\)\.send_keys\(contact\.middlename\)\n            wd\.find_element_by_name\(\"lastname\"\)\.click\(\)\n            wd\.find_element_by_name\(\"lastname\"\)\.clear\(\)\n            wd\.find_element_by_name\(\"lastname\"\)\.send_keys\(contact\.lastname\)\n            wd\.find_element_by_name\(\"nickname\"\)\.click\(\)\n            wd\.find_element_by_name\(\"nickname\"\)\.clear\(\)</find>
      <find>t</find>
      <find>try</find>
      <find>,</find>
    </findStrings>
  </component>
  <component name="Git.Settings">
    <option name="ROOT_SYNC" value="DONT_SYNC" />
    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/application2.py" />
        <option value="$PROJECT_DIR$/test_add_group.py" />
        <option value="$PROJECT_DIR$/test/test_contact.py" />
        <option value="$PROJECT_DIR$/test/test_group.py" />
        <option value="$PROJECT_DIR$/test/temporary.py" />
        <option value="$PROJECT_DIR$/test/conftest.py" />
        <option value="$PROJECT_DIR$/test/test_details_group.py" />
        <option value="$PROJECT_DIR$/fixture/application2.py" />
        <option value="$PROJECT_DIR$/test/test_details_contact.py" />
        <option value="$PROJECT_DIR$/test/test_edit_group.py" />
        <option value="$PROJECT_DIR$/test/test_edit_contact.py" />
        <option value="$PROJECT_DIR$/fixture/session.py" />
        <option value="$PROJECT_DIR$/test/test_emails.py" />
        <option value="$PROJECT_DIR$/test/test_phones.py" />
        <option value="$PROJECT_DIR$/test/temp.py" />
        <option value="$PROJECT_DIR$/test/test_fields_from_main_page.py" />
        <option value="$PROJECT_DIR$/model/group.py" />
        <option value="$PROJECT_DIR$/others/files.py" />
        <option value="$PROJECT_DIR$/fixture/application.py" />
        <option value="$PROJECT_DIR$/data/add_group.py" />
        <option value="$PROJECT_DIR$/data/groups.py" />
        <option value="$PROJECT_DIR$/generator/group.py" />
        <option value="$PROJECT_DIR$/data/contacts.py" />
        <option value="$PROJECT_DIR$/generator/contact.py" />
        <option value="$PROJECT_DIR$/target.json" />
        <option value="$PROJECT_DIR$/test/test_db_matches_ui.py" />
        <option value="$PROJECT_DIR$/conftest.py" />
        <option value="$PROJECT_DIR$/data/groups.json" />
        <option value="$PROJECT_DIR$/data/test.json" />
        <option value="$PROJECT_DIR$/test/test_add_contact.py" />
        <option value="$PROJECT_DIR$/test/test_modify_group.py" />
        <option value="$PROJECT_DIR$/test/test_del_group.py" />
        <option value="$PROJECT_DIR$/check_db_connection.py" />
        <option value="$PROJECT_DIR$/fixture/orm.py" />
        <option value="$PROJECT_DIR$/data/todo" />
        <option value="$PROJECT_DIR$/fixture/group.py" />
        <option value="$PROJECT_DIR$/test/test_modify_contact.py" />
        <option value="$PROJECT_DIR$/test/test_del_contact.py" />
        <option value="$PROJECT_DIR$/model/contact.py" />
        <option value="$PROJECT_DIR$/fixture/contact.py" />
        <option value="$PROJECT_DIR$/fixture/db.py" />
        <option value="$PROJECT_DIR$/test/test_del_contact_from_group.py" />
        <option value="$PROJECT_DIR$/test/test_add_contact_to_group.py" />
        <option value="$PROJECT_DIR$/bdd/groups.feature" />
        <option value="$PROJECT_DIR$/bdd/group_scenarios.py" />
        <option value="$PROJECT_DIR$/bdd/group_steps.py" />
        <option value="$PROJECT_DIR$/bdd/contacts.feature" />
        <option value="$PROJECT_DIR$/bdd/contact_scenarios.py" />
        <option value="$PROJECT_DIR$/bdd/contact_steps.py" />
        <option value="$PROJECT_DIR$/requirments" />
        <option value="$PROJECT_DIR$/test/test_add_group.py" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="-8" />
    <option name="y" value="-8" />
    <option name="width" value="1936" />
    <option name="height" value="1056" />
  </component>
  <component name="ProjectLevelVcsManager">
    <ConfirmationsSetting value="1" id="Add" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
      <manualOrder />
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="Scope" />
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="python_training" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="python_training" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="python_training" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="python_training" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="test" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="python_training" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="python_training" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="test" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value=".cache" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scratches" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="settings.editor.selected.configurable" value="com.jetbrains.python.configuration.PyActiveSdkModuleConfigurable" />
    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
    <property name="SearchEverywhereHistoryKey" value="	FILE	file://C:/GitH/python_training/conftest.py" />
  </component>
  <component name="RecentsManager">
    <key name="MoveFile.RECENT_KEYS">
      <recent name="C:\GitH\python_training" />
      <recent name="C:\GitH\python_training\fixture" />
      <recent name="C:\GitH\python_training\test" />
      <recent name="C:\GitH\python_training\model" />
    </key>
  </component>
  <component name="RunDashboard">
    <option name="ruleStates">
      <list>
        <RuleState>
          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
        </RuleState>
        <RuleState>
          <option name="name" value="StatusDashboardGroupingRule" />
        </RuleState>
      </list>
    </option>
  </component>
  <component name="RunManager" selected="Python tests.py.test in test_add_group.py">
    <configuration default="false" name="py.test for group_scenarios.test_add_new_group" type="tests" factoryName="py.test" temporary="true" nameIsGenerated="true">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/bdd" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="python_training" />
      <option name="_new_keywords" value="""" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""group_scenarios.test_add_new_group"" />
      <option name="_new_targetType" value=""PYTHON"" />
      <method />
    </configuration>
    <configuration default="false" name="py.test for contact_scenarios.test_delete_contact" type="tests" factoryName="py.test" temporary="true" nameIsGenerated="true">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/bdd" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="python_training" />
      <option name="_new_keywords" value="""" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""contact_scenarios.test_delete_contact"" />
      <option name="_new_targetType" value=""PYTHON"" />
      <method />
    </configuration>
    <configuration default="false" name="py.test for contact_scenarios.test_modify_contact" type="tests" factoryName="py.test" temporary="true" nameIsGenerated="true">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/bdd" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="python_training" />
      <option name="_new_keywords" value="""" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""contact_scenarios.test_modify_contact"" />
      <option name="_new_targetType" value=""PYTHON"" />
      <method />
    </configuration>
    <configuration default="false" name="py.test in contact_scenarios.py" type="tests" factoryName="py.test" temporary="true" nameIsGenerated="true">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/bdd" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="python_training" />
      <option name="_new_keywords" value="""" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""$PROJECT_DIR$/bdd/contact_scenarios.py"" />
      <option name="_new_targetType" value=""PATH"" />
      <method />
    </configuration>
    <configuration default="false" name="py.test in test_add_group.py" type="tests" factoryName="py.test" temporary="true" nameIsGenerated="true">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/test" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="python_training" />
      <option name="_new_keywords" value="""" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""$PROJECT_DIR$/test/test_add_group.py"" />
      <option name="_new_targetType" value=""PATH"" />
      <method />
    </configuration>
    <configuration default="true" type="PythonConfigurationType" factoryName="Python">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs>
        <env name="PYTHONUNBUFFERED" value="1" />
      </envs>
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="python_training" />
      <option name="SCRIPT_NAME" value="" />
      <option name="PARAMETERS" value="" />
      <option name="SHOW_COMMAND_LINE" value="false" />
      <option name="EMULATE_TERMINAL" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="Tox" factoryName="Tox">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="python_training" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Doctests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="python_training" />
      <option name="SCRIPT_NAME" value="" />
      <option name="CLASS_NAME" value="" />
      <option name="METHOD_NAME" value="" />
      <option name="FOLDER_NAME" value="" />
      <option name="TEST_TYPE" value="TEST_SCRIPT" />
      <option name="PATTERN" value="" />
      <option name="USE_PATTERN" value="false" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="Unittests">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="python_training" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""."" />
      <option name="_new_targetType" value=""PATH"" />
      <method />
    </configuration>
    <configuration default="true" type="tests" factoryName="py.test">
      <option name="INTERPRETER_OPTIONS" value="" />
      <option name="PARENT_ENVS" value="true" />
      <envs />
      <option name="SDK_HOME" value="" />
      <option name="WORKING_DIRECTORY" value="" />
      <option name="IS_MODULE_SDK" value="false" />
      <option name="ADD_CONTENT_ROOTS" value="true" />
      <option name="ADD_SOURCE_ROOTS" value="true" />
      <module name="python_training" />
      <option name="_new_keywords" value="""" />
      <option name="_new_additionalArguments" value="""" />
      <option name="_new_target" value=""."" />
      <option name="_new_targetType" value=""PATH"" />
      <method />
    </configuration>
    <list size="5">
      <item index="0" class="java.lang.String" itemvalue="Python tests.py.test for group_scenarios.test_add_new_group" />
      <item index="1" class="java.lang.String" itemvalue="Python tests.py.test for contact_scenarios.test_delete_contact" />
      <item index="2" class="java.lang.String" itemvalue="Python tests.py.test for contact_scenarios.test_modify_contact" />
      <item index="3" class="java.lang.String" itemvalue="Python tests.py.test in contact_scenarios.py" />
      <item index="4" class="java.lang.String" itemvalue="Python tests.py.test in test_add_group.py" />
    </list>
    <recent_temporary>
      <list size="5">
        <item index="0" class="java.lang.String" itemvalue="Python tests.py.test in test_add_group.py" />
        <item index="1" class="java.lang.String" itemvalue="Python tests.py.test for group_scenarios.test_add_new_group" />
        <item index="2" class="java.lang.String" itemvalue="Python tests.py.test in contact_scenarios.py" />
        <item index="3" class="java.lang.String" itemvalue="Python tests.py.test for contact_scenarios.test_modify_contact" />
        <item index="4" class="java.lang.String" itemvalue="Python tests.py.test for contact_scenarios.test_delete_contact" />
      </list>
    </recent_temporary>
  </component>
  <component name="ShelveChangesManager" show_recycled="false">
    <option name="remove_strategy" value="false" />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="c92cdb01-ca6b-46ab-a1f4-f3b8957ca89a" name="Default" comment="" />
      <created>1492245817712</created>
      <option name="number" value="Default" />
      <option name="presentableId" value="Default" />
      <updated>1492245817712</updated>
    </task>
    <task id="LOCAL-00001" summary="First task - prepared environment">
      <created>1492628517041</created>
      <option name="number" value="00001" />
      <option name="presentableId" value="LOCAL-00001" />
      <option name="project" value="LOCAL" />
      <updated>1492628517041</updated>
    </task>
    <option name="localTasksCounter" value="2" />
    <servers />
  </component>
  <component name="TestHistory">
    <history-entry file="py_test_for_contact_scenarios_test_modify_contact - 2017.06.21 at 17h 44m 24s.xml">
      <configuration name="py.test for contact_scenarios.test_modify_contact" configurationId="tests" />
    </history-entry>
    <history-entry file="py_test_for_contact_scenarios_test_modify_contact - 2017.06.21 at 17h 44m 45s.xml">
      <configuration name="py.test for contact_scenarios.test_modify_contact" configurationId="tests" />
    </history-entry>
    <history-entry file="py_test_for_group_scenarios_test_add_new_group - 2017.06.21 at 19h 14m 25s.xml">
      <configuration name="py.test for group_scenarios.test_add_new_group" configurationId="tests" />
    </history-entry>
    <history-entry file="py_test_for_group_scenarios_test_add_new_group - 2017.06.21 at 19h 15m 02s.xml">
      <configuration name="py.test for group_scenarios.test_add_new_group" configurationId="tests" />
    </history-entry>
    <history-entry file="py_test_for_group_scenarios_test_add_new_group - 2017.06.21 at 19h 30m 44s.xml">
      <configuration name="py.test for group_scenarios.test_add_new_group" configurationId="tests" />
    </history-entry>
    <history-entry file="py_test_for_group_scenarios_test_add_new_group - 2017.06.22 at 10h 28m 26s.xml">
      <configuration name="py.test for group_scenarios.test_add_new_group" configurationId="tests" />
    </history-entry>
    <history-entry file="py_test_in_contact_scenarios_py - 2017.06.21 at 17h 44m 59s.xml">
      <configuration name="py.test in contact_scenarios.py" configurationId="tests" />
    </history-entry>
    <history-entry file="py_test_in_test_add_group_py - 2017.06.22 at 13h 07m 45s.xml">
      <configuration name="py.test in test_add_group.py" configurationId="tests" />
    </history-entry>
    <history-entry file="py_test_in_test_add_group_py - 2017.06.22 at 13h 39m 07s.xml">
      <configuration name="py.test in test_add_group.py" configurationId="tests" />
    </history-entry>
    <history-entry file="py_test_in_test_add_group_py - 2017.06.22 at 13h 56m 53s.xml">
      <configuration name="py.test in test_add_group.py" configurationId="tests" />
    </history-entry>
  </component>
  <component name="ToolWindowManager">
    <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
    <editor active="true" />
    <layout>
      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1796875" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.41077086" sideWeight="0.3203125" order="8" side_tool="true" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
      <window_info id="Python Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.41077086" sideWeight="0.6796875" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39915523" sideWeight="0.49166667" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Data View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Documentation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="FLOATING" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" x="100" y="100" width="1720" height="840" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="3" side_tool="false" content_ui="combo" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32760474" sideWeight="0.4874214" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
    </layout>
  </component>
  <component name="Vcs.Log.History.Properties">
    <option name="COLUMN_ORDER">
      <list>
        <option value="0" />
        <option value="2" />
        <option value="3" />
        <option value="1" />
      </list>
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="VcsManagerConfiguration">
    <MESSAGE value="First task - prepared environment" />
    <option name="LAST_COMMIT_MESSAGE" value="First task - prepared environment" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager>
      <option name="time" value="17" />
    </breakpoint-manager>
    <watches-manager />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/model/group.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="323">
          <caret line="19" column="9" lean-forward="false" selection-start-line="19" selection-start-column="9" selection-end-line="19" selection-end-column="9" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/others/files.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="153">
          <caret line="9" column="10" lean-forward="true" selection-start-line="9" selection-start-column="10" selection-end-line="9" selection-end-column="10" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/virtual/Lib/site-packages/selenium/webdriver/common/service.py" />
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36-32/Lib/site-packages/selenium/webdriver/common/service.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="312">
          <caret line="73" column="41" lean-forward="true" selection-start-line="73" selection-start-column="41" selection-end-line="73" selection-end-column="41" />
        </state>
      </provider>
    </entry>
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36-32/Lib/site-packages/_pytest/config.py" />
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36-32/Lib/site-packages/_pytest/vendored_packages/pluggy.py" />
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36-32/Lib/importlib/__init__.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="151">
          <caret line="125" column="0" lean-forward="false" selection-start-line="125" selection-start-column="0" selection-end-line="125" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/data/groups.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="17">
          <caret line="1" column="0" lean-forward="true" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/data/testcpnctact.json" />
    <entry file="file://$PROJECT_DIR$/data/testcontact.json">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/test_db_matches_ui.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="153">
          <caret line="9" column="0" lean-forward="false" selection-start-line="9" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/data/test.json">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="292">
          <caret line="27" column="24" lean-forward="true" selection-start-line="27" selection-start-column="24" selection-end-line="27" selection-end-column="24" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/data/groups.json">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="238">
          <caret line="14" column="3" lean-forward="true" selection-start-line="14" selection-start-column="3" selection-end-line="14" selection-end-column="3" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/test_details_contact.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="153">
          <caret line="9" column="27" lean-forward="true" selection-start-line="9" selection-start-column="27" selection-end-line="9" selection-end-column="27" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/data/contacts.json">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/target.json">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="170">
          <caret line="10" column="18" lean-forward="false" selection-start-line="10" selection-start-column="18" selection-end-line="10" selection-end-column="18" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/data/contacts.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="51">
          <caret line="3" column="12" lean-forward="true" selection-start-line="3" selection-start-column="12" selection-end-line="3" selection-end-column="12" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/fixture/session.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="102">
          <caret line="6" column="17" lean-forward="false" selection-start-line="6" selection-start-column="17" selection-end-line="6" selection-end-column="17" />
        </state>
      </provider>
    </entry>
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36-32/Lib/site-packages/pony/orm/dbapiprovider.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="151">
          <caret line="49" column="0" lean-forward="false" selection-start-line="49" selection-start-column="0" selection-end-line="49" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36-32/Lib/site-packages/pymysql/err.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="335">
          <caret line="106" column="0" lean-forward="false" selection-start-line="106" selection-start-column="0" selection-end-line="106" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36-32/Lib/site-packages/pymysql/converters.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="151">
          <caret line="19" column="0" lean-forward="false" selection-start-line="19" selection-start-column="0" selection-end-line="19" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/data/todo">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="17">
          <caret line="1" column="40" lean-forward="true" selection-start-line="1" selection-start-column="40" selection-end-line="1" selection-end-column="40" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/check_db_connection.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="102">
          <caret line="6" column="32" lean-forward="false" selection-start-line="6" selection-start-column="32" selection-end-line="6" selection-end-column="32" />
        </state>
      </provider>
    </entry>
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36-32/Lib/site-packages/mysql/connector/connection.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="151">
          <caret line="639" column="0" lean-forward="false" selection-start-line="639" selection-start-column="0" selection-end-line="639" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/generator/group.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="-82">
          <caret line="13" column="0" lean-forward="true" selection-start-line="13" selection-start-column="0" selection-end-line="13" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/test_modify_contact.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="187">
          <caret line="11" column="49" lean-forward="false" selection-start-line="11" selection-start-column="49" selection-end-line="11" selection-end-column="49" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/generator/contact.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="274">
          <caret line="25" column="53" lean-forward="false" selection-start-line="25" selection-start-column="53" selection-end-line="25" selection-end-column="53" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/test_del_contact_from_group.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="425">
          <caret line="25" column="0" lean-forward="false" selection-start-line="25" selection-start-column="0" selection-end-line="25" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/test_del_contact.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="75">
          <caret line="6" column="27" lean-forward="false" selection-start-line="6" selection-start-column="27" selection-end-line="6" selection-end-column="27" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/fixture/contact.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="17">
          <caret line="221" column="8" lean-forward="false" selection-start-line="221" selection-start-column="8" selection-end-line="221" selection-end-column="8" />
          <folding>
            <element signature="e#0#33#0" expanded="false" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/test_add_contact_to_group.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="340">
          <caret line="20" column="0" lean-forward="false" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$USER_HOME$/AppData/Local/Programs/Python/Python36-32/Lib/site-packages/pytest_bdd/scenario.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="156">
          <caret line="302" column="0" lean-forward="false" selection-start-line="302" selection-start-column="0" selection-end-line="302" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/test_del_group.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="136">
          <caret line="8" column="42" lean-forward="true" selection-start-line="8" selection-start-column="42" selection-end-line="8" selection-end-column="42" />
          <folding>
            <element signature="e#0#29#0" expanded="false" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/fixture/application.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="19">
          <caret line="21" column="13" lean-forward="false" selection-start-line="21" selection-start-column="13" selection-end-line="21" selection-end-column="13" />
          <folding>
            <element signature="e#60#118#0" expanded="false" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/test_modify_group.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="102">
          <caret line="7" column="0" lean-forward="true" selection-start-line="7" selection-start-column="0" selection-end-line="7" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/fixture/orm.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="156">
          <caret line="50" column="8" lean-forward="false" selection-start-line="50" selection-start-column="8" selection-end-line="50" selection-end-column="8" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/fixture/db.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="54">
          <caret line="13" column="8" lean-forward="false" selection-start-line="13" selection-start-column="8" selection-end-line="13" selection-end-column="8" />
          <folding>
            <element signature="e#0#22#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/conftest.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="156">
          <caret line="32" column="0" lean-forward="false" selection-start-line="32" selection-start-column="0" selection-end-line="32" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/model/contact.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="301">
          <caret line="31" column="0" lean-forward="false" selection-start-line="31" selection-start-column="0" selection-end-line="31" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/bdd/contacts.feature">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="306">
          <caret line="18" column="26" lean-forward="true" selection-start-line="18" selection-start-column="26" selection-end-line="18" selection-end-column="26" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/bdd/group_steps.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="272">
          <caret line="52" column="0" lean-forward="false" selection-start-line="52" selection-start-column="0" selection-end-line="62" selection-end-column="97" />
          <folding>
            <element signature="e#1#41#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/bdd/contact_steps.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="256">
          <caret line="52" column="51" lean-forward="true" selection-start-line="52" selection-start-column="51" selection-end-line="52" selection-end-column="51" />
          <folding>
            <element signature="e#1#34#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/bdd/contact_scenarios.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="238">
          <caret line="14" column="8" lean-forward="true" selection-start-line="14" selection-start-column="8" selection-end-line="14" selection-end-column="8" />
          <folding>
            <element signature="e#1#32#0" expanded="false" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/test_add_contact.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="170">
          <caret line="10" column="8" lean-forward="false" selection-start-line="10" selection-start-column="8" selection-end-line="10" selection-end-column="105" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/bdd/groups.feature">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="357">
          <caret line="21" column="39" lean-forward="false" selection-start-line="21" selection-start-column="39" selection-end-line="21" selection-end-column="39" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/fixture/group.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="224">
          <caret line="82" column="47" lean-forward="false" selection-start-line="82" selection-start-column="47" selection-end-line="82" selection-end-column="47" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/requirements">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="102">
          <caret line="6" column="25" lean-forward="true" selection-start-line="6" selection-start-column="25" selection-end-line="6" selection-end-column="25" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/results.xml.txt">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/results.xml">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="0">
          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/bdd/group_scenarios.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="255">
          <caret line="15" column="0" lean-forward="true" selection-start-line="15" selection-start-column="0" selection-end-line="15" selection-end-column="0" />
          <folding>
            <element signature="e#1#32#0" expanded="true" />
          </folding>
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/test/test_add_group.py">
      <provider selected="true" editor-type-id="text-editor">
        <state relative-caret-position="102">
          <caret line="6" column="36" lean-forward="false" selection-start-line="6" selection-start-column="36" selection-end-line="6" selection-end-column="36" />
          <folding />
        </state>
      </provider>
    </entry>
  </component>
</project>


text:
///
/// LiveEditor jQuery plugin
///
/// Copyright 2013 Trustfall AB
/// Author Mattias Åslund
/// Licensed according to the MIT-license. Please read the file LICENSE for details.
///
;//Protection against other malformed scripts that can interfere
(function ($, window, document, undefined) {
    var LIVEEDITOR_OPTIONS_STRING = 'liveeditor-options';
    var LIVEEDITOR_OLD_STRING = 'liveeditor-old';
    var LIVEEDITOR_ENABLED_STRING = 'liveeditor-enabled';
    var LIVEEDITOR_ORIGINAL_VALUE_STRING = 'liveeditor-original-value';
    var LIVEEDITOR_ORIGINAL_HTML_STRING = 'liveeditor-original-html';

    var defaultOptions = {

        fillControls: false,

        changedCss: 'liveeditor-changed',
        editingCss: null,
        editorCss: null,

        combobox: {
            css: 'combo'
        },

        checkbox: {
            css: 'checkbox',
            checked: {
                value: 'true',
                html: 'X'
            },
            unchecked: {
                value: 'false',
                html: ''
            }
        },

        ///
        /// Container events
        ///

        onGetValue: null,

        onSetValue: null,

        /// Called (after any edit has been closed) when the container has changed its value.
        onChanged: null,

        /// Called when an editor is being created to allow developers to implement their own editors for certain containers.
        onEditorCreating: null,

        /// Called to get valid options for a combobox Editor.
        /// this event must be overloaded if the comboboxes shall have any options.
        /// Return a string with <option /> elements to display.
        onEditorOptions: function (container) { return '<option value=""></option>'; },

        /// Called after the editor is visible.
        onEditorOpened: null,

        /// Called after the editor receives focus.
        onEditorFocused: null,

        /// Called after the editor has been closed.
        onEditorClosed: null,
    };

    var EDITOR_MARGIN = 5;//TODO: WHY do we need to remove this margin to make the input/select fit its parent container?

    ///
    /// Public LiveEditor Commands
    ///

    $.liveeditor = {

        ///
        /// Enables editing for an unregistered or previously disabled container.
        ///
        isEnabled: function (container) {

            return isEnabled(container);
        },

        ///
        /// Enables editing for an unregistered or previously disabled container.
        ///
        enable: function (container) {

            return enable(container);
        },

        ///
        /// Disables editing for a registered container.
        ///
        disable: function (container) {

            return disable(container);
        },

        ///
        /// Forces the open editor to save its changes back to its container and close.
        /// Call this method before saving to make sure all changes have been committed.
        ///
        closeEditor: function (selector) {

            selector.each(function () { commitEditor(this); });
            return selector;

        },

        ///
        /// Gets the liveeditor values of all fields in a selector
        ///
        get: function (selector) {

            var values = [];
            selector.each(function () {
                var container = $(this);
                var editor = container.children(0);
                if (!editor.length || editor.data(LIVEEDITOR_ORIGINAL_VALUE_STRING) == null) {
                    //No editor
                    values.push(getContainerValue(container));
                }
                else {
                    //Editor open
                    values.push(getEditorValue(editor));
                }
            });
            return values.length === 1 ? values[0] : values;
        },

        ///
        /// Serializes all liveeditor fields in a selector to a postable string, just like $.serialize() works on forms.
        /// Any control not registered to liveeditor are ignored. Liveeditor-fields without data-name or name attribute are also ignored.
        /// Unlike $.serialize() this function includes unchecked checkboxes for now. This may change in the future.
        /// For the special case of serializing a single row in a liveeditor table a second selector with headers can be included,
        /// in which case the data-name or name will be taken from the column header if it is not found on the field itself.
        ///
        serialize: function (selector, namesSelector) {

            var result = [];
            selector
                .filter(function () {
                    var that = $(this);
                    return (namesSelector || that.is('[data-name]') || that.is('[name]'))
                        && that.data(LIVEEDITOR_OPTIONS_STRING);
                })
                .each(function () {
                    var that = $(this);
                    var name = that.attr('data-name') || that.attr('name') || namesSelector.eq(that.index()).attr('data-name') || namesSelector.eq(that.index()).attr('name');
                    result.push(
                        encodeURIComponent(name)
                        + '='
                        + encodeURIComponent(getContainerValue(that))
                        );
                });
            return result.join('&');
        },

        serializeRow: function (row, header, rowIndex) {
            var thisRow = $(row).get(0);
            var result = [];
            $('*', row).filter(function () { return $(this).data(LIVEEDITOR_OPTIONS_STRING); })
                .each(function () {

                    var indexes = getIndexes(row, this);
                    var name = getName(header, indexes);
                    if (name !== undefined) {
                        if (rowIndex !== undefined) {
                            name = name.replace("[]", "[" + rowIndex + "]");
                        }
                        var value = getContainerValue($(this));
                        result.push(name + '=' + encodeURIComponent(value));
                    }
                    else {
                        var msg = 'FAILED to get data-name for row editor at index: ' + indexes.join(',') + '!';
                        if (console) { console.log(msg) }
                        else { alert(msg); }
                    }
                });
            return result.join('&');
        },

        getIndexes: function (parentElement, childElement) {
            return getIndexes(parentElement, childElement);
        },
        followIndexes: function (parentElement, indexes) {
            return followIndexes(parentElement, indexes);
        },
        getName: function(parentElement, indexes){
            return getName(parentElement, indexes);
        },

        ///
        /// Changes the value of a container as if the user had edited it with the editor.
        ///
        set: function (selector, value, html) {

            selector.each(function () {
                var container = $(this);
                var originalValue = getContainerValue(container);
                if (container.data(LIVEEDITOR_OLD_STRING) == null) {
                    container.data(LIVEEDITOR_OLD_STRING, originalValue);

                }
                if (updateContainer(container, value, html)) {
                    var oldValue = container.data(LIVEEDITOR_OLD_STRING); //Reload the "old" value in case onSetValue() event reset the control

                    if (value !== oldValue) {
                        containerChanged(container);
                    }
                }
            });
            return selector;
        },

        ///
        /// Resets the container to consider its current value the unchanged state.
        /// Call this method for all containers after saving to setup new change-tracking without reloading the entire page.
        ///
        reset: function (selector) {

            selector.each(function () {
                var container = $(this);
                var oldValue = container.data(LIVEEDITOR_OLD_STRING);
                if (oldValue != null) {

                    var newValue = getContainerValue(container);

                    if (newValue !== oldValue) {
                        container.data(LIVEEDITOR_OLD_STRING, newValue);

                        var options = container.data(LIVEEDITOR_OPTIONS_STRING);
                        if (options.changedCss)
                            container.removeClass(options.changedCss);
                    }
                }
                else{

                }
            });
            return selector;
        }
    };

    ///
    /// Private Event Listeners
    ///

    //Display the editor when the user hovers over the container
    function container_mouseenter() {

        displayEditor($(this));
    }

    function container_mouseleave() {

        cancelEditor(this);
    }

    //Make the editor "sticky" when focused so it doesn't disappear when the mouse is moved from the container
    function editor_focus() {

        var editor = $(this)
            .unbind('focus', editor_focus)
            .select();
        var container = editor.parent()
            .unbind('mouseleave', container_mouseleave);

        var options = container.data(LIVEEDITOR_OPTIONS_STRING);
        if (container[0] === options._focusedContainer) {

            return true; //Since the current containers editor is focused there is no other editor to close
        }

        if (options._focusedContainer) {

            if (!commitEditor(options._focusedContainer))
                return false;
        }

        options._focusedContainer = container[0];
        editor.keydown(editor_keydown);
        if ($.isFunction(options.onEditorFocused)) {

            options.onEditorFocused.call(container, editor);
        }
        return true;
    }

    //Handle editor TAB and ESC keys
    function editor_keydown(e) {
        var keyCode = e.keyCode || e.which;
        if (keyCode == 13) {        // Enter
            e.preventDefault();
            var container = $(this).parent();
            commitEditor(container);
        }
        else if (keyCode == 27) {       // ESC
            e.preventDefault();
            var container = $(this).parent();
            cancelEditor(container);
        }
        else if (keyCode == 9) {    //TAB
            e.preventDefault();
            var container = $(this).parent();
            var options = container.data(LIVEEDITOR_OPTIONS_STRING);

            //Close the current editor
            commitEditor(container);

            //Find the next element in the initialized selector

            var elementList = e.shiftKey ? $(options._selector.get().reverse()) : options._selector;
            var nextContainer = null;
            var found = false;
            do {
                elementList.each(function () {
                    if (found && isEnabled($(this))) {
                        //This is the next element in the selector
                        nextContainer = $(this);
                        return false;//Breaks out of the .each() statement
                    }
                    else if (this === container[0]) {
                        //This is the current element in the selector
                        if(found){
                            //This is the second time we find this element, so we seem to be in an
                            // endless loop looking for a control to step to. Abort!
                            found = false;
                            return false;//Breaks out of the .each() statement
                        }
                        else{
                            found = true;//Flag the next enabled container as a target
                        }
                    }
                });
                if(!found) {
                    //Although we looped twice we still didn't find a control to step to, so abort

                    break; //Breaks out of the do/while() statement
                }
            }
            while(nextContainer == null);
            //Open the new editor
            if(nextContainer !== null) {
                displayEditor(nextContainer).focus();
            }
        }
    }

    ///
    /// Private methods
    ///
    function isEnabled(container) {
        return container.data(LIVEEDITOR_ENABLED_STRING) === true;
    }
    function enable(container) {
        if (!isEnabled(container)) {
            container
                .data(LIVEEDITOR_ENABLED_STRING, true)
                .mouseenter(container_mouseenter);
        }
        return container;
    }
    function disable(container) {
        if (isEnabled(container)) {
            container
                .data(LIVEEDITOR_ENABLED_STRING, false)
                .unbind('mouseenter', container_mouseenter);
        }
        return container;
    }

    ///
    /// Method called to get the current value of a container before displaying its editor.
    /// Implement the events onGetValue() and onSetValue() if the container does not store its value in LiveEditors default way.
    /// Returns the containers current value as a string.
    ///
    function getContainerValue (container) {
        var value;
        var options = container.data(LIVEEDITOR_OPTIONS_STRING);
        if ($.isFunction(options.onGetValue)) {

            value = options.onGetValue.call(container);
        }
        if (value === undefined) {

            value = container.hasClass(options.combobox.css) || container.hasClass(options.checkbox.css)
                ? (container.attr('value') || '')
                : container.text();
        }

        return value;
    }

    ///
    /// Method called to set the new value of a container. If the container has an open editor it is closed by this commmand.
    /// Implement the events onGetValue() and onSetValue() if the container does not store its value in LiveEditors default way.
    /// Returns true if the value was written successfully and false if the operation was cancelled.
    ///
    function updateContainer(container, newValue, newHtml, isCancel) {

        if (isCancel === undefined)
            isCancel = false;
        var success;

        //Let the user override the setting of the value to the container if he likes
        var options = container.data(LIVEEDITOR_OPTIONS_STRING);
        if ($.isFunction(options.onSetValue)) {
            var success = options.onSetValue.call(container, newValue, newHtml, isCancel);
            if (success === false)
                return false;
        }

        if (success === undefined) {
            //Set the new value to the container

            if (container.hasClass(options.combobox.css)) {
                container.attr('value', newValue);
            }
            else if (container.hasClass(options.checkbox.css)) {
                container.attr('value', newValue);
                if (newHtml == null)
                    newHtml = (newValue == options.checkbox.checked.value)
                        ? options.checkbox.checked.html
                        : options.checkbox.unchecked.html;
            }
            if (newHtml == null)
                newHtml = newValue;
            container.html(newHtml);
        }

        container
            .unbind('mouseleave', container_mouseleave)
            .removeClass(options.editingCss);

        if (container[0] === options._focusedContainer) {

            options._focusedContainer = null;
        }

        //Update the containers change-status
        var oldValue = container.data(LIVEEDITOR_OLD_STRING);

        if (newValue != oldValue) {

            if (options.changedCss)
                container.addClass(options.changedCss);
        }
        else {

            if (options.changedCss)
                container.removeClass(options.changedCss);
        }
        return true;
    }

    function containerChanged (container) {
        var options = container.data(LIVEEDITOR_OPTIONS_STRING);
        if ($.isFunction(options.onChanged)) {

            options.onChanged.call(container);
        }
    }

    ///
    /// Method called to get the index tree between a parent and nested child element.
    /// This method is meant to be used together with getName().
    ///
    function getIndexes(thisRow, field) {
        var walker = $(field);
        var indexes = [];
        while (walker.get(0) != thisRow) {
            indexes.push(walker.index());
            walker = walker.parent();
            if (walker.index() === -1)
                throw 'thisRow is not a parent of field!';
        }
        indexes = indexes.reverse();
        return indexes;
    };

    ///
    /// Method follows the indexes created by getIndexes() and returns a child node below the header
    ///
    function followIndexes(header, indexes) {
        var walker = header;
        for (var i in indexes) {
            walker = walker.children().eq(indexes[i]);
        }
        return walker;
    };

    ///
    /// Method called to get the data-name value for a nested child of a header element
    /// This method is meant to be used together with getIndexes().
    ///
    function getName(header, indexes) {
        var walker = followIndexes(header, indexes);
        var name = walker.attr('data-name') || walker.attr('name');
        return name;
    };

    ///
    /// Private Editor methods
    ///

    //Display editor when mouse hovers over an editable container
    function displayEditor(container) {

        var options = container.data(LIVEEDITOR_OPTIONS_STRING);

        var editor = container.children(0);
        if (editor.data(LIVEEDITOR_ORIGINAL_VALUE_STRING) != null) {

            return editor; //Already an editor in this container
        }

        var currentValue = getContainerValue(container);
        if (container.data(LIVEEDITOR_OLD_STRING) == null) {
            container.data(LIVEEDITOR_OLD_STRING, currentValue);

        }

        var editor = createEditor(container, currentValue);
        editor.focus(editor_focus);
        editor.data(LIVEEDITOR_ORIGINAL_HTML_STRING, container.html());
        container
            .html(editor)
            .mouseleave(container_mouseleave)
            .addClass(options.editingCss);

        if ($.isFunction(options.onEditorOpened)) {

            options.onEditorOpened.call(container, editor);
        }

        return editor;
    }

    function createEditor(container, value) {
        var editor;
        var options = container.data(LIVEEDITOR_OPTIONS_STRING);

        var event = options.onEditorCreating;
        if (event) {
            editor = event(container, value);
        }

        if (!editor) {
            if (container.hasClass(options.combobox.css)) {
                editor = $('<select>').width(container.width() - EDITOR_MARGIN);
                var select_options = options.onEditorOptions.call(container);
                switch ($.type(select_options)) {
                    case "string": editor.append($(select_options)); break;
                    default:

                        break;
                }
                $('option[value="' + value + '"]', editor).prop('selected', true);
            } else if (container.hasClass(options.checkbox.css))
                editor = $('<input type="checkbox"/>').prop('checked', (value == options.checkbox.checked.value));
            else {
                editor = $('<input type="text"/>').width(container.width() - EDITOR_MARGIN).val(value);
            }
        }

        editor.data(LIVEEDITOR_ORIGINAL_VALUE_STRING, value);
        if (options.editorCss) {
            editor.addClass(options.editorCss);
        }

        return editor;
    }

    //Restore "label" in the container with the new value from the editor
    function commitEditor(obj) {

        var container = $(obj);
        var editor = container.children(0);
        if (!editor.length || editor.data(LIVEEDITOR_ORIGINAL_VALUE_STRING) == null) {
            return true; //No editor to hide
        }
        var originalValue = editor.data(LIVEEDITOR_ORIGINAL_VALUE_STRING);
        var newValue = getEditorValue(editor);
        var newHtml = getEditorHtml(editor);
        if (!updateContainer(container, newValue, newHtml)) {
            return false;
        }
        var options = container.data(LIVEEDITOR_OPTIONS_STRING);
        if (originalValue != newValue) {
            containerChanged(container);
        }
        //Throw the hidden event
        if ($.isFunction(options.onEditorClosed)) {

            options.onEditorClosed.call(container);
        }
        return true;
    }

    //Restore "label" in the container with the original value from the editor
    function cancelEditor(obj) {

        var container = $(obj);
        var editor = container.children(0);
        if (!editor.length || editor.data(LIVEEDITOR_ORIGINAL_VALUE_STRING) == null) {
            return true; //No editor to hide
        }
        var originalValue = editor.data(LIVEEDITOR_ORIGINAL_VALUE_STRING);
        var originalHtml = editor.data(LIVEEDITOR_ORIGINAL_HTML_STRING);
        if (!updateContainer(container, originalValue, originalHtml, true)) {
            return false;
        }
        var options = container.data(LIVEEDITOR_OPTIONS_STRING);
        //Throw the hidden event
        if ($.isFunction(options.onEditorClosed)) {

            options.onEditorClosed.call(container);
        }
        return true;
    }

    ///
    /// Method to get the current value from the editor.
    /// Returns the editors value, which MAY differ from its displayed text (for checkboxes/comboboxes for instance).
    ///
    function getEditorValue(editor) {

        var value;
        var container = editor.parent();
        var options = container.data(LIVEEDITOR_OPTIONS_STRING);

        if ($.isFunction(options.onEditorGetValue)) {

            value = options.onEditorGetValue.call(editor);
        }

        if (value === undefined) {

            if (editor.is(':checkbox'))
                value = (editor.prop('checked')
                    ? options.checkbox.checked.value
                    : options.checkbox.unchecked.value);
            else if (editor.is('select'))
                value = $('option:selected', editor).val();
            else
                value = editor.val();
        }

        return value;
    }

    ///
    /// Method to get the current display text from the editor
    /// Returns the displayed text in the editor, which MAY differ from its value (for checkboxes/comboboxes for instance).
    ///
    function getEditorHtml (editor) {

        var html;
        var container = editor.parent();
        var options = container.data(LIVEEDITOR_OPTIONS_STRING);

        if ($.isFunction(options.onEditorGetValue)) {

            html = options.onEditorGetHtml.call(editor);
        }

        if (html === undefined) {

			if (editor.is('select'))
				html = $(':selected', editor).text();
			else
				html = null;
		}

        return html;
    }

    //called on the native object directly, wrap with $(container) if needed.
    function initializeObject(container, options) {
        //assign the options to the object instance.
        var $container = $(container);
        $container.data(LIVEEDITOR_OPTIONS_STRING, options);

        if (options.fillControls) {
            //Initialize the controls with the html that corresponds to their values
            if ($container.hasClass(options.combobox.css)) {
                var value = getContainerValue($container);
                $container.data(LIVEEDITOR_OLD_STRING, value);

                var select_options = options.onEditorOptions.call(container);
                switch ($.type(select_options)) {
                    case "string":
                        var option = $('<select>').append(select_options).find('option[value="' + value + '"]');
                        var html = option.html();
                        updateContainer($container, value, html, true);
                        break;
                    default:

                        break;
                }
            }
            else if ($container.hasClass(options.checkbox.css)) {
                var value = getContainerValue($container);
                $container.data(LIVEEDITOR_OLD_STRING, value);
                updateContainer($container, value, null, true);
            }
        }

        //do other initialization tasks on the individual item here...
    }

    ///
    /// LiveEditor Initiator
    /// Use this method to unobtrusively initialize liveeditor for a group of containers.
    /// For example: $('table tbody tr td.editable').liveeditor();
    ///

    $.fn.liveeditor = function (options) {

        //Build options for the new instance
        var mergedOptions = $.extend({}, defaultOptions, options)
        //This is just an internal state-variable, so DON'T expose it in defaultOptions!
        mergedOptions._focusedContainer = null;
        mergedOptions._selector = this;

        //Initialize all objects in the selection
        this.each(function () {
            initializeObject(this, mergedOptions);
        });
        //Enable all objects in the selection

        $.liveeditor.enable(this);

        //TODO: Consider iterating all items in the selector and updating their html if they are checkboxes or comboboxes, to make sure the server generated code isn't diffrent from client side
        //TODO: $('.combo,.checkbox', this).each(function(){ updateContainer(this, this.attr(value)); });

        return this;
    }

}(jQuery, window, document));

redpajama_set_name: RedPajamaGithub