From ec99c93fae1fa79ff37700a3553774d162e8ed81 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Wed, 22 Feb 2023 13:24:46 +0100 Subject: [PATCH 1/3] test(replay): Ensure that unicode characters are handled correctly --- .../suites/replay/unicode/compressed/init.js | 18 +++ .../suites/replay/unicode/compressed/test.ts | 33 +++++ .../unicode-compressed-chromium.json | 123 ++++++++++++++++++ .../unicode-compressed-firefox.json | 123 ++++++++++++++++++ .../unicode-compressed-webkit.json | 123 ++++++++++++++++++ .../test.ts-snapshots/unicode-compressed.json | 123 ++++++++++++++++++ .../suites/replay/unicode/subject.js | 6 + .../suites/replay/unicode/template.html | 16 +++ .../replay/unicode/uncompressed/init.js | 18 +++ .../replay/unicode/uncompressed/test.ts | 34 +++++ .../unicode-uncompressed-chromium.json | 123 ++++++++++++++++++ .../unicode-uncompressed-firefox.json | 123 ++++++++++++++++++ .../unicode-uncompressed-webkit.json | 123 ++++++++++++++++++ .../unicode-uncompressed.json | 123 ++++++++++++++++++ 14 files changed, 1109 insertions(+) create mode 100644 packages/integration-tests/suites/replay/unicode/compressed/init.js create mode 100644 packages/integration-tests/suites/replay/unicode/compressed/test.ts create mode 100644 packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json create mode 100644 packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json create mode 100644 packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json create mode 100644 packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json create mode 100644 packages/integration-tests/suites/replay/unicode/subject.js create mode 100644 packages/integration-tests/suites/replay/unicode/template.html create mode 100644 packages/integration-tests/suites/replay/unicode/uncompressed/init.js create mode 100644 packages/integration-tests/suites/replay/unicode/uncompressed/test.ts create mode 100644 packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json create mode 100644 packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json create mode 100644 packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json create mode 100644 packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json diff --git a/packages/integration-tests/suites/replay/unicode/compressed/init.js b/packages/integration-tests/suites/replay/unicode/compressed/init.js new file mode 100644 index 000000000000..86f8f5932ddb --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/compressed/init.js @@ -0,0 +1,18 @@ +import * as Sentry from '@sentry/browser'; + +window.Sentry = Sentry; +window.Replay = new Sentry.Replay({ + flushMinDelay: 500, + flushMaxDelay: 500, + useCompression: true, + maskAllText: false, +}); + +Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + sampleRate: 0, + replaysSessionSampleRate: 1.0, + replaysOnErrorSampleRate: 0.0, + + integrations: [window.Replay], +}); diff --git a/packages/integration-tests/suites/replay/unicode/compressed/test.ts b/packages/integration-tests/suites/replay/unicode/compressed/test.ts new file mode 100644 index 000000000000..741a702fbef9 --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/compressed/test.ts @@ -0,0 +1,33 @@ +import { expect } from '@playwright/test'; + +import { sentryTest } from '../../../../utils/fixtures'; +import { + getFullRecordingSnapshots, + normalize, + shouldSkipReplayTest, + waitForReplayRequest, +} from '../../../../utils/replayHelpers'; + +sentryTest('replay should handle unicode characters', async ({ getLocalTestPath, page }) => { + if (shouldSkipReplayTest()) { + sentryTest.skip(); + } + + const reqPromise0 = waitForReplayRequest(page, 0); + + await page.route('https://dsn.ingest.sentry.io/**/*', route => { + return route.fulfill({ + status: 200, + contentType: 'application/json', + body: JSON.stringify({ id: 'test-id' }), + }); + }); + + const url = await getLocalTestPath({ testDir: __dirname }); + + await page.goto(url); + const snapshots = getFullRecordingSnapshots(await reqPromise0); + + expect(snapshots.length).toEqual(1); + expect(normalize(snapshots[0])).toMatchSnapshot('unicode-compressed.json'); +}); diff --git a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json new file mode 100644 index 000000000000..4f5ddde1d32b --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json @@ -0,0 +1,123 @@ +{ + "node": { + "type": 0, + "childNodes": [ + { + "type": 1, + "name": "html", + "publicId": "", + "systemId": "", + "id": 2 + }, + { + "type": 2, + "tagName": "html", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "head", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "meta", + "attributes": { + "charset": "utf-8" + }, + "childNodes": [], + "id": 5 + } + ], + "id": 4 + }, + { + "type": 3, + "textContent": "\n ", + "id": 6 + }, + { + "type": 2, + "tagName": "body", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n ", + "id": 8 + }, + { + "type": 2, + "tagName": "h1", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "Hi šŸ‘‹šŸ‘‹šŸ‘‹", + "id": 10 + } + ], + "id": 9 + }, + { + "type": 3, + "textContent": "\n ", + "id": 11 + }, + { + "type": 2, + "tagName": "p", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n Adding some unicode characters to the page to make sure they are properly handled. At sentry, we like 🚢🚢🚢. We\n also like šŸ•, šŸŗ and šŸ•. (Some people might actually prefer šŸˆā€ā¬› but the test author is a dog person, so šŸ¤·ā€ā™‚ļø).\n ", + "id": 13 + } + ], + "id": 12 + }, + { + "type": 3, + "textContent": "\n\n ", + "id": 14 + }, + { + "type": 2, + "tagName": "button", + "attributes": { + "id": "go-background" + }, + "childNodes": [ + { + "type": 3, + "textContent": "āœ… Acknowledge", + "id": 16 + } + ], + "id": 15 + }, + { + "type": 3, + "textContent": "\n ", + "id": 17 + }, + { + "type": 3, + "textContent": "\n\nšŸˆā€ā¬›\n", + "id": 18 + } + ], + "id": 7 + } + ], + "id": 3 + } + ], + "id": 1 + }, + "initialOffset": { + "left": 0, + "top": 0 + } +} \ No newline at end of file diff --git a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json new file mode 100644 index 000000000000..4f5ddde1d32b --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json @@ -0,0 +1,123 @@ +{ + "node": { + "type": 0, + "childNodes": [ + { + "type": 1, + "name": "html", + "publicId": "", + "systemId": "", + "id": 2 + }, + { + "type": 2, + "tagName": "html", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "head", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "meta", + "attributes": { + "charset": "utf-8" + }, + "childNodes": [], + "id": 5 + } + ], + "id": 4 + }, + { + "type": 3, + "textContent": "\n ", + "id": 6 + }, + { + "type": 2, + "tagName": "body", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n ", + "id": 8 + }, + { + "type": 2, + "tagName": "h1", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "Hi šŸ‘‹šŸ‘‹šŸ‘‹", + "id": 10 + } + ], + "id": 9 + }, + { + "type": 3, + "textContent": "\n ", + "id": 11 + }, + { + "type": 2, + "tagName": "p", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n Adding some unicode characters to the page to make sure they are properly handled. At sentry, we like 🚢🚢🚢. We\n also like šŸ•, šŸŗ and šŸ•. (Some people might actually prefer šŸˆā€ā¬› but the test author is a dog person, so šŸ¤·ā€ā™‚ļø).\n ", + "id": 13 + } + ], + "id": 12 + }, + { + "type": 3, + "textContent": "\n\n ", + "id": 14 + }, + { + "type": 2, + "tagName": "button", + "attributes": { + "id": "go-background" + }, + "childNodes": [ + { + "type": 3, + "textContent": "āœ… Acknowledge", + "id": 16 + } + ], + "id": 15 + }, + { + "type": 3, + "textContent": "\n ", + "id": 17 + }, + { + "type": 3, + "textContent": "\n\nšŸˆā€ā¬›\n", + "id": 18 + } + ], + "id": 7 + } + ], + "id": 3 + } + ], + "id": 1 + }, + "initialOffset": { + "left": 0, + "top": 0 + } +} \ No newline at end of file diff --git a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json new file mode 100644 index 000000000000..4f5ddde1d32b --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json @@ -0,0 +1,123 @@ +{ + "node": { + "type": 0, + "childNodes": [ + { + "type": 1, + "name": "html", + "publicId": "", + "systemId": "", + "id": 2 + }, + { + "type": 2, + "tagName": "html", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "head", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "meta", + "attributes": { + "charset": "utf-8" + }, + "childNodes": [], + "id": 5 + } + ], + "id": 4 + }, + { + "type": 3, + "textContent": "\n ", + "id": 6 + }, + { + "type": 2, + "tagName": "body", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n ", + "id": 8 + }, + { + "type": 2, + "tagName": "h1", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "Hi šŸ‘‹šŸ‘‹šŸ‘‹", + "id": 10 + } + ], + "id": 9 + }, + { + "type": 3, + "textContent": "\n ", + "id": 11 + }, + { + "type": 2, + "tagName": "p", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n Adding some unicode characters to the page to make sure they are properly handled. At sentry, we like 🚢🚢🚢. We\n also like šŸ•, šŸŗ and šŸ•. (Some people might actually prefer šŸˆā€ā¬› but the test author is a dog person, so šŸ¤·ā€ā™‚ļø).\n ", + "id": 13 + } + ], + "id": 12 + }, + { + "type": 3, + "textContent": "\n\n ", + "id": 14 + }, + { + "type": 2, + "tagName": "button", + "attributes": { + "id": "go-background" + }, + "childNodes": [ + { + "type": 3, + "textContent": "āœ… Acknowledge", + "id": 16 + } + ], + "id": 15 + }, + { + "type": 3, + "textContent": "\n ", + "id": 17 + }, + { + "type": 3, + "textContent": "\n\nšŸˆā€ā¬›\n", + "id": 18 + } + ], + "id": 7 + } + ], + "id": 3 + } + ], + "id": 1 + }, + "initialOffset": { + "left": 0, + "top": 0 + } +} \ No newline at end of file diff --git a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json new file mode 100644 index 000000000000..4f5ddde1d32b --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json @@ -0,0 +1,123 @@ +{ + "node": { + "type": 0, + "childNodes": [ + { + "type": 1, + "name": "html", + "publicId": "", + "systemId": "", + "id": 2 + }, + { + "type": 2, + "tagName": "html", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "head", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "meta", + "attributes": { + "charset": "utf-8" + }, + "childNodes": [], + "id": 5 + } + ], + "id": 4 + }, + { + "type": 3, + "textContent": "\n ", + "id": 6 + }, + { + "type": 2, + "tagName": "body", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n ", + "id": 8 + }, + { + "type": 2, + "tagName": "h1", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "Hi šŸ‘‹šŸ‘‹šŸ‘‹", + "id": 10 + } + ], + "id": 9 + }, + { + "type": 3, + "textContent": "\n ", + "id": 11 + }, + { + "type": 2, + "tagName": "p", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n Adding some unicode characters to the page to make sure they are properly handled. At sentry, we like 🚢🚢🚢. We\n also like šŸ•, šŸŗ and šŸ•. (Some people might actually prefer šŸˆā€ā¬› but the test author is a dog person, so šŸ¤·ā€ā™‚ļø).\n ", + "id": 13 + } + ], + "id": 12 + }, + { + "type": 3, + "textContent": "\n\n ", + "id": 14 + }, + { + "type": 2, + "tagName": "button", + "attributes": { + "id": "go-background" + }, + "childNodes": [ + { + "type": 3, + "textContent": "āœ… Acknowledge", + "id": 16 + } + ], + "id": 15 + }, + { + "type": 3, + "textContent": "\n ", + "id": 17 + }, + { + "type": 3, + "textContent": "\n\nšŸˆā€ā¬›\n", + "id": 18 + } + ], + "id": 7 + } + ], + "id": 3 + } + ], + "id": 1 + }, + "initialOffset": { + "left": 0, + "top": 0 + } +} \ No newline at end of file diff --git a/packages/integration-tests/suites/replay/unicode/subject.js b/packages/integration-tests/suites/replay/unicode/subject.js new file mode 100644 index 000000000000..7aa69584f070 --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/subject.js @@ -0,0 +1,6 @@ +document.getElementById('go-background').addEventListener('click', () => { + Object.defineProperty(document, 'hidden', { value: true, writable: true }); + const ev = document.createEvent('Event'); + ev.initEvent('visibilitychange'); + document.dispatchEvent(ev); +}); diff --git a/packages/integration-tests/suites/replay/unicode/template.html b/packages/integration-tests/suites/replay/unicode/template.html new file mode 100644 index 000000000000..129f91c4d846 --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/template.html @@ -0,0 +1,16 @@ + + + + + + +

