fix(tracker): 11.0.0 + 7.0.0; changelogs; tests
This commit is contained in:
parent
cc34356294
commit
c0f3027067
7 changed files with 29 additions and 9 deletions
|
|
@ -1,3 +1,7 @@
|
|||
## 7.0.0
|
||||
|
||||
- canvas suppoert
|
||||
|
||||
## 6.0.3
|
||||
|
||||
- expose assist version to window as `__OR_ASSIST_VERSION`
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@openreplay/tracker-assist",
|
||||
"description": "Tracker plugin for screen assistance through the WebRTC",
|
||||
"version": "6.0.4-57",
|
||||
"version": "7.0.0",
|
||||
"keywords": [
|
||||
"WebRTC",
|
||||
"assistance",
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
"build-cjs": "rm -Rf cjs && tsc --project tsconfig-cjs.json && echo '{ \"type\": \"commonjs\" }' > cjs/package.json && bun run replace-paths && bun run replace-req-version",
|
||||
"replace-paths": "replace-in-files cjs/* --string='@openreplay/tracker' --replacement='@openreplay/tracker/cjs' && replace-in-files cjs/* --string='/lib/' --replacement='/'",
|
||||
"replace-pkg-version": "sh pkgver.sh",
|
||||
"replace-req-version": "replace-in-files lib/* cjs/* --string='REQUIRED_TRACKER_VERSION' --replacement='9.0.0'",
|
||||
"replace-req-version": "replace-in-files lib/* cjs/* --string='REQUIRED_TRACKER_VERSION' --replacement='11.0.0'",
|
||||
"prepublishOnly": "bun run test && bun run build",
|
||||
"prepare": "cd ../../ && husky install tracker/.husky/",
|
||||
"lint-front": "lint-staged",
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
"socket.io-client": "^4.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@openreplay/tracker": ">=10.0.3"
|
||||
"@openreplay/tracker": ">=11.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@openreplay/tracker": "file:../tracker",
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
export const pkgVersion = '6.0.4-57'
|
||||
export const pkgVersion = '7.0.0'
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
- canvas support
|
||||
- some safety guards for iframe components
|
||||
- user testing module
|
||||
|
||||
# 10.0.2
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@openreplay/tracker",
|
||||
"description": "The OpenReplay tracker main package",
|
||||
"version": "10.0.3-55",
|
||||
"version": "11.0.0",
|
||||
"keywords": [
|
||||
"logging",
|
||||
"replay"
|
||||
|
|
|
|||
|
|
@ -7,12 +7,25 @@ jest.mock('../main/modules/userTesting/recorder.js')
|
|||
jest.mock('../main/modules/userTesting/styles.js')
|
||||
jest.mock('../main/modules/userTesting/dnd.js')
|
||||
|
||||
// @ts-ignore
|
||||
global.fetch = jest.fn().mockResolvedValue({
|
||||
status: 200,
|
||||
// @ts-ignore
|
||||
json: jest.fn().mockResolvedValue(true),
|
||||
})
|
||||
|
||||
describe('UserTestManager', () => {
|
||||
let userTestManager: UserTestManager
|
||||
let mockAppInstance
|
||||
beforeEach(() => {
|
||||
document.body.innerHTML = ''
|
||||
mockAppInstance = jest.fn()
|
||||
mockAppInstance = {
|
||||
sessionStorage: { getItem: () => null },
|
||||
timestamp: () => 0,
|
||||
options: {
|
||||
ingestPoint: 'https://localhost:3000/i',
|
||||
},
|
||||
}
|
||||
userTestManager = new UserTestManager(mockAppInstance as unknown as mockApp)
|
||||
})
|
||||
|
||||
|
|
@ -24,7 +37,9 @@ describe('UserTestManager', () => {
|
|||
|
||||
test('should show a widget with descriptions and tasks', () => {
|
||||
userTestManager.createGreeting('Hello', true, true)
|
||||
userTestManager.showWidget(['Desc1'], [{ title: 'Task1', description: 'Task1 Description' }])
|
||||
userTestManager.showWidget('Desc1', [
|
||||
{ task_id: 1, allow_typing: false, title: 'Task1', description: 'Task1 Description' },
|
||||
])
|
||||
expect(document.body.innerHTML).toContain('Desc1')
|
||||
expect(document.body.innerHTML).toContain('Task1')
|
||||
})
|
||||
|
|
@ -35,14 +50,14 @@ describe('UserTestManager', () => {
|
|||
})
|
||||
|
||||
test('should create a description section', () => {
|
||||
const descriptionSection = userTestManager.createDescriptionSection(['Desc1'])
|
||||
const descriptionSection = userTestManager.createDescriptionSection('Desc1')
|
||||
expect(descriptionSection).toBeDefined()
|
||||
expect(descriptionSection.innerHTML).toContain('Desc1')
|
||||
})
|
||||
|
||||
test('should create tasks section', () => {
|
||||
const tasksSection = userTestManager.createTasksSection([
|
||||
{ title: 'Task1', description: 'Desc1' },
|
||||
{ title: 'Task1', description: 'Desc1', task_id: 1, allow_typing: false },
|
||||
])
|
||||
expect(tasksSection).toBeDefined()
|
||||
expect(tasksSection.innerHTML).toContain('Task1')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue