test_member_list.py 1.2 KB

1234567891011121314151617181920212223242526272829
  1. from sentry.models import OrganizationMember
  2. from sentry.testutils.cases import AcceptanceTestCase
  3. from sentry.testutils.silo import no_silo_test
  4. @no_silo_test(stable=True)
  5. class ListOrganizationMembersTest(AcceptanceTestCase):
  6. def setUp(self):
  7. super().setUp()
  8. self.user = self.create_user("foo@example.com")
  9. self.org = self.create_organization(name="Rowdy Tiger", owner=None)
  10. self.team = self.create_team(organization=self.org, name="Mariachi Band")
  11. self.create_member(user=self.user, organization=self.org, role="owner", teams=[self.team])
  12. OrganizationMember.objects.create(
  13. email="bar@example.com", organization=self.org, role="member"
  14. )
  15. self.create_member(
  16. user=self.create_user("baz@example.com"),
  17. organization=self.org,
  18. role="admin",
  19. teams=[self.team],
  20. )
  21. self.login_as(self.user)
  22. def test_list(self):
  23. self.browser.get(f"/organizations/{self.org.slug}/members/")
  24. self.browser.wait_until_not('[data-test-id="loading-indicator"]')
  25. assert self.browser.element_exists_by_test_id("email-invite")
  26. assert self.browser.element_exists_by_aria_label("Resend invite")