test_create_organization.py 1.0 KB

12345678910111213141516171819202122232425
  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.element('input[name="name"]').send_keys("new org")
  17. self.browser.element('input[name="agreeTerms"]').click()
  18. self.browser.click('button[type="submit"]')
  19. # After creating an org should end up on create project
  20. self.browser.wait_until_test_id("platform-javascript-react")
  21. assert self.browser.element_exists_by_test_id("create-project")