[CI] Capture Cypress logs on failure (#19114)

This commit is contained in:
Mac Siri 2023-02-14 09:53:47 -05:00 committed by GitHub
parent 8e0b5bc0f5
commit 83dbca39ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -215,7 +215,9 @@ jobs:
if: failure()
with:
name: cypress-snapshots
path: tmp/cypress_screenshots
path: |
tmp/cypress_screenshots
cypress/logs
- name: Upload test results to BuildPulse for flaky test detection
if: '!cancelled()' # Run this step even when the tests fail. Skip if the workflow is cancelled.
uses: Workshop64/buildpulse-action@master

View file

@ -14,6 +14,8 @@ describe('Logged out Home feed', () => {
cy.findAllByTestId('profile-preview-card')
.first()
.within(() => {
cy.focused(); // Explicitly ask for focused element
cy.findByRole('link', {
name: 'Admin McAdmin',
}).should('have.focus');