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

Add video display in tests #400

Merged
merged 6 commits into from
Jun 19, 2024
Merged

Conversation

grasshopper7
Copy link
Contributor

For #391 to add video files to tests. Supports base64 too, coded similar to excisting ScreenCapture class.

vid

The sample (src/test/resources folder) 'vid.mp4' is a free video from this location, trimmed to 1 sec. - https://pixabay.com/videos/tv-test-pattern-color-television-31851/

import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;

public class MediaTypeAdapter extends TypeAdapter<Media> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for writing tests for this :)

This was causing several 403 issues: https://github.com/extent-framework/extentreports-java/actions/runs/9579125973/job/26410971673?pr=400

```
Error: HTTP Status 403 for request POST https://api.github.com/repos/extent-framework/extentreports-java/dependency-graph/snapshots
Error: Response body:
{
  "message": "Resource not accessible by integration",
  "documentation_url": "https://docs.github.com/rest/dependency-graph/dependency-submission#create-a-snapshot-of-dependencies-for-a-repository",
  "status": "403"
}
Error: Resource not accessible by integration
Error: HttpError: Resource not accessible by integration
    at /home/runner/work/_actions/advanced-security/maven-dependency-submission-action/571e99aab1055c2e71a1e2309b9691de18d6b7d6/webpack:/maven-dependency-tree-action/node_modules/@github/dependency-submission-toolkit/dist/index.js:5317:1
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

/home/runner/work/_actions/advanced-security/maven-dependency-submission-action/571e99aab1055c2e71a1e2309b9691de18d6b7d6/webpack:/maven-dependency-tree-action/node_modules/@github/dependency-submission-toolkit/dist/index.js:396
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
^
Error: Failed to submit snapshot: HttpError: Resource not accessible by integration
    at /home/runner/work/_actions/advanced-security/maven-dependency-submission-action/571e99aab1055c2e71a1e2309b9691de18d6b7d6/webpack:/maven-dependency-tree-action/node_modules/@github/dependency-submission-toolkit/dist/index.js:499:1
    at Generator.throw (<anonymous>)
    at rejected (/home/runner/work/_actions/advanced-security/maven-dependency-submission-action/571e99aab1055c2e71a1e2309b9691de18d6b7d6/webpack:/maven-dependency-tree-action/node_modules/@github/dependency-submission-toolkit/dist/index.js:396:1)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
```
@anshooarora anshooarora merged commit 182c433 into extent-framework:master Jun 19, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants