Skip to content

Conversation

@StylusFrost
Copy link
Collaborator

Context

⚠️ Stacked PR: This PR is stacked on top of #9230. Please review and merge #9230 first.

Description

The implementation includes a comprehensive E2E test suite @PROVIDER-E2E-011 that validates the AWS provider with using AWS SDK defaults and assume role

@PROVIDER-E2E-012

  1. Navigate to providers page
  2. Click "Add Provider" button
  3. Select OCI provider type
  4. Fill provider details (tenancy ID and alias)
  5. Verify OCI credentials page is loaded
  6. Fill OCI credentials (user ID, fingerprint, key content, region)
  7. Launch initial scan
  8. Verify redirect to Scans page
  9. Verify scheduled scan status in Scans table (provider exists and scan name is "scheduled scan")

Steps to review

cd ui
npx playwright test --grep @PROVIDER-E2E-012

Checklist

UI

  • All issue/task requirements work as expected on the UI
  • Screenshots/Video of the functionality flow (if applicable) - Mobile (X < 640px)
  • Screenshots/Video of the functionality flow (if applicable) - Table (640px > X < 1024px)
  • Screenshots/Video of the functionality flow (if applicable) - Desktop (X > 1024px)
  • Ensure new entries are added to CHANGELOG.md, if applicable.

API

  • Verify if API specs need to be regenerated.
  • Check if version updates are required (e.g., specs, Poetry, etc.).
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

StylusFrost and others added 30 commits October 9, 2025 10:27
- Added multiple authentication setup files for different user roles (admin, manage scans, manage integrations, etc.) to streamline end-to-end testing.
- Introduced a helper function to authenticate users and save their state for reuse in tests.
- Updated Playwright configuration to include new authentication projects.

This change improves the testing framework by allowing for more comprehensive and role-specific user authentication scenarios.
…bility with current e2e test

- Modified Playwright test commands in package.json to explicitly use the 'chromium' project.
- Added missing commas and improved formatting in the Playwright configuration file to enhance readability and maintain consistency across the codebase.
- Introduced a BasePage class to encapsulate common functionality for page objects, improving code reusability and maintainability.
- Created new page objects for HomePage, SignInPage, and SignUpPage to streamline the sign-up and login processes in tests.
- Added comprehensive sign-up flow tests to validate user registration and login functionality, ensuring a smooth user experience.
- Updated Playwright configuration to support new test structures and improve overall test organization.
- Documented test case details including flow steps, expected results, and key verification points.
- Enhanced existing sign-up test specifications to include relevant tags for better categorization and tracking.
…tate verification

- Removed the `verifyLoadingState` method from the `SignUpPage` class as it was redundant.
- Updated comments in the sign-up test to enhance clarity and focus on key actions.
- Added a call to `verifyNoErrors` to ensure no errors occur during the sign-up process.
- Updated the `verifyLogoutSuccess` function to use a regex for URL verification.
- Added new helper functions `getSession` and `verifySessionValid` to streamline session validation in tests, ensuring that session data is correctly retrieved and validated.
- Introduced new E2E tests for adding AWS providers with both static and role-based credentials.
- Updated Playwright configuration to include a new test suite for providers.
- Enhanced the UI workflow by adding necessary environment variables for E2E testing.
- Created helper functions for provider management actions and validations.
- Refactored AWS provider credential interfaces to improve type safety and clarity.
- Replaced `ProviderCredentials` with `AWSProviderCredential` and introduced `AWS_CREDENTIAL_OPTIONS` for credential types.
- Updated tests to utilize the new credential structure, ensuring consistency across AWS provider management actions.
- Added a wait for network idle state in the ProvidersPage test to ensure all network requests are completed before proceeding.
- This enhancement improves the reliability of the test by ensuring the page is fully loaded before assertions are made.
- Introduced a call to `waitForPageLoad` in the sign-up page test to ensure the page is fully loaded before proceeding with visibility checks for elements.
- Introduced new E2E tests for adding Azure providers with static credentials.
- Updated the ProvidersPage interface to include Azure-specific fields and methods.
- Enhanced the test suite to validate the complete flow of adding a new Azure provider, ensuring proper handling of credentials and provider details.
- Added necessary environment variable checks and cleanup steps to maintain test integrity.
- Added necessary Azure environment variables to the UI E2E test workflow.
- This enhancement supports the integration of Azure provider management in the testing suite.
- Introduced new E2E tests for adding Microsoft 365 providers with static credentials.
- Updated the ProvidersPage interface to include M365-specific fields and methods.
- Enhanced the test suite to validate the complete flow of adding a new M365 provider, ensuring proper handling of credentials and provider details.
- Added necessary environment variable checks and cleanup steps to maintain test integrity.
- Added support for certificate-based authentication in M365 provider management.
- Updated the ProvidersPage interface to include fields for certificate credentials.
- Enhanced E2E tests to validate the complete flow of adding a new M365 provider with certificate credentials.
- Included necessary environment variable checks for certificate content and updated test steps accordingly.
…riable

