Skip to content

Commit

Permalink
Test storage of !important as this creates a tuple rather than a st…
Browse files Browse the repository at this point in the history
…ring for the style
  • Loading branch information
eoghanmurray committed Jun 15, 2021
1 parent f629932 commit 38f84e2
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/__snapshots__/integration.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -7436,6 +7436,28 @@ exports[`select2 1`] = `
\\"id\\": 35
}
},
{
\\"type\\": 3,
\\"data\\": {
\\"source\\": 0,
\\"texts\\": [],
\\"attributes\\": [
{
\\"id\\": 36,
\\"attributes\\": {
\\"style\\": {
\\"color\\": [
\\"black\\",
\\"important\\"
]
}
}
}
],
\\"removes\\": [],
\\"adds\\": []
}
},
{
\\"type\\": 3,
\\"data\\": {
Expand Down
2 changes: 2 additions & 0 deletions test/integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ describe('record integration tests', function (this: ISuite) {

// toggle the select box
await page.click('.select2-container');
// test storage of !important style
await page.evaluate('document.getElementById("select2-drop").setAttribute("style", document.getElementById("select2-drop").style.cssText + "color:black !important")');
await page.click('.select2-container');

const snapshots = await page.evaluate('window.snapshots');
Expand Down

0 comments on commit 38f84e2

Please sign in to comment.