File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ object InteractivePicker {
24
24
request : RequestHeader ,
25
25
): RenderingTier = {
26
26
// Allows us to press via InterativeLibrarian and also debug interactives rendering via dcr
27
- val forceDCROff = request.forceDCROff
28
27
val fullPath = ensureStartingForwardSlash(path)
29
28
30
29
// Allow us to quickly revert to rendering content (instead of serving pressed content)
31
30
val switchOn = InteractivePickerFeature .isSwitchedOn
32
31
33
- if (forceDCROff) FrontendLegacy
32
+ if (request.forceDCROff) FrontendLegacy
33
+ else if (request.forceDCR) DotcomRendering
34
34
else if (isPressed(fullPath) && switchOn) PressedInteractive
35
35
else DotcomRendering
36
36
}
Original file line number Diff line number Diff line change @@ -42,4 +42,14 @@ import play.api.test.Helpers._
42
42
43
43
tier should be(DotcomRendering )
44
44
}
45
+
46
+ it should " return DotcomRendering if interactive is pressed and dcr=true" in {
47
+ val testRequest = TestRequest (s " $path?dcr=true " )
48
+ val tier =
49
+ InteractivePicker .getRenderingTier(path, MockPressedInteractives .isPressed)(
50
+ testRequest,
51
+ )
52
+
53
+ tier should be(DotcomRendering )
54
+ }
45
55
}
You can’t perform that action at this time.
0 commit comments