Skip to content
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

feat: Sync attachments to assets directory #285

Merged
merged 9 commits into from
Apr 10, 2024
Merged

feat: Sync attachments to assets directory #285

merged 9 commits into from
Apr 10, 2024

Conversation

tianfeng92
Copy link
Contributor

@tianfeng92 tianfeng92 commented Apr 8, 2024

Description

Control the sync assets feature using the SAUCE_SYNC_WEB_ASSETS global environment variable.

Disable: https://app.saucelabs.com/tests/a6e633b579024eb58834d731b8bc2bc4
Enable: https://app.saucelabs.com/tests/0cec845a9e6d4937a28bab44d7c13da1

@tianfeng92 tianfeng92 marked this pull request as ready for review April 9, 2024 21:15
@tianfeng92 tianfeng92 requested a review from a team as a code owner April 9, 2024 21:15
@mhan83
Copy link
Contributor

mhan83 commented Apr 9, 2024

I'm getting mixed up so I'm gonna ask a dumb question: For the case where SAUCE_SYNC_WEB_ASSETS is disabled, if I do want to use the retain feature, I need to include __assets__ in the path? Will this work?:

artifacts:
  retain:
    "__assets__/cypress/screenshots": "screenshots.zip"
  download:
    when: always
    match:
      - "*"
    directory: ./artifacts/
     
env:
  SAUCE_SYNC_WEB_ASSETS: false

@tianfeng92
Copy link
Contributor Author

I'm getting mixed up so I'm gonna ask a dumb question: For the case where SAUCE_SYNC_WEB_ASSETS is disabled, if I do want to use the retain feature, I need to include __assets__ in the path? Will this work?:

artifacts:
  retain:
    "__assets__/cypress/screenshots": "screenshots.zip"
  download:
    when: always
    match:
      - "*"
    directory: ./artifacts/
     
env:
  SAUCE_SYNC_WEB_ASSETS: false

Yep. This works. The screenshots.zip and all of the screenshots under __assets__/cypress/screenshots will be uploaded, flattened.

@tianfeng92
Copy link
Contributor Author

All tests running on Firefox 124 encountered failures; the browser froze after executing the first spec.

Cypress has resolved this issue in version 13.7.1.

@tianfeng92 tianfeng92 merged commit b9f4a7b into main Apr 10, 2024
27 of 32 checks passed
@tianfeng92 tianfeng92 deleted the DEVX-2834 branch April 10, 2024 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants