Skip to content

Commit 9804856

Browse files
joshua-salsadigitalJoshua Fernandes
and
Joshua Fernandes
authored
Issue #3415742 by joshua1234511: Fixed Nodes within an Automated list should not reference itself. (#1219)
Co-authored-by: Joshua Fernandes <“joshua.1234511@yahoo.in”>
1 parent bd271bb commit 9804856

File tree

3 files changed

+92
-0
lines changed

3 files changed

+92
-0
lines changed

tests/behat/features/paragraph.civictheme_automated_list.render.feature

+20
Original file line numberDiff line numberDiff line change
@@ -323,3 +323,23 @@ Feature: Automated list render
323323
And I should see an ".ct-group-filter__filters .ct-form-element--topic" element
324324
And I should not see an ".ct-group-filter__filters .ct-form-element--type" element
325325
And I should see an ".ct-group-filter__filters .ct-form-element--title" element
326+
327+
@api
328+
Scenario: Automated list, is not self referenced
329+
Given "civictheme_page" content:
330+
| title | status | moderation_state |
331+
| Test page content in list | 1 | published |
332+
| Test page with Automated list non self referenced | 1 | published |
333+
334+
And "field_c_n_components" in "civictheme_page" "node" with "title" of "Test page with Automated list non self referenced" has "civictheme_automated_list" paragraph:
335+
| field_c_p_title | [TEST] Automated list title |
336+
| field_c_p_list_limit_type | unlimited |
337+
| field_c_p_list_limit | 0 |
338+
339+
And I am an anonymous user
340+
When I visit "civictheme_page" "Test page with Automated list non self referenced"
341+
Then I should see a ".ct-list" element
342+
And I should see a ".ct-list.ct-theme-light" element
343+
And the response should contain "ct-automated-list-"
344+
And the ".ct-list .ct-promo-card__title__link" element should contain "Test page content in list"
345+
And the ".ct-list .ct-promo-card__title__link" element should not contain "Test page with Automated list non self referenced"

web/modules/custom/civictheme_dev/config/install/views.view.civictheme_automated_list_test.yml

+36
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,42 @@ display:
268268
break_phrase: true
269269
depth: 0
270270
use_taxonomy_term_path: false
271+
nid:
272+
id: nid
273+
table: node_field_data
274+
field: nid
275+
relationship: none
276+
group_type: group
277+
admin_label: ''
278+
entity_type: node
279+
entity_field: nid
280+
plugin_id: node_nid
281+
default_action: default
282+
exception:
283+
value: all
284+
title_enable: false
285+
title: All
286+
title_enable: false
287+
title: ''
288+
default_argument_type: node
289+
default_argument_options: { }
290+
default_argument_skip_url: false
291+
summary_options:
292+
base_path: ''
293+
count: true
294+
override: false
295+
items_per_page: 25
296+
summary:
297+
sort_order: asc
298+
number_of_records: 0
299+
format: default_summary
300+
specify_validation: false
301+
validate:
302+
type: none
303+
fail: 'not found'
304+
validate_options: { }
305+
break_phrase: false
306+
not: true
271307
filters:
272308
status:
273309
id: status

web/themes/contrib/civictheme/config/install/views.view.civictheme_automated_list.yml

+36
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,42 @@ display:
283283
break_phrase: true
284284
depth: 0
285285
use_taxonomy_term_path: false
286+
nid:
287+
id: nid
288+
table: node_field_data
289+
field: nid
290+
relationship: none
291+
group_type: group
292+
admin_label: ''
293+
entity_type: node
294+
entity_field: nid
295+
plugin_id: node_nid
296+
default_action: default
297+
exception:
298+
value: all
299+
title_enable: false
300+
title: All
301+
title_enable: false
302+
title: ''
303+
default_argument_type: node
304+
default_argument_options: { }
305+
default_argument_skip_url: false
306+
summary_options:
307+
base_path: ''
308+
count: true
309+
override: false
310+
items_per_page: 25
311+
summary:
312+
sort_order: asc
313+
number_of_records: 0
314+
format: default_summary
315+
specify_validation: false
316+
validate:
317+
type: none
318+
fail: 'not found'
319+
validate_options: { }
320+
break_phrase: false
321+
not: true
286322
filters:
287323
status:
288324
id: status

0 commit comments

Comments
 (0)