test_create_organization.py 1.0 KB

123456789101112131415161718192021222324
  1. from django.conf import settings
  2. from sentry.testutils import AcceptanceTestCase
  3. class CreateOrganizationTest(AcceptanceTestCase):
  4. def setUp(self):
  5. super().setUp()
  6. self.user = self.create_user("foo@example.com")
  7. self.login_as(self.user)
  8. def test_simple(self):
  9. settings.PRIVACY_URL = "https://sentry.io/privacy/"
  10. settings.TERMS_URL = "https://sentry.io/terms/"
  11. self.browser.get("/organizations/new/")
  12. assert self.browser.element_exists('input[name="name"]')
  13. assert self.browser.element_exists('input[name="agreeTerms"]')
  14. self.browser.snapshot(name="create organization")
  15. self.browser.element('input[name="name"]').send_keys("new org")
  16. self.browser.element('input[name="agreeTerms"]').click()
  17. self.browser.click('button[type="submit"]')
  18. # After creating an org should end up on create project
  19. self.browser.wait_until_test_id("platform-javascript-react")
  20. assert self.browser.element_exists_by_test_id("create-project")