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:
parent
e662f29e86
commit
666ca41184
1 changed files with 4 additions and 4 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue