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

[Aging Content] Write unit tests for the notifications framework (& full-width alert/banner if applicable) #18005

Open
3 of 5 tasks
Tracked by #17975 ...
FranECross opened this issue Apr 30, 2024 · 3 comments
Assignees
Labels
Aging Content Notifications Aging Content notifications & archiving Drupal engineering CMS team practice area Public Websites Scrum team in the Sitewide crew

Comments

@FranECross
Copy link

FranECross commented Apr 30, 2024

Status

[2024-05-31] This is currently blocked due to an error preventing Daniel from updating a composer package. He filed a ticket and reported to CMS.

Description

Expand unit tests for the Aging Content 'framework', and if applicable, the full-width alert/banner code using the framework.

User story

AS A PO/PM managing the new feature aging content notifications framework
I WANT sufficient unit tests written
SO THAT if any failures occur in the notifications process, we are notified and corrections may be made.

Engineering notes / background

Tests will need to be written for both custom code as well as the contributed Expirable Content module.

Acceptance criteria

  • CreateAdvancedQueueJob ECA Action (Kernel/Unit tests)
  • Expirable Content Views fields and filters (Kernel/Unit tests)
  • Expirable Content Computed field (Kernel tests)
  • Expirable Content Calculation of expiration and warning dates (Unit tests)
  • Test FWB end-to-end, save for mail receipt and delivery. Tests should assert that emails get queued correctly and with the expected content.
@dsasser
Copy link
Contributor

dsasser commented May 24, 2024

Update 5/24/24

I added unit tests to the Expirable Content module. The test covers 2 acs (among other things):

  • Expirable Content Computed field (Kernel tests)
  • Expirable Content Calculation of expiration and warning dates (Unit tests)

In our repository, I added tests to cover:

  • CreateAdvancedQueueJob ECA Action (Kernel/Unit tests)

I'm currently working on:

  • Expirable Content Views fields and filters (Kernel/Unit tests)
  • Test FWB end-to-end, save for mail receipt and delivery. Tests should assert that emails get queued correctly and with the expected content.

Both of these tests are difficult to write, because of the underlying complexity with Views and the many contributed components we are leveraging to get mail queued and delivered. I would be inclined to strike/postpone the Views tests, as testing e-2-e would also validate the functionality of Views, at least for our current purposes, and going down that rabbit whole will certainly cause this ticket to roll over with quite a bit of work remaining (3-5 points).

@FranECross
Copy link
Author

@dsasser I'm good with postponing/striking the Views tests based on your info above. cc @jilladams

@dsasser
Copy link
Contributor

dsasser commented May 31, 2024

@FranECross this issue is currently blocked. I reported this to the Platform CMS team this morning via Slack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aging Content Notifications Aging Content notifications & archiving Drupal engineering CMS team practice area Public Websites Scrum team in the Sitewide crew
Projects
None yet
Development

No branches or pull requests

2 participants