Skip to content

Commit f7895dd

Browse files
committed
Adds style failing test
1 parent 6edfa9c commit f7895dd

File tree

5 files changed

+145
-791
lines changed

5 files changed

+145
-791
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+
})

0 commit comments

Comments
 (0)