- Modified the sign-up test to retrieve the password from the E2E_NEW_PASSWORD environment variable.
- Updated documentation to specify the requirement for the E2E_NEW_PASSWORD variable before running tests.
- Replaced text-based locators with role-based queries in various test files for improved accessibility and consistency.
- Removed deprecated HomePage and SignInPage files to streamline the test structure.
- Changed the selector for the "Add Cloud Provider" button from text-based to role-based for improved reliability and maintainability.
- Introduced support for adding Kubernetes providers with kubeconfig content in the UI.
- Updated the ProvidersPage interface to include fields and methods for Kubernetes provider details and credentials.
- Enhanced E2E tests to validate the complete flow of adding a new Kubernetes provider, ensuring proper handling of context and kubeconfig content.
- Included necessary environment variable checks for Kubernetes context and kubeconfig path to maintain test integrity.
- Refactored locators in BasePage, HomePage, SignInPage, and SignUpPage to utilize role-based queries for improved accessibility and consistency across the UI tests.
… test

- Cleaned up the admin authentication setup test by removing an unnecessary blank line for improved readability.
…ER-180-azure-add-and-connect-the-provider-new
- Refactored input locators in ProvidersPage tests to utilize role-based queries for improved accessibility and consistency across the UI tests.
…ER-180-azure-add-and-connect-the-provider-new
- Changed the Kubernetes context name from 'kind-kind' to 'kind' in the UI E2E tests workflow for better clarity and consistency.
- Added a parameter to specify the Kind cluster name during its creation, ensuring proper integration with the Kubernetes setup.
- Changed the parameter name for the Kind cluster creation from 'name' to 'cluster-name' in the UI E2E tests workflow for improved clarity and consistency.
- This update aligns with best practices for Kubernetes configurations and enhances the overall readability of the workflow.
…kflow

- Updated the parameter name for the Kind cluster creation from 'cluster-name' to 'cluster_name' in the UI E2E tests workflow for consistency with Kubernetes naming conventions.
- This change enhances clarity and aligns with best practices in the workflow configuration.
- Updated the kubeconfig cluster name from 'kind' to 'kind-kind' in the UI E2E tests workflow for improved accuracy and consistency.
- This change ensures proper configuration when interacting with the Kind cluster during end-to-end tests.
- Eliminated the push trigger for the UI E2E tests workflow to streamline the process and focus on pull request events.
- This change enhances the workflow by ensuring tests are only run during pull requests, reducing unnecessary executions.
…up tests

