24
24
import static com .adobe .cq .wcm .core .components .models .Page .NN_PAGE_FEATURED_IMAGE ;
25
25
import static com .adobe .cq .wcm .core .components .models .Teaser .NN_ACTIONS ;
26
26
import static com .adobe .cq .wcm .core .components .models .Teaser .PN_ACTIONS_DISABLED ;
27
- import static com .adobe .cq .wcm .core .components .models .Teaser .PN_ACTIONS_ENABLED ;
28
27
import static com .adobe .cq .wcm .core .components .models .Teaser .PN_ACTION_TEXT ;
29
28
import static com .adobe .cq .wcm .core .components .models .Teaser .PN_DESCRIPTION_FROM_PAGE ;
30
29
import static com .adobe .cq .wcm .core .components .models .Teaser .PN_DESCRIPTION_HIDDEN ;
@@ -109,7 +108,7 @@ void testEmpty() {
109
108
110
109
Teaser underTest = AdaptTo .notNull (context .request (), Teaser .class );
111
110
112
- assertFalse (underTest .isActionsEnabled ());
111
+ assertTrue (underTest .isActionsEnabled ());
113
112
assertTrue (underTest .getActions ().isEmpty ());
114
113
assertFalse (underTest .isImageLinkHidden ());
115
114
assertNull (underTest .getTitle ());
@@ -125,7 +124,6 @@ void testEmpty() {
125
124
}
126
125
127
126
@ Test
128
- @ SuppressWarnings ("null" )
129
127
void testWithImageAndPrimaryLink () {
130
128
enableDataLayer (context , true );
131
129
@@ -140,7 +138,7 @@ void testWithImageAndPrimaryLink() {
140
138
141
139
Teaser underTest = AdaptTo .notNull (context .request (), Teaser .class );
142
140
143
- assertFalse (underTest .isActionsEnabled ());
141
+ assertTrue (underTest .isActionsEnabled ());
144
142
assertTrue (underTest .getActions ().isEmpty ());
145
143
assertFalse (underTest .isImageLinkHidden ());
146
144
assertEquals ("Teaser Title" , underTest .getTitle ());
@@ -261,8 +259,7 @@ void testWithActions() {
261
259
Resource resource = context .create ().resource (page , "teaser" ,
262
260
PROPERTY_RESOURCE_TYPE , RESOURCE_TYPE ,
263
261
PN_LINK_TYPE , ExternalLinkType .ID ,
264
- PN_LINK_EXTERNAL_REF , "http://host" ,
265
- PN_ACTIONS_ENABLED , true );
262
+ PN_LINK_EXTERNAL_REF , "http://host" );
266
263
context .currentResource (resource );
267
264
context .create ().resource (resource , NN_ACTIONS + "/action1" ,
268
265
PN_ACTION_TEXT , "Action 1" ,
@@ -297,8 +294,7 @@ void testWithActions_DisabledViaPolicy() {
297
294
Resource resource = context .create ().resource (page , "teaser" ,
298
295
PROPERTY_RESOURCE_TYPE , RESOURCE_TYPE ,
299
296
PN_LINK_TYPE , ExternalLinkType .ID ,
300
- PN_LINK_EXTERNAL_REF , "http://host" ,
301
- PN_ACTIONS_ENABLED , true );
297
+ PN_LINK_EXTERNAL_REF , "http://host" );
302
298
context .currentResource (resource );
303
299
context .create ().resource (resource , NN_ACTIONS + "/action1" ,
304
300
PN_ACTION_TEXT , "Action 1" ,
@@ -322,7 +318,6 @@ void testTitleDescriptionImageFromFirstActionPage() {
322
318
PN_MEDIA_REF_STANDARD , asset .getPath ());
323
319
Resource resource = context .create ().resource (page , "teaser" ,
324
320
PROPERTY_RESOURCE_TYPE , RESOURCE_TYPE ,
325
- PN_ACTIONS_ENABLED , true ,
326
321
PN_TITLE_FROM_PAGE , true ,
327
322
PN_DESCRIPTION_FROM_PAGE , true ,
328
323
PN_IMAGE_FROM_PAGE_IMAGE , true ,
0 commit comments