Skip to content

Commit 845e0ff

Browse files
committed
Adds style failing test
(cherry picked from commit f7895dd)
1 parent 89586a0 commit 845e0ff

File tree

5 files changed

+137
-2
lines changed

5 files changed

+137
-2
lines changed

e2e/2.x/style/components/SassVTL.vue

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<template>
2+
<div class="test" />
3+
</template>
4+
5+
<style lang="sass">
6+
.test
7+
background-color: blue
8+
</style>

e2e/2.x/style/components/ScssVTL.vue

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template>
2+
<div class="test" />
3+
</template>
4+
5+
<style lang="scss">
6+
.test {
7+
background-color: blue;
8+
}
9+
</style>

e2e/2.x/style/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"devDependencies": {
1414
"@babel/core": "^7.9.0",
1515
"@babel/preset-env": "^7.9.0",
16-
"@vue/test-utils": "^1.1.0",
16+
"@testing-library/vue": "^5.8.2",
17+
"@vue/test-utils": "^1.3.0",
1718
"jest": "27.x",
1819
"less": "^3.9.0",
1920
"postcss": "^7.0.13",

e2e/2.x/style/vtl.test.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { render } from '@testing-library/vue'
2+
import ScssVTL from './components/ScssVTL'
3+
import SassVTL from './components/SassVTL'
4+
5+
test('processes Sass', () => {
6+
render(SassVTL)
7+
8+
const elementBackgroundColor = window.getComputedStyle(
9+
document.querySelector('.test')
10+
).backgroundColor
11+
expect(elementBackgroundColor).toEqual('blue')
12+
})
13+
14+
test('processes Scss', () => {
15+
render(ScssVTL)
16+
17+
const elementBackgroundColor = window.getComputedStyle(
18+
document.querySelector('.test')
19+
).backgroundColor
20+
expect(elementBackgroundColor).toEqual('blue')
21+
})

yarn.lock

+97-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
dependencies:
1010
"@babel/highlight" "^7.14.5"
1111

12+
"@babel/code-frame@^7.10.4":
13+
version "7.16.7"
14+
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789"
15+
integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg==
16+
dependencies:
17+
"@babel/highlight" "^7.16.7"
18+
1219
"@babel/compat-data@^7.13.11", "@babel/compat-data@^7.14.7", "@babel/compat-data@^7.15.0":
1320
version "7.15.0"
1421
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176"
@@ -225,6 +232,11 @@
225232
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48"
226233
integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==
227234

235+
"@babel/helper-validator-identifier@^7.16.7":
236+
version "7.16.7"
237+
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad"
238+
integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw==
239+
228240
"@babel/helper-validator-option@^7.14.5":
229241
version "7.14.5"
230242
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3"
@@ -258,6 +270,15 @@
258270
chalk "^2.0.0"
259271
js-tokens "^4.0.0"
260272

273+
"@babel/highlight@^7.16.7":
274+
version "7.16.7"
275+
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.7.tgz#81a01d7d675046f0d96f82450d9d9578bdfd6b0b"
276+
integrity sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw==
277+
dependencies:
278+
"@babel/helper-validator-identifier" "^7.16.7"
279+
chalk "^2.0.0"
280+
js-tokens "^4.0.0"
281+
261282
"@babel/parser@^7.1.0", "@babel/parser@^7.14.5", "@babel/parser@^7.15.0", "@babel/parser@^7.7.2":
262283
version "7.15.3"
263284
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.3.tgz#3416d9bea748052cfcb63dbcc27368105b1ed862"
@@ -869,13 +890,28 @@
869890
"@babel/types" "^7.4.4"
870891
esutils "^2.0.2"
871892

893+
"@babel/runtime-corejs3@^7.10.2":
894+
version "7.16.8"
895+
resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.16.8.tgz#ea533d96eda6fdc76b1812248e9fbd0c11d4a1a7"
896+
integrity sha512-3fKhuICS1lMz0plI5ktOE/yEtBRMVxplzRkdn6mJQ197XiY0JnrzYV0+Mxozq3JZ8SBV9Ecurmw1XsGbwOf+Sg==
897+
dependencies:
898+
core-js-pure "^3.20.2"
899+
regenerator-runtime "^0.13.4"
900+
872901
"@babel/runtime@^7.0.0", "@babel/runtime@^7.8.4":
873902
version "7.15.3"
874903
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.3.tgz#2e1c2880ca118e5b2f9988322bd8a7656a32502b"
875904
integrity sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==
876905
dependencies:
877906
regenerator-runtime "^0.13.4"
878907

908+
"@babel/runtime@^7.10.2", "@babel/runtime@^7.12.5":
909+
version "7.16.7"
910+
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.16.7.tgz#03ff99f64106588c9c403c6ecb8c3bafbbdff1fa"
911+
integrity sha512-9E9FJowqAsytyOY6LG+1KuueckRL+aQW+mKvXRXnuFGyRAyepJPmEo9vgMfXUA6O9u3IeEdv9MAkppFcaQwogQ==
912+
dependencies:
913+
regenerator-runtime "^0.13.4"
914+
879915
"@babel/template@^7.14.5", "@babel/template@^7.3.3":
880916
version "7.14.5"
881917
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4"
@@ -1505,11 +1541,39 @@
15051541
dependencies:
15061542
"@sinonjs/commons" "^1.7.0"
15071543

1544+
"@testing-library/dom@^7.26.6":
1545+
version "7.31.2"
1546+
resolved "https://registry.yarnpkg.com/@testing-library/dom/-/dom-7.31.2.tgz#df361db38f5212b88555068ab8119f5d841a8c4a"
1547+
integrity sha512-3UqjCpey6HiTZT92vODYLPxTBWlM8ZOOjr3LX5F37/VRipW2M1kX6I/Cm4VXzteZqfGfagg8yXywpcOgQBlNsQ==
1548+
dependencies:
1549+
"@babel/code-frame" "^7.10.4"
1550+
"@babel/runtime" "^7.12.5"
1551+
"@types/aria-query" "^4.2.0"
1552+
aria-query "^4.2.2"
1553+
chalk "^4.1.0"
1554+
dom-accessibility-api "^0.5.6"
1555+
lz-string "^1.4.4"
1556+
pretty-format "^26.6.2"
1557+
1558+
"@testing-library/vue@^5.8.2":
1559+
version "5.8.2"
1560+
resolved "https://registry.yarnpkg.com/@testing-library/vue/-/vue-5.8.2.tgz#976b2179dc28ceba8dd63b5437edc2749f860252"
1561+
integrity sha512-evsQjLw3T/c92ZsXflZMzSN72P06VlgUZMIcrRKn5n9ZX7QgQyebB3DgdmPACf6JgNfP8Y3Lm2212FmeMnWlZw==
1562+
dependencies:
1563+
"@babel/runtime" "^7.12.5"
1564+
"@testing-library/dom" "^7.26.6"
1565+
"@vue/test-utils" "^1.1.0"
1566+
15081567
"@tootallnate/once@1":
15091568
version "1.1.2"
15101569
resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82"
15111570
integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==
15121571

1572+
"@types/aria-query@^4.2.0":
1573+
version "4.2.2"
1574+
resolved "https://registry.yarnpkg.com/@types/aria-query/-/aria-query-4.2.2.tgz#ed4e0ad92306a704f9fb132a0cfcf77486dbe2bc"
1575+
integrity sha512-HnYpAE1Y6kRyKM/XkEuiRQhTHvkzMBurTHnpFLYLBGPIylZNPs9jJcuOOYWxPLJCSEtmZT0Y8rHDokKN7rRTig==
1576+
15131577
"@types/babel-types@*", "@types/babel-types@^7.0.0":
15141578
version "7.0.11"
15151579
resolved "https://registry.yarnpkg.com/@types/babel-types/-/babel-types-7.0.11.tgz#263b113fa396fac4373188d73225297fb86f19a9"
@@ -1946,6 +2010,15 @@
19462010
lodash "^4.17.15"
19472011
pretty "^2.0.0"
19482012

2013+
"@vue/test-utils@^1.3.0":
2014+
version "1.3.0"
2015+
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.3.0.tgz#d563decdcd9c68a7bca151d4179a2bfd6d5c3e15"
2016+
integrity sha512-Xk2Xiyj2k5dFb8eYUKkcN9PzqZSppTlx7LaQWBbdA8tqh3jHr/KHX2/YLhNFc/xwDrgeLybqd+4ZCPJSGPIqeA==
2017+
dependencies:
2018+
dom-event-types "^1.0.0"
2019+
lodash "^4.17.15"
2020+
pretty "^2.0.0"
2021+
19492022
"@vue/test-utils@^2.0.0-rc.10":
19502023
version "2.0.0-rc.14"
19512024
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-2.0.0-rc.14.tgz#9da1be7b0e365ff5f945677da17bf6c8a7a83abd"
@@ -2222,6 +2295,14 @@ argv-formatter@~1.0.0:
22222295
resolved "https://registry.yarnpkg.com/argv-formatter/-/argv-formatter-1.0.0.tgz#a0ca0cbc29a5b73e836eebe1cbf6c5e0e4eb82f9"
22232296
integrity sha1-oMoMvCmltz6Dbuvhy/bF4OTrgvk=
22242297

2298+
aria-query@^4.2.2:
2299+
version "4.2.2"
2300+
resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-4.2.2.tgz#0d2ca6c9aceb56b8977e9fed6aed7e15bbd2f83b"
2301+
integrity sha512-o/HelwhuKpTj/frsOsbNLNgnNGVIFsVP/SW2BSF14gVl7kAfMOJ6/8wUAUvG1R1NHKrfG+2sHZTu0yauT1qBrA==
2302+
dependencies:
2303+
"@babel/runtime" "^7.10.2"
2304+
"@babel/runtime-corejs3" "^7.10.2"
2305+
22252306
arr-diff@^4.0.0:
22262307
version "4.0.0"
22272308
resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520"
@@ -2850,7 +2931,7 @@ chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.3.2, chalk@^2.4
28502931
escape-string-regexp "^1.0.5"
28512932
supports-color "^5.3.0"
28522933

2853-
chalk@^4.0.0:
2934+
chalk@^4.0.0, chalk@^4.1.0:
28542935
version "4.1.2"
28552936
resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01"
28562937
integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==
@@ -3509,6 +3590,11 @@ core-js-compat@^3.14.0, core-js-compat@^3.16.0:
35093590
browserslist "^4.16.8"
35103591
semver "7.0.0"
35113592

3593+
core-js-pure@^3.20.2:
3594+
version "3.20.2"
3595+
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.20.2.tgz#5d263565f0e34ceeeccdc4422fae3e84ca6b8c0f"
3596+
integrity sha512-CmWHvSKn2vNL6p6StNp1EmMIfVY/pqn3JLAjfZQ8WZGPOlGoO92EkX9/Mk81i6GxvoPXjUqEQnpM3rJ5QxxIOg==
3597+
35123598
core-js@^2.4.0:
35133599
version "2.6.12"
35143600
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec"
@@ -3904,6 +3990,11 @@ doctypes@^1.1.0:
39043990
resolved "https://registry.yarnpkg.com/doctypes/-/doctypes-1.1.0.tgz#ea80b106a87538774e8a3a4a5afe293de489e0a9"
39053991
integrity sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk=
39063992

3993+
dom-accessibility-api@^0.5.6:
3994+
version "0.5.10"
3995+
resolved "https://registry.yarnpkg.com/dom-accessibility-api/-/dom-accessibility-api-0.5.10.tgz#caa6d08f60388d0bb4539dd75fe458a9a1d0014c"
3996+
integrity sha512-Xu9mD0UjrJisTmv7lmVSDMagQcU9R5hwAbxsaAE/35XPnPLJobbuREfV/rraiSaEj/UOvgrzQs66zyTWTlyd+g==
3997+
39073998
dom-event-types@^1.0.0:
39083999
version "1.0.0"
39094000
resolved "https://registry.yarnpkg.com/dom-event-types/-/dom-event-types-1.0.0.tgz#5830a0a29e1bf837fe50a70cd80a597232813cae"
@@ -7455,6 +7546,11 @@ lru-cache@^6.0.0:
74557546
dependencies:
74567547
yallist "^4.0.0"
74577548

7549+
lz-string@^1.4.4:
7550+
version "1.4.4"
7551+
resolved "https://registry.yarnpkg.com/lz-string/-/lz-string-1.4.4.tgz#c0d8eaf36059f705796e1e344811cf4c498d3a26"
7552+
integrity sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=
7553+
74587554
macos-release@^2.2.0:
74597555
version "2.5.0"
74607556
resolved "https://registry.yarnpkg.com/macos-release/-/macos-release-2.5.0.tgz#067c2c88b5f3fb3c56a375b2ec93826220fa1ff2"

0 commit comments

Comments
 (0)