fix: use full shop slug URL in sandbox functional tests

Tests were using /s/{shop.id} which returns 302 redirect instead of
/s/{shop.id}/{shop.slug} which returns 200 directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
russell@unturf.com 2026-03-05 06:09:57 -05:00
parent e662f29e86
commit 666ca41184

View file

@ -4235,7 +4235,7 @@ class TestAnalytics(_AuthenticatedBase):
)
# Visit the shop page — toolbar should be present
res = self.testapp.get(f"/s/{shop.id}", status=200)
res = self.testapp.get(f"/s/{shop.id}/{shop.slug}", status=200)
self.assertIn("sandbox-toolbar", res.text)
self.assertIn("sandbox.js", res.text)
@ -4246,7 +4246,7 @@ class TestAnalytics(_AuthenticatedBase):
)
# sandbox_mode is off by default
res = self.testapp.get(f"/s/{shop.id}", status=200)
res = self.testapp.get(f"/s/{shop.id}/{shop.slug}", status=200)
self.assertNotIn("sandbox-toolbar", res.text)
def test_sandbox_mode_doesnt_affect_other_settings(self):
@ -4410,7 +4410,7 @@ class TestAnalytics(_AuthenticatedBase):
)
# Without S3 credentials, data-has-bucket should not be present
res = self.testapp.get(f"/s/{shop.id}", status=200)
res = self.testapp.get(f"/s/{shop.id}/{shop.slug}", status=200)
self.assertNotIn('data-has-bucket="1"', res.text)
# Save S3 credentials
@ -4427,5 +4427,5 @@ class TestAnalytics(_AuthenticatedBase):
)
# Now data-has-bucket="1" should be present
res = self.testapp.get(f"/s/{shop.id}", status=200)
res = self.testapp.get(f"/s/{shop.id}/{shop.slug}", status=200)
self.assertIn('data-has-bucket="1"', res.text)