'@case: Project001
@description:
* Create Project
* Create Project Organisation
* Create Project Community
* Create Project Beneficiary
@TestDoc: https://docs.google.com/spreadsheet/ccc?key=0AmB3hMcgB-3idG1XNGhhRG9QWF81dUlKLXpJaFlCMFE
@Test Wiki: http://eden.sahanafoundation.org/wiki/DeveloperGuidelines/Testing'

def test_project001_create_project(self):

    print '\n'
    self.login(account='admin', nexturl='project/project/create')
    self.create('project_project', [('organisation_id', 'International    Federation    of    Red    Cross    and    Red    Crescent    Societies'), ('name', 'Community    Strengthening    through    Dancing'), ('comments', 'Host    National    Society')])
    if current.deployment_settings.get_project_mode_3w():
        elem = WebDriverWait(self.browser, 30).until((lambda driver: driver.find_element_by_id('rheader_tab_location')))
        elem.click()
        add_button = self.browser.find_element_by_id('show-add-btn')
        if add_button.is_displayed():
            add_button.click()
        self.create('project_location', [('location_id', 'Aileu    Vila')])
        time.sleep(2)
        add_button = self.browser.find_element_by_id('show-add-btn')
        if add_button.is_displayed():
            add_button.click()
        self.create('project_beneficiary', [('parameter_id', 'Teachers'), ('value', '100'), ('comments', 'Primary    Beneficiary')])
        time.sleep(2)
        add_button = self.browser.find_element_by_id('show-add-btn')
        if add_button.is_displayed():
            add_button.click()
        self.create('project_beneficiary', [('parameter_id', 'Pupils'), ('value', '1000'), ('comments', 'Secondary    Beneficiary')])
