Skip to content

Add video display in tests - #400

Merged
anshooarora merged 6 commits into
extent-framework:masterfrom
grasshopper7:video
Jun 19, 2024
Merged

Add video display in tests#400
anshooarora merged 6 commits into
extent-framework:masterfrom
grasshopper7:video

Conversation

@grasshopper7

Copy link
Copy Markdown
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
Copy Markdown
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
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