- Changed the environment variable name from 'E2E_NEW_PASSWORD' to 'E2E_NEW_USER_PASSWORD' in the UI E2E tests workflow and related documentation.
- This update ensures consistency across the test setup and improves clarity in the sign-up flow tests.
- Introduced GCP provider data and credential interfaces to the ProvidersPage.
- Implemented methods for filling GCP provider details and service account key credentials.
- Added end-to-end tests for adding a GCP provider using service account key authentication.
- Updated documentation to include new test case for GCP provider integration.
- Introduced GitHub provider data and credential interfaces to the ProvidersPage.
- Implemented methods for filling GitHub provider details and credentials for both personal access token and GitHub App.
- Added end-to-end tests for adding a GitHub provider using personal access token and GitHub App authentication.
- Updated the UI E2E tests workflow to include necessary environment variables for GitHub integration.
- Enhanced documentation with new test cases for GitHub provider integration.
- Added support for invitations management in the UI E2E tests, including a new InvitationsPage class for handling invitation-related actions.
- Updated the Playwright configuration to include a new project for invitations tests.
- Created comprehensive end-to-end tests for inviting new users, verifying the sign-up process, and ensuring proper organization association.
- Introduced new environment variable 'E2E_ORGANIZATION_ID' for managing organization-specific tests.
- Documented the new test cases and flow for invitations management in the corresponding markdown files.
…LER-197-out-of-scope-github-add-an-connect-the-provider
- Added missing spaces in the ProvidersPage tests to improve readability and maintain consistency in the code style.
- This change enhances the overall clarity of the test code without affecting functionality.
…add-an-connect-the-provider' into PROWLER-188-invite-new-user
- Added missing spaces in the InvitationsPage tests to improve readability and maintain consistency in the code style.
- This change enhances the overall clarity of the test code without affecting functionality.
- Introduced a new scans test suite to validate the on-demand scan execution flow.
- Added methods in the ScansPage class for selecting providers, filling scan aliases, and verifying scan launches.
- Updated the ProvidersPage class to include a method for adding AWS providers.
- Created comprehensive end-to-end tests for executing scans, including necessary preconditions and environment variable checks.
- Documented the new test cases and flow in the scans markdown file.
- Added a new success toast element to the ScansPage class for better feedback on scan launches.
- Updated the verifyScanLaunched method to utilize the new success toast locator, improving the visibility check for successful scan initiation.
- This change enhances the user experience by providing clear confirmation of scan actions.
- Modified the E2E test commands in package.json to include the 'scans' project, ensuring comprehensive testing coverage for the scans functionality.
- This change aligns the test commands with recent enhancements made to the ScansPage and overall E2E testing strategy.
- Modified the provider tests to verify the redirect to the Scans page after launching a scan.
- Added checks to ensure that the scheduled scan appears in the Scans table with the correct provider and scan name.
- Enhanced the ScansPage class with a new method to verify the scheduled scan status, improving the accuracy of the tests.
…aults

- Implemented a new test case to validate the addition of an AWS provider using assume role credentials sourced from the AWS SDK default chain.
- Enhanced the ProvidersPage class with a method to select the authentication method, including AWS SDK Default.
- Updated the providers markdown documentation to include detailed steps and expected results for the new test case.
- Ensured that the test checks for proper environment variable configuration and verifies the scheduled scan status after provider addition.
- Implemented a new test case to validate the addition of an OCI provider using API key credentials, including user ID, tenancy ID, fingerprint, private key, and region.
- Enhanced the ProvidersPage class with methods for selecting the OCI provider and filling in the required details and credentials.
- Updated the providers markdown documentation to include detailed steps and expected results for the new test case.
- Ensured that the test checks for proper environment variable configuration and verifies the scheduled scan status after provider addition.
… page verification

- Updated the error message locator in ProvidersPage to include additional selectors for better accuracy in identifying error messages.
- Added verification for the credentials page loading after selecting credentials type in both AWS provider tests and role credentials tests, ensuring consistency and reliability in the test flow.
@StylusFrost StylusFrost self-assigned this Nov 28, 2025
@StylusFrost StylusFrost requested review from a team as code owners November 28, 2025 12:53
@StylusFrost StylusFrost added the no-changelog Skip including change in changelog/release notes label Nov 28, 2025
@github-actions github-actions bot added github_actions Pull requests that update GitHub Actions code component/ui labels Nov 28, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

StylusFrost and others added 2 commits November 28, 2025 14:08
- Eliminated the waitForPageLoad method call in the SignUpPage class to streamline the test execution process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/ui github_actions Pull requests that update GitHub Actions code no-changelog Skip including change in changelog/release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants