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

Implement missing VAST 4.1 trackers #333

Merged
merged 9 commits into from
Oct 22, 2019
Merged

Conversation

ZacharieTFR
Copy link
Contributor

@ZacharieTFR ZacharieTFR commented Oct 11, 2019

Description

Implemented following missing trackers:

  • notUsed
  • otherAdInteraction
  • acceptInvitation
  • adExpand
  • adCollapse
  • minimize
  • overlayViewDuration

Issue

Implement missing VAST 4.1 trackers

TODO

  • Write unit tests
  • Edit documentation

Type

  • Breaking change
  • Enhancement
  • Fix
  • Documentation
  • Tooling

@ZacharieTFR ZacharieTFR changed the title WIP: Implement missing VAST 4.1 trackers Implement missing VAST 4.1 trackers Oct 15, 2019
@ZacharieTFR ZacharieTFR removed the wip Work in progress label Oct 15, 2019
@ZacharieTFR ZacharieTFR added 3.0 3.0 roadmap and removed breaking-change labels Oct 16, 2019
docs/api/vast-tracker.md Show resolved Hide resolved
docs/api/vast-tracker.md Outdated Show resolved Hide resolved
spec/samples/inline_trackers.js Outdated Show resolved Hide resolved
spec/vast_trackers.spec.js Show resolved Hide resolved
spec/vast_trackers.spec.js Outdated Show resolved Hide resolved
src/vast_tracker.js Show resolved Hide resolved
spec/vast_trackers.spec.js Outdated Show resolved Hide resolved
Copy link
Contributor

@kobawan kobawan left a comment

Choose a reason for hiding this comment

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

LGTM! Let's get another approval and then you can merge it :)

Copy link
Contributor

@clementFrancon clementFrancon left a comment

Choose a reason for hiding this comment

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

Small comment otherwise LGTM :)


it('should have emitted minimize event and called trackUrl', () => {
expect(spyEmitter).toHaveBeenCalledWith('minimize', {
trackingURLTemplates: ['http://example.com/linear-minimize']
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this use the value from the ad object instead of hard coding it ? Same for all other hard coded values

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True, i replaced it.

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually I disagree with this change, because if one day we change the sample file and accidentally remove trackingURLTemplates in the unit test it would pass because undefined === undefined. So we could either keep the hardcoded values, or we add another expect to make sure the value is not undefined or null. Let's discuss this :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IMO the second option is better (add another expect). For instance if a macro needs to be added to any URL from the sample file, each hardcoded value will have to be updated. It is not a big deal but if we can avoid that 😅

@ZacharieTFR ZacharieTFR merged commit d252ada into 3.0-version Oct 22, 2019
@ZacharieTFR ZacharieTFR deleted the missing-4.1-trackers branch October 22, 2019 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants