@playpilot/tpi 8.26.1 → 8.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/editorial.mount.js +9 -9
- package/dist/link-injections.js +1 -1
- package/dist/mount.js +8 -8
- package/package.json +1 -1
- package/src/lib/{pixel.ts → retargeting.ts} +1 -1
- package/src/routes/components/Explore/Routes/ExploreResults.svelte +2 -2
- package/src/routes/components/Genres.svelte +2 -2
- package/src/routes/components/InjectionPopover.svelte +2 -2
- package/src/routes/components/Modals/RailModal.svelte +32 -8
- package/src/routes/components/Modals/TitleModal.svelte +2 -2
- package/src/routes/components/Modals/TitlesReelModal.svelte +34 -5
- package/src/routes/components/Participant.svelte +160 -160
- package/src/routes/components/Playlinks/Playlink.svelte +2 -2
- package/src/routes/components/Tracking/TrackingPixelsForTitleDataPerLink.svelte +2 -2
- package/src/tests/lib/{pixel.test.js → retargeting.test.js} +8 -8
- package/src/tests/routes/components/InjectionPopover.test.js +2 -2
- package/src/tests/routes/components/Modals/TitleModal.test.js +2 -2
- package/src/tests/routes/components/Playlinks/Playlink.test.js +2 -2
- package/src/tests/routes/components/Playlinks/Playlinks.test.js +2 -2
- package/src/tests/routes/components/Title.test.js +2 -2
- package/.github/workflows/create-asana-attachment.yml +0 -18
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { hasConsentedTo } from '$lib/consent'
|
|
2
|
-
import {
|
|
2
|
+
import { isRetargetingAllowed } from '$lib/retargeting'
|
|
3
3
|
import { getUserId } from '$lib/user'
|
|
4
4
|
import { RETARGETING_USER_ID_KEY } from '@playpilot/retargeting-tracking'
|
|
5
5
|
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
|
@@ -12,7 +12,7 @@ vi.mock('$lib/user', () => ({
|
|
|
12
12
|
getUserId: vi.fn(),
|
|
13
13
|
}))
|
|
14
14
|
|
|
15
|
-
describe('
|
|
15
|
+
describe('retargeting.ts', () => {
|
|
16
16
|
beforeEach(() => {
|
|
17
17
|
// @ts-ignore
|
|
18
18
|
window.PlayPilotLinkInjections = {}
|
|
@@ -28,35 +28,35 @@ describe('pixel.ts', () => {
|
|
|
28
28
|
vi.mocked(hasConsentedTo).mockImplementation(() => true)
|
|
29
29
|
window.PlayPilotLinkInjections.config = null
|
|
30
30
|
|
|
31
|
-
expect(
|
|
31
|
+
expect(isRetargetingAllowed()).toBe(false)
|
|
32
32
|
})
|
|
33
33
|
|
|
34
34
|
it('Should return false if config object is without allow_retargeting_pixels', () => {
|
|
35
35
|
vi.mocked(hasConsentedTo).mockImplementation(() => true)
|
|
36
36
|
window.PlayPilotLinkInjections.config = { something: true }
|
|
37
37
|
|
|
38
|
-
expect(
|
|
38
|
+
expect(isRetargetingAllowed()).toBe(false)
|
|
39
39
|
})
|
|
40
40
|
|
|
41
41
|
it('Should return false if config object is allow_retargeting_pixels is false', () => {
|
|
42
42
|
vi.mocked(hasConsentedTo).mockImplementation(() => true)
|
|
43
43
|
window.PlayPilotLinkInjections.config = { allow_retargeting_pixels: false }
|
|
44
44
|
|
|
45
|
-
expect(
|
|
45
|
+
expect(isRetargetingAllowed()).toBe(false)
|
|
46
46
|
})
|
|
47
47
|
|
|
48
48
|
it('Should return true if config object is allow_retargeting_pixels is true', () => {
|
|
49
49
|
vi.mocked(hasConsentedTo).mockImplementation(() => true)
|
|
50
50
|
window.PlayPilotLinkInjections.config = { allow_retargeting_pixels: true }
|
|
51
51
|
|
|
52
|
-
expect(
|
|
52
|
+
expect(isRetargetingAllowed()).toBe(true)
|
|
53
53
|
})
|
|
54
54
|
|
|
55
55
|
it('Should return false if config object is allow_retargeting_pixels is true but hasConsentedTo is false', () => {
|
|
56
56
|
vi.mocked(hasConsentedTo).mockImplementation(() => false)
|
|
57
57
|
window.PlayPilotLinkInjections.config = { allow_retargeting_pixels: true }
|
|
58
58
|
|
|
59
|
-
expect(
|
|
59
|
+
expect(isRetargetingAllowed()).toBe(false)
|
|
60
60
|
})
|
|
61
61
|
|
|
62
62
|
it('Should set user id on window', () => {
|
|
@@ -67,7 +67,7 @@ describe('pixel.ts', () => {
|
|
|
67
67
|
// @ts-ignore
|
|
68
68
|
expect(window[RETARGETING_USER_ID_KEY]).not.toBeTruthy()
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
isRetargetingAllowed()
|
|
71
71
|
|
|
72
72
|
// @ts-ignore
|
|
73
73
|
expect(window[RETARGETING_USER_ID_KEY]).toBe('abc')
|
|
@@ -11,8 +11,8 @@ vi.mock('$lib/tracking', () => ({
|
|
|
11
11
|
track: vi.fn(),
|
|
12
12
|
}))
|
|
13
13
|
|
|
14
|
-
vi.mock('$lib/
|
|
15
|
-
|
|
14
|
+
vi.mock('$lib/retargeting', () => ({
|
|
15
|
+
isRetargetingAllowed: vi.fn(),
|
|
16
16
|
}))
|
|
17
17
|
|
|
18
18
|
vi.mock('svelte', async (importActual) => ({
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
name: Asana
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
types: [opened, synchronize, reopened, edited]
|
|
6
|
-
|
|
7
|
-
jobs:
|
|
8
|
-
create-asana-attachment-job:
|
|
9
|
-
runs-on: ubuntu-latest
|
|
10
|
-
name: Create pull request attachments on Asana tasks
|
|
11
|
-
steps:
|
|
12
|
-
- name: Create pull request attachments
|
|
13
|
-
uses: Asana/create-app-attachment-github-action@latest
|
|
14
|
-
id: postAttachment
|
|
15
|
-
with:
|
|
16
|
-
asana-secret: ${{ secrets.ASANA_SECRET }}
|
|
17
|
-
- name: Log output status
|
|
18
|
-
run: echo "Status is ${{ steps.postAttachment.outputs.status }}"
|