Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional tests for task list Nunjucks macro, allow attributes on tags and tidy up #3951

Merged
merged 11 commits into from
Jul 13, 2023

Conversation

36degrees
Copy link
Contributor

Add additional template tests that cover the various options that can be passed to the macro.

See individual commits for details.

Closes #3828.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3951 July 11, 2023 17:09 Inactive
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3951 July 11, 2023 17:14 Inactive
Copy link
Contributor

@colinrotherham colinrotherham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks brilliant. Every single commit

Mind if we update the PR title + description to say we've added fixes and features rather than just better test coverage?

36degrees and others added 11 commits July 13, 2023 09:24
There is no `govuk-tag--black` modifier class, and the status for this task doesn’t use the tag component, so it shouldn’t be using tag modifiers anyway.
This means that we’ll link to the guidance in the Design System for the tag component, rather than defining everything the tag component accepts in multiple places.
This matches what we do in other components that call each other – it means that importing task list brings in everything you need for the component, rather than having to remember to import tag separately.
Because we’re just passing the options defined by the user straight through to the tag component we can simplify the code and just pass the entire `item.status.tag` object rather than each option individually.

Co-authored-by: Colin Rotherham <work@colinr.com>
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-3951 July 13, 2023 08:25 Inactive
@36degrees 36degrees changed the title Add comprehensive tests for task list Nunjucks macro Additional tests for task list Nunjucks macro, allow attributes on tags and tidy up Jul 13, 2023
@36degrees 36degrees requested a review from colinrotherham July 13, 2023 08:27
@36degrees 36degrees merged commit 087d680 into main Jul 13, 2023
@36degrees 36degrees deleted the task-list-tests branch July 13, 2023 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve template test coverage for the task list component
3 participants