def test_private_subproject_contributor_access(self):
        page = helpers.get_new_subproject()
        user = helpers.create_user()

        page.add_contributor(user)

        self._test_can_access(page, user)
    def test_private_subproject_contributor_access(self):
        page = helpers.get_new_subproject()
        user = helpers.create_user()

        page.add_contributor(user)

        self._test_can_access(page, user)
Ejemplo n.º 3
0
    def test_private_subproject_title_change_contributor(self):
        page = helpers.get_new_subproject()

        page.title = 'changed'

        page.reload()

        self.assertEqual(page.title, 'changed')

        page.close()
Ejemplo n.º 4
0
    def test_public_subproject_title_anonymous(self):
        page = helpers.get_new_subproject()
        page.public = True

        _url = page.driver.current_url

        page.log_out()
        page.driver.get(_url)

        page = ProjectPage(driver=page.driver)

        self._test_title(page, can_modify=False)
Ejemplo n.º 5
0
    def test_public_subproject_title_change_anonymous(self):
        page = helpers.get_new_subproject()
        page.public = True
        _url = page.driver.current_url
        page.log_out()

        page.driver.get(_url)

        with self.assertRaises(NoSuchElementException):
            page.title = 'changed'

        page.close()
Ejemplo n.º 6
0
    def test_public_subproject_title_non_contributor(self):
        page = helpers.get_new_subproject()
        page.public = True

        _url = page.driver.current_url
        page.close()

        page = LoginPage().log_in(user=helpers.create_user())
        page.driver.get(_url)

        page = ProjectPage(driver=page.driver)

        self._test_title(page, can_modify=False)
Ejemplo n.º 7
0
    def test_public_subproject_title_change_non_contributor(self):
        page = helpers.get_new_subproject()
        page.public = True
        _url = page.driver.current_url
        page.log_out()
        page.close()

        page = LoginPage()
        page.log_in(helpers.create_user())

        page.driver.get(_url)
        page = ProjectPage(driver=page.driver)

        with self.assertRaises(NoSuchElementException):
            page.title = 'changed'

        page.close()
    def test_private_subproject_anonymous_access(self):
        page = helpers.get_new_subproject()

        self._test_can_access(page, can_access=False)
 def test_subproject_add_contributors_access(self):
     self._test_add_contributor_access(helpers.get_new_subproject())
 def test_subproject_add_contributors_listed(self):
     self._test_add_contributor_listed(helpers.get_new_subproject())
    def test_public_subproject_anonymous_access(self):
        page = helpers.get_new_subproject()
        page.public = True

        self._test_can_access(page)
 def test_subproject_add_contributors_listed(self):
     self._test_add_contributor_listed(helpers.get_new_subproject())
Ejemplo n.º 13
0
 def test_public_subproject_title_contributor(self):
     page = helpers.get_new_subproject()
     page.public = True
     self._test_title(page, can_modify=True)
Ejemplo n.º 14
0
 def test_private_subproject_title_contributor(self):
     self._test_title(
         page=helpers.get_new_subproject(),
         can_modify=True
     )
    def test_public_subproject_non_contributor_access(self):
        page = helpers.get_new_subproject()
        user = helpers.create_user()
        page.public = True

        self._test_can_access(page, user)
    def test_private_subproject_anonymous_access(self):
        page = helpers.get_new_subproject()

        self._test_can_access(page, can_access=False)
    def test_public_subproject_anonymous_access(self):
        page = helpers.get_new_subproject()
        page.public = True

        self._test_can_access(page)
    def test_public_subproject_non_contributor_access(self):
        page = helpers.get_new_subproject()
        user = helpers.create_user()
        page.public = True

        self._test_can_access(page, user)
 def test_subproject_add_contributors_access(self):
     self._test_add_contributor_access(helpers.get_new_subproject())
Ejemplo n.º 20
0
    def test_subproject_key_creation(self):
        page = helpers.get_new_subproject()
        key = page.settings.add_api_key()
        page.close()

        self.assertIsInstance(key, ApiKey)