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

Update mojmaxtv.hrvatskitelekom.hr.config.js #2696

Closed
wants to merge 5 commits into from

Conversation

nirvana-7777
Copy link
Contributor

Add more details e.g. images
Fix categories
Add ratings

- More details, e.g. images
- Add rating
- Fix categories
Copy link
Collaborator

@freearhey freearhey left a comment

Choose a reason for hiding this comment

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

Tests failed:

npm test --- mojmaxtv.hrvatskitelekom.hr

> test
> run-script-os mojmaxtv.hrvatskitelekom.hr


> test:default
> TZ=Pacific/Nauru npx jest --runInBand mojmaxtv.hrvatskitelekom.hr

 FAIL  sites/mojmaxtv.hrvatskitelekom.hr/mojmaxtv.hrvatskitelekom.hr.test.js
  ✓ can generate valid url (6 ms)
  ✕ can generate valid request headers (9 ms)
  ✕ can parse response (53 ms)
  ✓ can handle empty guide (1 ms)

  ● can generate valid request headers

    expect(received).toMatchObject(expected)

    - Expected  - 4
    + Received  + 4

      Object {
        "app_key": "GWaBW4RTloLwpUgYVzOiW5zUxFLmoMj5",
        "app_version": "02.0.1080",
    -   "device-id": "a78f079d-5527-46d8-af3f-9f0b6b6fb758",
    -   "x-request-session-id": "fc96c9de-7a3b-4b51-8b9d-5d9f9a3c3268",
    -   "x-request-tracking-id": "05a8f0bc-f977-4754-b8ad-1d4d1bd742fb",
    -   "x-user-agent": "web|web|Chrome-128|02.0.1080|1",
    +   "device-id": "7f18d652-2e7a-4d0d-9941-6b84b2a9d1e0",
    +   "x-request-session-id": "f88f44f1-fea3-4a91-b163-6113f2fd2b66",
    +   "x-request-tracking-id": "4e287871-e154-445f-a2b0-a94b56ce8ed0",
    +   "x-user-agent": "web|web|Chrome-133|02.0.1080|1",
      }

      43 |
      44 | it('can generate valid request headers', () => {
    > 45 |   expect(request.headers).toMatchObject({
         |                           ^
      46 |     app_key: 'GWaBW4RTloLwpUgYVzOiW5zUxFLmoMj5',
      47 |     app_version: '02.0.1080',
      48 |     'device-id': 'a78f079d-5527-46d8-af3f-9f0b6b6fb758',

      at Object.toMatchObject (sites/mojmaxtv.hrvatskitelekom.hr/mojmaxtv.hrvatskitelekom.hr.test.js:45:27)

  ● can parse response

    expect(received).toMatchObject(expected)

    - Expected  - 3
    + Received  + 1

    @@ -1,9 +1,7 @@
      Object {
    -   "categories": Array [
    -     "Dokumentarni",
    -   ],
    +   "categories": Array [],
        "date": "2023",
        "episode": 8,
        "season": 3,
        "start": "2025-01-23T23:16:00.00Z",
        "stop": "2025-01-24T00:08:00.00Z",

      59 |
      60 |   expect(results.length).toBe(17)
    > 61 |   expect(results[0]).toMatchObject({
         |                      ^
      62 |     title: 'Planet Zemlja: Junaci',
      63 |     categories: ['Dokumentarni'],
      64 |     season: 3,

      at Object.toMatchObject (sites/mojmaxtv.hrvatskitelekom.hr/mojmaxtv.hrvatskitelekom.hr.test.js:61:22)

Test Suites: 1 failed, 1 total
Tests:       2 failed, 2 passed, 4 total
Snapshots:   0 total
Time:        0.79 s
Ran all test suites matching /mojmaxtv.hrvatskitelekom.hr/i.

@nirvana-7777
Copy link
Contributor Author

Will post a new pull request with working tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants