Skip to content

Commit

Permalink
address pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
metal-messiah committed Sep 30, 2024
1 parent a15ac86 commit d84c008
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/features/generic_events/aggregate/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { EventBuffer } from '../../utils/event-buffer'
import { applyFnToProps } from '../../../common/util/traverse'
import { IDEAL_PAYLOAD_SIZE } from '../../../common/constants/agent-constants'
import { UserActionsAggregator } from './user-actions/user-actions-aggregator'
import { isIFrameWindow } from '../../../common/dom/iframe'

export class Aggregate extends AggregateBase {
#agentRuntime
Expand Down Expand Up @@ -72,7 +73,7 @@ export class Aggregate extends AggregateBase {
/** The aggregator process only returns an event when it is "done" aggregating -
* so we still need to validate that an event was given to this method before we try to add */
if (aggregatedUserAction?.event) {
const { target, timeStamp, type } = aggregatedUserAction.event
const { target, timeStamp, type, view } = aggregatedUserAction.event
this.addEvent({
eventType: 'UserAction',
timestamp: Math.floor(this.#agentRuntime.timeKeeper.correctRelativeTimestamp(timeStamp)),
Expand All @@ -82,7 +83,7 @@ export class Aggregate extends AggregateBase {
rageClick: aggregatedUserAction.rageClick,
relativeMs: aggregatedUserAction.relativeMs,
target: aggregatedUserAction.selectorPath,
...(aggregatedUserAction.iframe && { iframe: true }),
...(isIFrameWindow(view) && { iframe: true }),
...(target?.id && { targetId: target.id }),
...(target?.tagName && { targetTag: target.tagName }),
...(target?.type && { targetType: target.type }),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { isIFrameWindow } from '../../../../common/dom/iframe'
import { RAGE_CLICK_THRESHOLD_EVENTS, RAGE_CLICK_THRESHOLD_MS } from '../../constants'

export class AggregatedUserAction {
Expand All @@ -9,7 +8,6 @@ export class AggregatedUserAction {
this.relativeMs = [0]
this.selectorPath = selectorPath
this.rageClick = undefined
this.iframe = isIFrameWindow(evt.view)
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/specs/ins/harvesting.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('ins harvesting', () => {
await browser.url(testUrl).then(() => browser.waitForAgentLoad())

const [insHarvests] = await Promise.all([
insightsCapture.waitForResult({ timeout: 5000 }),
insightsCapture.waitForResult({ timeout: 7500 }),
$('#pay-btn').click().then(async () => {
// rage click
await browser.execute(function () {
Expand Down

0 comments on commit d84c008

Please sign in to comment.