Skip to content

Commit

Permalink
Update WNP 130 variant params [mozilla#15034]
Browse files Browse the repository at this point in the history
Use the Nimbus format of ?branch=foo&variant=bar
  • Loading branch information
craigcook authored and alexgibson committed Sep 2, 2024
1 parent 15115fe commit 4536bb3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bedrock/firefox/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -937,8 +937,8 @@ def test_fx_130_0_0_pl(self, render_mock):

@override_settings(DEV=True)
def test_fx_130_0_0_en_us_v1(self, render_mock):
"""Should use default WNP template for en-US locale when v=1"""
req = self.rf.get("/firefox/whatsnew/?v=1")
"""Should use default WNP template for en-US locale when branch=experiment-wnp-130-tabs and variant=v1"""
req = self.rf.get("/firefox/whatsnew/?branch=experiment-wnp-130-tabs&variant=v1")
req.locale = "en-US"
self.view(req, version="130.0")
template = render_mock.call_args[0][1]
Expand Down
7 changes: 5 additions & 2 deletions bedrock/firefox/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,11 @@ def get_template_names(self):
template = "firefox/whatsnew/index.html"
elif version.startswith("130."):
if locale in ["en-US", "en-GB", "en-CA", "de", "fr", "es-ES", "it", "pl"]:
if variant == "1":
template = "firefox/whatsnew/index.html"
if nimbus_branch == "experiment-wnp-130-tabs":
if nimbus_variant == "v1":
template = "firefox/whatsnew/index.html"
else:
template = "firefox/whatsnew/whatsnew-fx130.html"
else:
template = "firefox/whatsnew/whatsnew-fx130.html"
else:
Expand Down

0 comments on commit 4536bb3

Please sign in to comment.