-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Upgrade/Rollback E2E Tests #8017
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
Conversation
…tion-library-for-js into upgrade-rollback-e2e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces comprehensive end-to-end (E2E) testing infrastructure for the ExpressSample with upgrade/downgrade testing capabilities, along with authentication flow improvements and UI enhancements.
- Adds E2E test infrastructure with Puppeteer-based tests for version switching and authentication scenarios
- Enhances authentication data handling to return full MSAL response and display raw authentication data alongside profile information
- Improves version switching logic with consistent naming and better UI feedback
Reviewed Changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
test/upgrade-downgrade.spec.ts |
E2E tests for cache compatibility across MSAL versions |
test/test-helpers.ts |
Helper functions for E2E testing including authentication and version switching |
jest.config.cjs |
Jest configuration for E2E testing |
.env.e2e |
Environment configuration for E2E tests |
tsconfig.json |
TypeScript configuration for test files |
server.js |
Version key updates and middleware cleanup |
public/js/auth.js |
Modified to return full authentication response |
public/js/graph.js |
Updated to handle and display authentication data |
public/js/versionSwitcher.js |
Added unique IDs and improved UI initialization |
public/js/app.js |
UI element visibility improvements |
views/partials/profile-content.hbs |
Added raw authentication data display section |
views/partials/home-content.hbs |
Added ID to profile button for E2E testing |
views/layouts/main.hbs |
Hidden UI elements until handlers are registered |
views/error.hbs |
Updated CSS class for consistency |
public/css/styles.css |
Renamed CSS classes and minor formatting improvements |
package.json |
Added E2E testing dependencies and scripts |
samples/e2eTestUtils/src/TestUtils.ts |
Enhanced screenshot utility for full-page captures |
.pipelines/3p-e2e.yml |
Added ExpressSample to E2E test pipeline |
samples/msal-browser-samples/ExpressSample/test/test-helpers.ts
Outdated
Show resolved
Hide resolved
samples/msal-browser-samples/ExpressSample/test/upgrade-downgrade.spec.ts
Outdated
Show resolved
Hide resolved
samples/msal-browser-samples/ExpressSample/views/layouts/main.hbs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request introduces a new end-to-end (E2E) test setup for the
ExpressSample
in the MSAL browser samples, along with several improvements to the sample app's authentication flow, version switching, and UI. The most significant changes are the addition of E2E test infrastructure, enhancements to how authentication and profile data are handled and displayed, and improvements to the version switching logic and UI.E2E Test Infrastructure and Configuration:
ExpressSample
, including a new.env.e2e
file, ajest.config.cjs
configuration, and atest-helpers.ts
utility for Puppeteer-based tests. This enables automated browser testing of authentication scenarios. [1] [2] [3]ExpressSample
in E2E test runs.package.json
.Authentication and Profile Data Handling:
Version Switching and UI Improvements:
latest-v3
instead of3.x
) and improved the UI for version selection, including unique IDs for dropdown items and better feedback when switching versions. [1] [2] [3] [4] [5] [6]UI and Styling Enhancements:
.json-content
for displaying JSON data, improving clarity and maintainability. [1] [2]Other Improvements:
morgan
) from the server and cleaned up middleware usage. [1] [2]These changes collectively improve the testability, usability, and maintainability of the
ExpressSample
app and its E2E testing setup.