Skip to content

Commit

Permalink
A bit more explicit with which style elements we're referring to in test
Browse files Browse the repository at this point in the history
  • Loading branch information
eoghanmurray committed Jul 9, 2024
1 parent bbb6169 commit 75808d8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/rrweb/test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ describe('record integration tests', function (this: ISuite) {
await waitForRAF(page); // ensure mutations aren't included in fullsnapshot

await page.evaluate(() => {
let styleEl = document.querySelector('style');
let styleEl = document.querySelector('style#dual-textContent');
if (styleEl) {
styleEl.append(
document.createTextNode('body { background-color: darkgreen; }'),
Expand All @@ -205,7 +205,7 @@ describe('record integration tests', function (this: ISuite) {
});
await waitForRAF(page);
await page.evaluate(() => {
let styleEl = document.querySelector('style');
let styleEl = document.querySelector('style#dual-textContent');
if (styleEl) {
styleEl.childNodes.forEach((cn) => {
if (cn.textContent) {
Expand All @@ -220,7 +220,7 @@ describe('record integration tests', function (this: ISuite) {
});
await waitForRAF(page);
await page.evaluate(() => {
let styleEl = document.querySelector('style');
let styleEl = document.querySelector('style#dual-textContent');
if (styleEl) {
styleEl.childNodes.forEach((cn) => {
if (cn.textContent) {
Expand All @@ -231,7 +231,7 @@ describe('record integration tests', function (this: ISuite) {
}
});
}
let hoverMutationStyleEl = document.getElementById('hover-mutation');
let hoverMutationStyleEl = document.querySelector('style#hover-mutation');
if (hoverMutationStyleEl) {
hoverMutationStyleEl.childNodes.forEach((cn) => {
if (cn.textContent) {
Expand All @@ -247,7 +247,7 @@ describe('record integration tests', function (this: ISuite) {

await waitForRAF(page);
await page.evaluate(() => {
let styleEl = document.getElementById('goldilocks');
let styleEl = document.querySelector('style#goldilocks');
if (styleEl) {
styleEl.childNodes.forEach((cn) => {
if (cn.textContent) {
Expand Down

0 comments on commit 75808d8

Please sign in to comment.