mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 15:57:23 -04:00
Merge pull request #2764 from alphagov/fix-misaligned-checkboxes
Fix misaligned checkboxes
This commit is contained in:
@@ -12,7 +12,7 @@
|
|||||||
{% else %}
|
{% else %}
|
||||||
<nav id=template-list>
|
<nav id=template-list>
|
||||||
{% for item in template_list %}
|
{% for item in template_list %}
|
||||||
<div class="template-list-item {% if can_manage_folders %}template-list-item-with-checkbox{% endif %} {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">
|
<div class="template-list-item {% if current_user.has_permissions('manage_templates') %}template-list-item-with-checkbox{% endif %} {% if item.ancestors %}template-list-item-hidden-by-default{% endif %} {% if not item.ancestors %}template-list-item-without-ancestors{% endif %}">
|
||||||
{% if current_user.has_permissions('manage_templates') %}
|
{% if current_user.has_permissions('manage_templates') %}
|
||||||
{{ unlabelled_checkbox(
|
{{ unlabelled_checkbox(
|
||||||
id='templates-or-folder-{}'.format(item.id),
|
id='templates-or-folder-{}'.format(item.id),
|
||||||
|
|||||||
@@ -339,6 +339,10 @@ def test_should_show_templates_folder_page(
|
|||||||
assert links_in_page[index].text.strip() == expected_link
|
assert links_in_page[index].text.strip() == expected_link
|
||||||
|
|
||||||
all_page_items = page.select('.template-list-item')
|
all_page_items = page.select('.template-list-item')
|
||||||
|
all_page_items_styled_with_checkboxes = page.select('.template-list-item-with-checkbox')
|
||||||
|
|
||||||
|
assert len(all_page_items) == len(all_page_items_styled_with_checkboxes)
|
||||||
|
|
||||||
checkboxes = page.select('input[name=templates_and_folders]')
|
checkboxes = page.select('input[name=templates_and_folders]')
|
||||||
unique_checkbox_values = set(item['value'] for item in checkboxes)
|
unique_checkbox_values = set(item['value'] for item in checkboxes)
|
||||||
assert len(all_page_items) == len(expected_items)
|
assert len(all_page_items) == len(expected_items)
|
||||||
|
|||||||
Reference in New Issue
Block a user