Conversation
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
Signed-off-by: Harshit Kandpal <kandpalhar@gmail.com>
|
@patzielinski please review |
patzielinski
left a comment
There was a problem hiding this comment.
Thanks for opening this, @HarK-github.
In addition to the items that I've flagged, please also check off the appropriate boxes in the pull request template (the checklist was left empty).
Once you've addressed these items, I'm going to take a second review pass. Let me know if you have questions. Thanks!
.github/workflows/playwright.yml
Outdated
| - name: Run Playwright tests | ||
| run: npx playwright test | ||
| - uses: actions/upload-artifact@v4 | ||
| if: ${{ !cancelled() }} |
There was a problem hiding this comment.
What is this line for?
There was a problem hiding this comment.
This is for uploading the test reports. In this case it will upload and store tests reports regardless of whether if it fails or pass.
There was a problem hiding this comment.
Yes, but why is there the if statement?
.github/workflows/playwright.yml
Outdated
There was a problem hiding this comment.
Can you add this as another job to the Frontend CI?
|
@patzielinski could you please review remaining code |
|
@patzielinski I have fixed some tests and frontend ci is running the tests successfully . |
Description
References Issue: #31
This pull request introduces the initial automated end-to-end test suite for the gittuf Security Explorer using Playwright. As these are the first E2E tests for the project, the focus is on establishing foundation for testing repository selection, commit browsing, and metadata visualization.
Key features of this initial setup:
Base Repository Selection Logic
Established the core flow for connecting to repositories. The tests are designed to handle the transition from the initial landing state to a "Connected" state, ensuring the UI has successfully processed repository metadata before proceeding.
For testing purposes, demo repository is used to generate interactions.
Commit Browsing and Analysis
Created the first tests for the commit list component. These include logic to ensure the "Browse Commits" view is correctly populated and accessible, even when application defaults might trigger automatic transitions to other views.
Visualization Rendering Foundation
Introduced specialized tests for the Trust Graph and JSON Tree View. These tests implement wait-logic for loading overlays and verify that the complex rendering components (Canvas and SVG) are correctly initialized in the DOM.
Resilient Synchronization Patterns
Given the variable latency of Git operations, this setup implements strategic timeouts and visibility checks. By avoiding static sleeps and instead waiting for specific UI markers, the suite provides a stable framework that reduces flakiness in CI environments.
AI Usage
I used generative AI to help diagnose race conditions between the React state transitions and the Playwright test runner during this initial setup. The AI provided guidance on utilizing role-based locators. I manually reviewed all outputs, aligned them with Playwright best practices, and integrated the logic into the final test code to ensure a high-performance testing foundation.
Contributor Checklist