test_create_organization.py 1.1 KB

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