Hi šŸ‘‹šŸ‘‹šŸ‘‹

+

+ Adding some unicode characters to the page to make sure they are properly handled. At sentry, we like 🚢🚢🚢. We + also like šŸ•, šŸŗ and šŸ•. (Some people might actually prefer šŸˆā€ā¬› but the test author is a dog person, so šŸ¤·ā€ā™‚ļø). +

+ + + + +šŸˆā€ā¬› diff --git a/packages/integration-tests/suites/replay/unicode/uncompressed/init.js b/packages/integration-tests/suites/replay/unicode/uncompressed/init.js new file mode 100644 index 000000000000..98581679c8b6 --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/uncompressed/init.js @@ -0,0 +1,18 @@ +import * as Sentry from '@sentry/browser'; + +window.Sentry = Sentry; +window.Replay = new Sentry.Replay({ + flushMinDelay: 500, + flushMaxDelay: 500, + useCompression: false, + maskAllText: false, +}); + +Sentry.init({ + dsn: 'https://public@dsn.ingest.sentry.io/1337', + sampleRate: 0, + replaysSessionSampleRate: 1.0, + replaysOnErrorSampleRate: 0.0, + + integrations: [window.Replay], +}); diff --git a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts new file mode 100644 index 000000000000..1ee9d73e5f57 --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts @@ -0,0 +1,34 @@ +import { expect } from '@playwright/test'; + +import { sentryTest } from '../../../../utils/fixtures'; +import { + getFullRecordingSnapshots, + normalize, + shouldSkipReplayTest, + waitForReplayRequest, +} from '../../../../utils/replayHelpers'; + +sentryTest('replay should handle unicode characters', async ({ getLocalTestPath, page }) => { + if (shouldSkipReplayTest()) { + sentryTest.skip(); + } + + const reqPromise0 = waitForReplayRequest(page, 0); + + await page.route('https://dsn.ingest.sentry.io/**/*', route => { + return route.fulfill({ + status: 200, + contentType: 'application/json', + body: JSON.stringify({ id: 'test-id' }), + }); + }); + + const url = await getLocalTestPath({ testDir: __dirname }); + + await page.goto(url); + const snapshots = getFullRecordingSnapshots(await reqPromise0); + + expect(snapshots.length).toEqual(1); + + expect(normalize(snapshots[0])).toMatchSnapshot('unicode-uncompressed.json'); +}); diff --git a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json new file mode 100644 index 000000000000..4f5ddde1d32b --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json @@ -0,0 +1,123 @@ +{ + "node": { + "type": 0, + "childNodes": [ + { + "type": 1, + "name": "html", + "publicId": "", + "systemId": "", + "id": 2 + }, + { + "type": 2, + "tagName": "html", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "head", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "meta", + "attributes": { + "charset": "utf-8" + }, + "childNodes": [], + "id": 5 + } + ], + "id": 4 + }, + { + "type": 3, + "textContent": "\n ", + "id": 6 + }, + { + "type": 2, + "tagName": "body", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n ", + "id": 8 + }, + { + "type": 2, + "tagName": "h1", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "Hi šŸ‘‹šŸ‘‹šŸ‘‹", + "id": 10 + } + ], + "id": 9 + }, + { + "type": 3, + "textContent": "\n ", + "id": 11 + }, + { + "type": 2, + "tagName": "p", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n Adding some unicode characters to the page to make sure they are properly handled. At sentry, we like 🚢🚢🚢. We\n also like šŸ•, šŸŗ and šŸ•. (Some people might actually prefer šŸˆā€ā¬› but the test author is a dog person, so šŸ¤·ā€ā™‚ļø).\n ", + "id": 13 + } + ], + "id": 12 + }, + { + "type": 3, + "textContent": "\n\n ", + "id": 14 + }, + { + "type": 2, + "tagName": "button", + "attributes": { + "id": "go-background" + }, + "childNodes": [ + { + "type": 3, + "textContent": "āœ… Acknowledge", + "id": 16 + } + ], + "id": 15 + }, + { + "type": 3, + "textContent": "\n ", + "id": 17 + }, + { + "type": 3, + "textContent": "\n\nšŸˆā€ā¬›\n", + "id": 18 + } + ], + "id": 7 + } + ], + "id": 3 + } + ], + "id": 1 + }, + "initialOffset": { + "left": 0, + "top": 0 + } +} \ No newline at end of file diff --git a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json new file mode 100644 index 000000000000..4f5ddde1d32b --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json @@ -0,0 +1,123 @@ +{ + "node": { + "type": 0, + "childNodes": [ + { + "type": 1, + "name": "html", + "publicId": "", + "systemId": "", + "id": 2 + }, + { + "type": 2, + "tagName": "html", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "head", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "meta", + "attributes": { + "charset": "utf-8" + }, + "childNodes": [], + "id": 5 + } + ], + "id": 4 + }, + { + "type": 3, + "textContent": "\n ", + "id": 6 + }, + { + "type": 2, + "tagName": "body", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n ", + "id": 8 + }, + { + "type": 2, + "tagName": "h1", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "Hi šŸ‘‹šŸ‘‹šŸ‘‹", + "id": 10 + } + ], + "id": 9 + }, + { + "type": 3, + "textContent": "\n ", + "id": 11 + }, + { + "type": 2, + "tagName": "p", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n Adding some unicode characters to the page to make sure they are properly handled. At sentry, we like 🚢🚢🚢. We\n also like šŸ•, šŸŗ and šŸ•. (Some people might actually prefer šŸˆā€ā¬› but the test author is a dog person, so šŸ¤·ā€ā™‚ļø).\n ", + "id": 13 + } + ], + "id": 12 + }, + { + "type": 3, + "textContent": "\n\n ", + "id": 14 + }, + { + "type": 2, + "tagName": "button", + "attributes": { + "id": "go-background" + }, + "childNodes": [ + { + "type": 3, + "textContent": "āœ… Acknowledge", + "id": 16 + } + ], + "id": 15 + }, + { + "type": 3, + "textContent": "\n ", + "id": 17 + }, + { + "type": 3, + "textContent": "\n\nšŸˆā€ā¬›\n", + "id": 18 + } + ], + "id": 7 + } + ], + "id": 3 + } + ], + "id": 1 + }, + "initialOffset": { + "left": 0, + "top": 0 + } +} \ No newline at end of file diff --git a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json new file mode 100644 index 000000000000..4f5ddde1d32b --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json @@ -0,0 +1,123 @@ +{ + "node": { + "type": 0, + "childNodes": [ + { + "type": 1, + "name": "html", + "publicId": "", + "systemId": "", + "id": 2 + }, + { + "type": 2, + "tagName": "html", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "head", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "meta", + "attributes": { + "charset": "utf-8" + }, + "childNodes": [], + "id": 5 + } + ], + "id": 4 + }, + { + "type": 3, + "textContent": "\n ", + "id": 6 + }, + { + "type": 2, + "tagName": "body", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n ", + "id": 8 + }, + { + "type": 2, + "tagName": "h1", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "Hi šŸ‘‹šŸ‘‹šŸ‘‹", + "id": 10 + } + ], + "id": 9 + }, + { + "type": 3, + "textContent": "\n ", + "id": 11 + }, + { + "type": 2, + "tagName": "p", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n Adding some unicode characters to the page to make sure they are properly handled. At sentry, we like 🚢🚢🚢. We\n also like šŸ•, šŸŗ and šŸ•. (Some people might actually prefer šŸˆā€ā¬› but the test author is a dog person, so šŸ¤·ā€ā™‚ļø).\n ", + "id": 13 + } + ], + "id": 12 + }, + { + "type": 3, + "textContent": "\n\n ", + "id": 14 + }, + { + "type": 2, + "tagName": "button", + "attributes": { + "id": "go-background" + }, + "childNodes": [ + { + "type": 3, + "textContent": "āœ… Acknowledge", + "id": 16 + } + ], + "id": 15 + }, + { + "type": 3, + "textContent": "\n ", + "id": 17 + }, + { + "type": 3, + "textContent": "\n\nšŸˆā€ā¬›\n", + "id": 18 + } + ], + "id": 7 + } + ], + "id": 3 + } + ], + "id": 1 + }, + "initialOffset": { + "left": 0, + "top": 0 + } +} \ No newline at end of file diff --git a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json new file mode 100644 index 000000000000..4f5ddde1d32b --- /dev/null +++ b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json @@ -0,0 +1,123 @@ +{ + "node": { + "type": 0, + "childNodes": [ + { + "type": 1, + "name": "html", + "publicId": "", + "systemId": "", + "id": 2 + }, + { + "type": 2, + "tagName": "html", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "head", + "attributes": {}, + "childNodes": [ + { + "type": 2, + "tagName": "meta", + "attributes": { + "charset": "utf-8" + }, + "childNodes": [], + "id": 5 + } + ], + "id": 4 + }, + { + "type": 3, + "textContent": "\n ", + "id": 6 + }, + { + "type": 2, + "tagName": "body", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n ", + "id": 8 + }, + { + "type": 2, + "tagName": "h1", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "Hi šŸ‘‹šŸ‘‹šŸ‘‹", + "id": 10 + } + ], + "id": 9 + }, + { + "type": 3, + "textContent": "\n ", + "id": 11 + }, + { + "type": 2, + "tagName": "p", + "attributes": {}, + "childNodes": [ + { + "type": 3, + "textContent": "\n Adding some unicode characters to the page to make sure they are properly handled. At sentry, we like 🚢🚢🚢. We\n also like šŸ•, šŸŗ and šŸ•. (Some people might actually prefer šŸˆā€ā¬› but the test author is a dog person, so šŸ¤·ā€ā™‚ļø).\n ", + "id": 13 + } + ], + "id": 12 + }, + { + "type": 3, + "textContent": "\n\n ", + "id": 14 + }, + { + "type": 2, + "tagName": "button", + "attributes": { + "id": "go-background" + }, + "childNodes": [ + { + "type": 3, + "textContent": "āœ… Acknowledge", + "id": 16 + } + ], + "id": 15 + }, + { + "type": 3, + "textContent": "\n ", + "id": 17 + }, + { + "type": 3, + "textContent": "\n\nšŸˆā€ā¬›\n", + "id": 18 + } + ], + "id": 7 + } + ], + "id": 3 + } + ], + "id": 1 + }, + "initialOffset": { + "left": 0, + "top": 0 + } +} \ No newline at end of file From c460bb612ceae44ed812058f571926602faa9d14 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Wed, 22 Feb 2023 14:50:28 +0100 Subject: [PATCH 2/3] remove cat --- packages/integration-tests/suites/replay/unicode/template.html | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/integration-tests/suites/replay/unicode/template.html b/packages/integration-tests/suites/replay/unicode/template.html index 129f91c4d846..7b208aad1cbf 100644 --- a/packages/integration-tests/suites/replay/unicode/template.html +++ b/packages/integration-tests/suites/replay/unicode/template.html @@ -13,4 +13,3 @@

Hi šŸ‘‹šŸ‘‹šŸ‘‹

-šŸˆā€ā¬› From 234dc4f986f3bc77fc18ec570a601b6239a6ab11 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Wed, 22 Feb 2023 15:15:12 +0100 Subject: [PATCH 3/3] update snapshots --- .../test.ts-snapshots/unicode-compressed-chromium.json | 2 +- .../test.ts-snapshots/unicode-compressed-firefox.json | 2 +- .../compressed/test.ts-snapshots/unicode-compressed-webkit.json | 2 +- .../compressed/test.ts-snapshots/unicode-compressed.json | 2 +- .../test.ts-snapshots/unicode-uncompressed-chromium.json | 2 +- .../test.ts-snapshots/unicode-uncompressed-firefox.json | 2 +- .../test.ts-snapshots/unicode-uncompressed-webkit.json | 2 +- .../uncompressed/test.ts-snapshots/unicode-uncompressed.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json index 4f5ddde1d32b..1ffd71d178d8 100644 --- a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json +++ b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-chromium.json @@ -104,7 +104,7 @@ }, { "type": 3, - "textContent": "\n\nšŸˆā€ā¬›\n", + "textContent": "\n\n", "id": 18 } ], diff --git a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json index 4f5ddde1d32b..1ffd71d178d8 100644 --- a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json +++ b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-firefox.json @@ -104,7 +104,7 @@ }, { "type": 3, - "textContent": "\n\nšŸˆā€ā¬›\n", + "textContent": "\n\n", "id": 18 } ], diff --git a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json index 4f5ddde1d32b..1ffd71d178d8 100644 --- a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json +++ b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed-webkit.json @@ -104,7 +104,7 @@ }, { "type": 3, - "textContent": "\n\nšŸˆā€ā¬›\n", + "textContent": "\n\n", "id": 18 } ], diff --git a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json index 4f5ddde1d32b..1ffd71d178d8 100644 --- a/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json +++ b/packages/integration-tests/suites/replay/unicode/compressed/test.ts-snapshots/unicode-compressed.json @@ -104,7 +104,7 @@ }, { "type": 3, - "textContent": "\n\nšŸˆā€ā¬›\n", + "textContent": "\n\n", "id": 18 } ], diff --git a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json index 4f5ddde1d32b..1ffd71d178d8 100644 --- a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json +++ b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-chromium.json @@ -104,7 +104,7 @@ }, { "type": 3, - "textContent": "\n\nšŸˆā€ā¬›\n", + "textContent": "\n\n", "id": 18 } ], diff --git a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json index 4f5ddde1d32b..1ffd71d178d8 100644 --- a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json +++ b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-firefox.json @@ -104,7 +104,7 @@ }, { "type": 3, - "textContent": "\n\nšŸˆā€ā¬›\n", + "textContent": "\n\n", "id": 18 } ], diff --git a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json index 4f5ddde1d32b..1ffd71d178d8 100644 --- a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json +++ b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed-webkit.json @@ -104,7 +104,7 @@ }, { "type": 3, - "textContent": "\n\nšŸˆā€ā¬›\n", + "textContent": "\n\n", "id": 18 } ], diff --git a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json index 4f5ddde1d32b..1ffd71d178d8 100644 --- a/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json +++ b/packages/integration-tests/suites/replay/unicode/uncompressed/test.ts-snapshots/unicode-uncompressed.json @@ -104,7 +104,7 @@ }, { "type": 3, - "textContent": "\n\nšŸˆā€ā¬›\n", + "textContent": "\n\n", "id": 18 } ],