Skip to content

Commit

Permalink
Adds style failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
joaopslins committed Jan 14, 2022
1 parent 6edfa9c commit f7895dd
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 791 deletions.
8 changes: 8 additions & 0 deletions e2e/2.x/style/components/SassVTL.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<template>
<div class="test" />
</template>

<style lang="sass">
.test
background-color: blue
</style>
9 changes: 9 additions & 0 deletions e2e/2.x/style/components/ScssVTL.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<div class="test" />
</template>

<style lang="scss">
.test {
background-color: blue;
}
</style>
3 changes: 2 additions & 1 deletion e2e/2.x/style/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.0",
"@vue/test-utils": "^1.1.0",
"@testing-library/vue": "^5.8.2",
"@vue/test-utils": "^1.3.0",
"jest": "27.x",
"less": "^3.9.0",
"postcss": "^7.0.13",
Expand Down
21 changes: 21 additions & 0 deletions e2e/2.x/style/vtl.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { render } from '@testing-library/vue'
import ScssVTL from './components/ScssVTL'
import SassVTL from './components/SassVTL'

test('processes Sass', () => {
render(SassVTL)

const elementBackgroundColor = window.getComputedStyle(
document.querySelector('.test')
).backgroundColor
expect(elementBackgroundColor).toEqual('blue')
})

test('processes Scss', () => {
render(ScssVTL)

const elementBackgroundColor = window.getComputedStyle(
document.querySelector('.test')
).backgroundColor
expect(elementBackgroundColor).toEqual('blue')
})
Loading

0 comments on commit f7895dd

Please sign in to comment.