forked from hystax/optscale
-
Notifications
You must be signed in to change notification settings - Fork 1
Features/mpt 14737 anomalies tests #282
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Introduces new end-to-end tests for the anomalies page, including UI component checks, navigation, and API response validation. Updates the AnomaliesPage object with additional locators and methods to support the new tests. Adds the DefaultAnomalyResponse type. Upgrades Playwright to version 1.56.1 and adjusts test configuration for retries and workers. Minor improvements and code style updates in existing test files.
Introduces API and UI support for creating and deleting anomaly detection policies, including new test cases for adding policies, searching anomalies, and cleaning up test data. Refactors filter locators and adds types for anomaly policy creation responses. Removes obsolete expected chart images.
Encapsulated logic for locating anomaly policy link, description, and filter by name into dedicated methods in AnomaliesPage. Updated tests to use these methods for improved readability and maintainability.
Introduces a debugLog statement to output the anomaly API response data for easier troubleshooting. Also refactors validation logic to ensure breakdown checks are only performed for 'Default' constraints.
Introduces a comprehensive mock data file for the anomalies page to support e2e testing. Also updates API response types to accommodate new mock data structures.
Introduces new locators and a method in AnomaliesPage for deleting anomaly detection policies. Adds an end-to-end test to verify that deleting a policy works as expected.
Expanded and restructured the mock data for daily expense breakdowns in anomalies-page.mocks.ts to include additional services, more detailed cost entries, and new summary totals. This supports more comprehensive e2e testing and reflects updated backend response formats.
Added comprehensive mock data for anomalies page, refactored and removed redundant methods in create-anomaly-page, updated cloud accounts regression test for Google Cloud tenant screenshot, and improved anomalies tests to use new mock responses. These changes enhance test coverage, maintainability, and reliability of the e2e test suite.
Introduces mock data for region and resource type expenses daily breakdowns in anomalies-page.mocks.ts to support new chart export tests. Updates anomalies page and spec files, and adds expected chart export images for data source, owner, pool, region, and resource type breakdowns.
Added the {tag: '@p1'} property to specific test cases across anomalies, expenses, homepage, pools, and recommendations specs to enable targeted test execution. Also updated a test in anomalies-tests.spec.ts from 'only' to 'fail' and commented out a failing assertion in homepage-tests.spec.ts due to a known bug. Added a new npm script 'playwight:p1' for running @p1 tagged tests.
Introduces utility methods to retrieve specific table cell values in AnomaliesPage and adds a new test to verify that detected anomalies are displayed correctly in the table. Also marks the chart export test as 'only' for focused execution.
Added DEV, TEST, and STAGING URL placeholders to the example environment file to clarify configuration for different deployment stages.
Added checks for DEV, TEST, and STAGING environment variables in global setup and clarified error messages in environment-util. Also removed 'test.only' from anomalies chart export test to allow all tests to run.
Replaces expected anomaly chart PNGs with new 'expenses' variants and updates test references accordingly. Adds variable matching for GraphQL expense breakdown mocks in tests and interceptor logic. Improves GraphQL interceptor to support variable matching and logging. Updates type definitions to include optional variableMatch for GraphQL entries.
Deleted obsolete expected chart PNG files for daily, monthly, and weekly expenses. Also removed outdated TODO comments from anomalies-tests.spec.ts to improve code clarity.
Swapped all console.log statements for debugLog in the GraphQL request interceptor and interceptor registration logic to standardize logging and improve test output control.
Changed the locator for the resource button in anomalies-page.ts to use 'ListAltOutlinedIcon' for improved selector reliability. Added a test to verify that clicking the resource button on detected anomalies navigates correctly to the resources page.
dwolosz
approved these changes
Nov 19, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adding test coverage for Anomaly detection
Related issue number
https://softwareone.atlassian.net/browse/MPT-14737