Skip to content

Adds test for CustomAlerts via MSTeams, #PG-4671#4

Merged
AltamashShaikh merged 14 commits intoPG-4671-msteamsfrom
PG-4671-msteams-add-tests-customalerts
Dec 15, 2025
Merged

Adds test for CustomAlerts via MSTeams, #PG-4671#4
AltamashShaikh merged 14 commits intoPG-4671-msteamsfrom
PG-4671-msteams-add-tests-customalerts

Conversation

@AltamashShaikh
Copy link
Copy Markdown
Contributor

@AltamashShaikh AltamashShaikh commented Nov 20, 2025

Description

Adds test for CustomAlerts via MSTeams
Fixes: #PG-4671
Requires: matomo-org/plugin-CustomAlerts#220

Checklist

  • [NA] I have understood, reviewed, and tested all AI outputs before use
  • [NA] All AI instructions respect security, IP, and privacy rules

Review

@AltamashShaikh AltamashShaikh added the Needs Review For pull requests that need a code review. label Nov 20, 2025
@AltamashShaikh AltamashShaikh requested a review from a team November 20, 2025 07:58
@AltamashShaikh
Copy link
Copy Markdown
Contributor Author

AltamashShaikh commented Nov 20, 2025

The tests will work only if we merge the CustomAlerts PR

Comment thread tests/Integration/CustomAlertsTest.php Outdated
Comment on lines +38 to +43
$this->assertEquals([
['key' => 'email', 'value' => 'CustomAlerts_MediumEmail', 'disabled' => false],
['key' => 'mobile', 'value' => 'CustomAlerts_MediumMobile', 'disabled' => false],
['key' => 'slack', 'value' => 'CustomAlerts_MediumSlack', 'disabled' => true],
['key' => 'teams', 'value' => 'CustomAlerts_MediumMicrosoftTeams', 'disabled' => false],
], CustomAlerts::getReportMediumOptions());
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can we change this to assertArrayIncludes and just check for teams, so we don't have to fix the test every time we add a new method? Nitpick, although I had to do just that in the other plugins recently...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done changed to contains 👍

Base automatically changed from PG-4671-msteams-add-tests to PG-4671-msteams November 26, 2025 05:28
Copy link
Copy Markdown

@james-hill-matomo james-hill-matomo left a comment

Choose a reason for hiding this comment

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

LGTM

@AltamashShaikh AltamashShaikh merged commit 3fa1402 into PG-4671-msteams Dec 15, 2025
8 checks passed
@AltamashShaikh AltamashShaikh deleted the PG-4671-msteams-add-tests-customalerts branch December 15, 2025 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review For pull requests that need a code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants