Skip to content

Commit

Permalink
Fix tests on IE
Browse files Browse the repository at this point in the history
  • Loading branch information
amortemousque committed Sep 20, 2023
1 parent 5170675 commit 271831d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/rum-core/src/domain/view/trackViews.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import type { ViewEvent } from './trackViews'
import { SESSION_KEEP_ALIVE_INTERVAL, THROTTLE_VIEW_UPDATE_PERIOD, KEEP_TRACKING_AFTER_VIEW_DELAY } from './trackViews'
import type { ViewTest } from './setupViewTest.specHelper'
import { setupViewTest } from './setupViewTest.specHelper'
import { isLayoutShiftSupported } from './viewMetrics/trackCumulativeLayoutShift'

describe('track views automatically', () => {
let setupBuilder: TestSetupBuilder
Expand Down Expand Up @@ -380,6 +381,9 @@ describe('view metrics', () => {

describe('common view metrics', () => {
it('should be updated when notified with a PERFORMANCE_ENTRY_COLLECTED event (throttled)', () => {
if (!isLayoutShiftSupported()) {
pending('CLS web vital not supported')
}
const { lifeCycle, clock } = setupBuilder.withFakeClock().build()
const { getViewUpdateCount, getViewUpdate } = viewTest

Expand All @@ -402,6 +406,9 @@ describe('view metrics', () => {
})

it('should not be updated after view end', () => {
if (!isLayoutShiftSupported()) {
pending('CLS web vital not supported')
}
const { lifeCycle, clock } = setupBuilder.withFakeClock().build()
const { getViewUpdate, getViewUpdateCount, getViewCreateCount, startView } = viewTest
startView()
Expand Down

0 comments on commit 271831d

Please sign in to comment.