Skip to content

Commit

Permalink
feat(project): test cases for analytics
Browse files Browse the repository at this point in the history
- add params test cases for `oaid` and `fed`
  • Loading branch information
AntonLantukh committed Jun 1, 2023
1 parent 08aeb40 commit 2abf28b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 9 deletions.
18 changes: 9 additions & 9 deletions test-cases/analytics/init.feature
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Feature: Analytics - Initialization

# `225tvq1i` config can be used
# List of expected params for `e` event: `pss`, `oos`, `oosv`, `sdk`, `aid`, `bun`, `fed`, `id`, `t`, `emi`, `pli`
# List of expected params for `s` event: `pss`, `oos`, `oosv`, `sdk`, `aid`, `bun`, `fed`, `id`, `t`, `emi`, `pli`, `ti`, `pw`, `q`
# List of expected params for `e` event: `pss`, `oos`, `oosv`, `sdk`, `aid`, `bun`, `fed`, `id`, `t`, `emi`, `pli`, `oaid` (if subscription enabled)
# List of expected params for `s` event: `pss`, `oos`, `oosv`, `sdk`, `aid`, `bun`, `fed`, `id`, `t`, `emi`, `pli`, `ti`, `pw`, `q`, `oaid` (if subscription enabled)
# Params which have constant values and need to be redifined manually: `pss`, `oos`, `oosv`, `sdk`

Scenario: Watching the video from the beginning (`e` event)
Expand All @@ -12,6 +12,13 @@ Feature: Analytics - Initialization
Then Expect `e` event to be sent with params from the list in the comment above
Then Expect sent params to have correct values

Scenario: Watching the video from the Continue Watching section (`e` event)
Given Start watching the video "Elephants Dream" from Continue Watching (`e` event)
When Watch the video from "03:00 to 03:05"
Then Expect `e` event to be the first event sent
Then Expect `e` event to be sent with params from the list in the comment above
Then Expect sent params to have correct values

Scenario: Watching the video from the beginning (`s` event)
Given Start watching the video "Elephants Dream" (`s` event)
When Watch the video from "00:00 to 00:05"
Expand All @@ -20,13 +27,6 @@ Feature: Analytics - Initialization
Then Expect `q` param to reflect the number of quantiles, `ti` to equal 0 and `pw` to equal 0 as well.
Then Expect other params from the list to have correct values

Scenario: Watching the video from the Continue Watching section (`e` event)
Given Start watching the video "Elephants Dream" from Continue Watching (`e` event)
When Watch the video from "03:00 to 03:05"
Then Expect `e` event to be the first event sent
Then Expect `e` event to be sent with params from the list in the comment above
Then Expect sent params to have correct values

Scenario: Watching the the video from the Continue Watching section (`s` event)
Given Start watching the video "Elephants Dream" Continue Watching (`s` event)
When Watch the video from "03:00 to 03:05"
Expand Down
21 changes: 21 additions & 0 deletions test-cases/analytics/params.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Feature: Analytics - Initialization

# `225tvq1i` config can be used

Scenario: Watching the video from the beginning with SVOD access model (`e` event)
Given Start watching the video "Elephants Dream"
When Watch the video from "00:00 to 00:30"
Then Expect `e`, `s` and `t` events to be sent with `oaid` param
Then Expect `oaid` to equal the id of the client

Scenario: Watching the video from the beginning, opening it from the Home page
Given Click on "Elephants Dream" card on the Home page
When Watch the video from "00:00 to 00:30"
Then Expect `e`, `s` and `t` events to be sent with `fed` param
Then Expect `fed` to equal the playlist which includes "Elephants Dream" video

Scenario: Watching the video from the beginning, opening it from the Continue Watching section
Given Click on "Elephants Dream" card on the Home page (Continue Watching section)
When Watch 30 seconds of the video
Then Expect `e`, `s` and `t` events to be sent with `fed` param
Then Expect `fed` to equal `continueWatchingList` id of the app config

0 comments on commit 2abf28b

Please sign in to comment.