Skip to content

Commit

Permalink
Merge pull request #26268 from guardian/ab/add-vertical-container-test
Browse files Browse the repository at this point in the history
Add 0% vertical container test
  • Loading branch information
abeddow91 committed Jun 30, 2023
2 parents b981e5b + d112c6a commit 0bf69f5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions common/app/experiments/Experiments.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ object ActiveExperiments extends ExperimentsDefinition {
BorkFCP,
BorkFID,
ActionCardRedesign,
VerticalVideoContainer,
)
implicit val canCheckExperiment = new CanCheckExperiment(this)
}
Expand Down Expand Up @@ -130,3 +131,12 @@ object ActionCardRedesign
sellByDate = LocalDate.of(2023, 9, 8),
participationGroup = Perc20A,
)

object VerticalVideoContainer
extends Experiment(
name = "vertical-video-container",
description = "When ON, Vertical Video Container is displayed",
owners = Seq(Owner.withGithub("@guardian/editorial-experience")),
sellByDate = LocalDate.of(2023, 7, 31),
participationGroup = Perc0A,
)
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
@import views.support.Commercial.container.shouldRenderAsPaidContainer
@import views.support.GetClasses
@import conf.switches.Switches.{MostViewedFronts, VerticalVideo => VerticalVideoSwitch}
@import experiments.VerticalVideoContainer
@import experiments.ActiveExperiments

@import conf.audio.FlagshipFrontContainer
@(containerDefinition: layout.FaciaContainer,
Expand Down Expand Up @@ -89,7 +91,7 @@
}

case VerticalVideo => {
@if(VerticalVideoSwitch.isSwitchedOn && frontId.exists(_.matches("au"))) {
@if((ActiveExperiments.isParticipating(VerticalVideoContainer) || VerticalVideoSwitch.isSwitchedOn) && frontId.exists(_.matches("au"))) {
<div class="gs-container">
@verticalVideoContainer(containerDefinition, frontProperties)
</div>
Expand Down

0 comments on commit 0bf69f5

Please sign in to comment.