Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/sentry/features/temporary.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@ def register_temporary_features(manager: FeatureManager) -> None:
manager.add("organizations:onboarding-scm", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Experiment: SCM onboarding messaging step A/B test (treatment adds a messaging/alerting step before SDK setup)
manager.add("organizations:onboarding-scm-messaging-experiment", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Enable SCM-first project creation flow
manager.add("organizations:onboarding-scm-project-creation", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, api_expose=True)
# Write newly created debug files exclusively to Objectstore without creating a File.
manager.add("organizations:objectstore-debugfiles-exclusive-write", OrganizationFeature, FeatureHandlerStrategy.FLAGPOLE, default=False, api_expose=False)
# Double-write newly created debug files to Objectstore.
Expand Down
2 changes: 0 additions & 2 deletions tests/acceptance/test_create_organization.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from django.test import override_settings

from sentry.testutils.cases import AcceptanceTestCase
from sentry.testutils.helpers.features import with_feature
from sentry.testutils.silo import no_silo_test


Expand All @@ -12,7 +11,6 @@ def setUp(self) -> None:
self.user = self.create_user("foo@example.com")
self.login_as(self.user)

@with_feature("organizations:onboarding-scm-project-creation")
@override_settings(
PRIVACY_URL="https://sentry.io/privacy/", TERMS_URL="https://sentry.io/terms/"
)
Expand Down
85 changes: 34 additions & 51 deletions tests/acceptance/test_create_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@ def test_connect_provider_select_repository_and_create(self) -> None:
}

with (
self.feature(
{
"organizations:onboarding-scm-project-creation": True,
}
),
mock.patch(
"sentry.integrations.github.integration.GitHubIntegration.get_repositories",
return_value=self.mock_repos,
Expand Down Expand Up @@ -183,12 +178,7 @@ def test_connect_provider_select_repository_and_create(self) -> None:
self.create_scm_project("Django", "python-django")

def test_create_without_repository(self) -> None:
with self.feature(
{
"organizations:onboarding-scm-project-creation": True,
"organizations:performance-view": True,
}
):
with self.feature("organizations:performance-view"):
self.load_project_creation_page()
self.select_platform("React")

Expand All @@ -203,11 +193,6 @@ def test_create_with_existing_integration(self) -> None:
self.create_github_integration()

with (
self.feature(
{
"organizations:onboarding-scm-project-creation": True,
}
),
mock.patch(
"sentry.integrations.github.integration.GitHubIntegration.get_repositories",
return_value=self.mock_repos,
Expand All @@ -234,44 +219,42 @@ def test_create_with_existing_integration(self) -> None:
def test_create_team(self) -> None:
org = self.create_organization(name="Rowdy Tiger", owner=self.user)

with self.feature({"organizations:onboarding-scm-project-creation": True}):
self.browser.get(f"/organizations/{org.slug}/projects/new/")
self.browser.wait_until(xpath='//h4[text()="Repository"]')
self.browser.get(f"/organizations/{org.slug}/projects/new/")
self.browser.wait_until(xpath='//h4[text()="Repository"]')

self.browser.click(None, "//*[text()='Select a Team']")
self.browser.click('[data-test-id="create-team-option"]')
self.browser.wait_until("[role='dialog']")
input = self.browser.element('input[name="slug"]')
input.send_keys("new-team")
self.browser.element("[role='dialog'] form").submit()
self.browser.wait_until(xpath='//div[text()="#new-team"]')
self.browser.click(None, "//*[text()='Select a Team']")
self.browser.click('[data-test-id="create-team-option"]')
self.browser.wait_until("[role='dialog']")
input = self.browser.element('input[name="slug"]')
input.send_keys("new-team")
self.browser.element("[role='dialog'] form").submit()
self.browser.wait_until(xpath='//div[text()="#new-team"]')

def test_project_deletion_on_going_back(self) -> None:
with self.feature({"organizations:onboarding-scm-project-creation": True}):
self.load_project_creation_page()
self.select_platform("Laravel")
self.browser.wait_until_clickable(xpath='//button[contains(., "Create project")]')
self.browser.click(xpath='//button[contains(., "Create project")]')
self.browser.wait_until(xpath="//h2[text()='Configure Laravel SDK']")
project1 = Project.objects.get(organization=self.org, slug="php-laravel")
self.load_project_creation_page()
self.select_platform("Laravel")
self.browser.wait_until_clickable(xpath='//button[contains(., "Create project")]')
self.browser.click(xpath='//button[contains(., "Create project")]')
self.browser.wait_until(xpath="//h2[text()='Configure Laravel SDK']")
project1 = Project.objects.get(organization=self.org, slug="php-laravel")

# Going back deletes the project before returning to the form, which
# restores the Laravel selection.
self.browser.click(xpath='//button[contains(., "Back to Platform Selection")]')
WebDriverWait(self.browser.driver, 10).until(
expected_conditions.text_to_be_present_in_element_value(
(By.CSS_SELECTOR, 'input[placeholder="project-name"]'), "php-laravel"
)
# Going back deletes the project before returning to the form, which
# restores the Laravel selection.
self.browser.click(xpath='//button[contains(., "Back to Platform Selection")]')
WebDriverWait(self.browser.driver, 10).until(
expected_conditions.text_to_be_present_in_element_value(
(By.CSS_SELECTOR, 'input[placeholder="project-name"]'), "php-laravel"
)
self.select_platform("Next.js")
self.browser.wait_until_clickable(xpath='//button[contains(., "Create project")]')
self.browser.click(xpath='//button[contains(., "Create project")]')
self.browser.wait_until(xpath="//h2[text()='Configure Next.js SDK']")
project2 = Project.objects.get(organization=self.org, slug="javascript-nextjs")
)
self.select_platform("Next.js")
self.browser.wait_until_clickable(xpath='//button[contains(., "Create project")]')
self.browser.click(xpath='//button[contains(., "Create project")]')
self.browser.wait_until(xpath="//h2[text()='Configure Next.js SDK']")
project2 = Project.objects.get(organization=self.org, slug="javascript-nextjs")

self.browser.back()
self.browser.get(f"/organizations/{self.org.slug}/projects/")
self.browser.wait_until(xpath='//*[text()="Remain Calm"]')
assert_existing_projects_status(
self.org, active_project_ids=[], deleted_project_ids=[project1.id, project2.id]
)
self.browser.back()
self.browser.get(f"/organizations/{self.org.slug}/projects/")
self.browser.wait_until(xpath='//*[text()="Remain Calm"]')
assert_existing_projects_status(
self.org, active_project_ids=[], deleted_project_ids=[project1.id, project2.id]
)
2 changes: 1 addition & 1 deletion tests/acceptance/test_quick_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def setUp(self) -> None:
self.user = self.create_user("foo@example.com")
self.login_as(self.user)

@with_feature(["organizations:onboarding", "organizations:onboarding-scm-project-creation"])
@with_feature("organizations:onboarding")
@override_settings(
PRIVACY_URL="https://sentry.io/privacy/", TERMS_URL="https://sentry.io/terms/"
)
Expand Down
Loading