Unverified Commit 8a2460cc authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Revert "Migrate Sass tests to test/e2e" (#62735)

Reverts vercel/next.js#62321

This needs to land with @sokra's work on Sass but that couldn't land
yet.

Closes NEXT-2661
parent 4d4b45ec
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('3rd Party CSS Module Support', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the module', async () => {
const browser = await next.browser('/')
// Bar
expect(
await browser
.elementByCss('#verify-div .bar')
.getComputedCss('background-color')
).toBe(colorToRgb('blue'))
// Baz
expect(
await browser
.elementByCss('#verify-div .baz')
.getComputedCss('background-color')
).toBe(colorToRgb('blue'))
// Lol
expect(
await browser
.elementByCss('#verify-div .lol')
.getComputedCss('background-color')
).toBe(colorToRgb('red'))
// Lel
expect(
await browser
.elementByCss('#verify-div .lel')
.getComputedCss('background-color')
).toBe(colorToRgb('green'))
})
})
import { foo } from './index.module.scss'
export default function Home() {
return (
<div id="verify-div" className={foo}>
<div className="bar">Bar</div>
<div className="baz">Baz</div>
<div className="lol">Lol</div>
<div className="lel">Lel</div>
</div>
)
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Basic Module Additional Data Support', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the module', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('#verify-red').getComputedCss('color')
).toBe(colorToRgb('red'))
})
})
module.exports = {
sassOptions: {
additionalData: `
$var: red;
`,
},
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Basic Module Include Paths Support', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the module', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('#verify-red').getComputedCss('color')
).toBe(colorToRgb('red'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Basic Module Prepend Data Support', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the module', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('#verify-red').getComputedCss('color')
).toBe(colorToRgb('red'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Basic SCSS Module Support', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the module', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('#verify-red').getComputedCss('color')
).toBe(colorToRgb('red'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Catch-all Route CSS Module Usage', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the module', async () => {
const browser = await next.browser('/post')
expect(
await browser.elementByCss('#my-div').getComputedCss('background-color')
).toBe(colorToRgb('red'))
})
})
module.exports = {
productionBrowserSourceMaps: true,
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('CSS Module Composes Usage (Basic)', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the module', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('#verify-yellow').getComputedCss('color')
).toBe(colorToRgb('yellow'))
expect(
await browser
.elementByCss('#verify-yellow')
.getComputedCss('background-color')
).toBe(colorToRgb('blue'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('CSS Module Composes Usage (External)', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the module', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('#verify-yellow').getComputedCss('color')
).toBe(colorToRgb('yellow'))
expect(
await browser
.elementByCss('#verify-yellow')
.getComputedCss('background-color')
).toBe(colorToRgb('blue'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('SCSS Support loader handling Data Urls', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the module', async () => {
const browser = await next.browser('/')
const redText = await browser.elementByCss('.red-text')
expect(await redText.getComputedCss('color')).toBe(colorToRgb('red'))
expect(await redText.getComputedCss('background-image')).toMatch(
/url\("data:[^"]+"\)$/
)
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Has CSS Module in computed styles in Development', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should have CSS for page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('#verify-red').getComputedCss('color')
).toBe(colorToRgb('red'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Dynamic Route CSS Module Usage', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
it('should apply styles correctly', async () => {
const browser = await next.browser('/post-1')
const background = await browser
.elementByCss('#my-div')
.getComputedCss('background-color')
expect(background).toMatch(colorToRgb('red'))
})
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
describe('SCSS Support loader handling External imports', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it(`should include font on the page`, async () => {
const browser = await next.browser('/')
const result = await browser.eval(async function () {
return document.fonts.ready.then((fonts) => {
const includedFonts = []
for (const font of fonts.values()) {
includedFonts.push(font.family)
}
return includedFonts
})
})
expect(result).toInclude('Poppins')
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb, retry } from 'next-test-utils'
describe('Can hot reload CSS Module without losing state', () => {
const { next, isNextDev } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
;(isNextDev ? describe : describe.skip)('development only', () => {
it('should update CSS color without remounting <input>', async () => {
const browser = await next.browser('/')
const desiredText = 'hello world'
await browser.elementById('text-input').type(desiredText)
expect(await browser.elementById('text-input').getValue()).toBe(
desiredText
)
expect(
await browser.elementByCss('#verify-red').getComputedCss('color')
).toBe(colorToRgb('red'))
await next.patchFile('pages/index.module.scss', (content) => {
return content.replace('$var: red', '$var: purple')
})
await retry(async () => {
expect(
await browser.elementByCss('#verify-red').getComputedCss('color')
).toBe(colorToRgb('purple'))
})
// ensure text remained
expect(await browser.elementById('text-input').getValue()).toBe(
desiredText
)
})
})
})
/* eslint-env jest */
import { remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
// In order for the global isNextStart to be set
import 'e2e-utils'
describe.skip('Invalid CSS Global Module Usage in node_modules', () => {
;(Boolean((global as any).isNextStart) ? describe : describe.skip)(
'production only',
() => {
const appDir = __dirname
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should fail to build', async () => {
const { code, stderr } = await nextBuild(appDir, [], {
stderr: true,
})
expect(code).not.toBe(0)
expect(stderr).toContain('Failed to compile')
expect(stderr).toContain('node_modules/example/index.scss')
expect(stderr).toMatch(
/Global CSS.*cannot.*be imported from within.*node_modules/
)
expect(stderr).toMatch(
/Location:.*node_modules[\\/]example[\\/]index\.mjs/
)
})
}
)
})
/* eslint-env jest */
import { remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
// In order for the global isNextStart to be set
import 'e2e-utils'
describe('Invalid Global CSS with Custom App', () => {
;(Boolean((global as any).isNextStart) ? describe : describe.skip)(
'production only',
() => {
const appDir = __dirname
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should fail to build', async () => {
const { code, stderr } = await nextBuild(appDir, [], {
stderr: true,
})
expect(code).not.toBe(0)
expect(stderr).toContain('Failed to compile')
expect(stderr).toContain('styles/global.scss')
expect(stderr).toMatch(
/Please move all first-party global CSS imports.*?pages(\/|\\)_app/
)
expect(stderr).toMatch(/Location:.*pages[\\/]index\.js/)
})
}
)
})
/* eslint-env jest */
import { remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
// In order for the global isNextStart to be set
import 'e2e-utils'
describe('Invalid Global CSS', () => {
;(Boolean((global as any).isNextStart) ? describe : describe.skip)(
'production only',
() => {
const appDir = __dirname
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should fail to build', async () => {
const { code, stderr } = await nextBuild(appDir, [], {
stderr: true,
})
expect(code).not.toBe(0)
expect(stderr).toContain('Failed to compile')
expect(stderr).toContain('styles/global.scss')
expect(stderr).toMatch(
/Please move all first-party global CSS imports.*?pages(\/|\\)_app/
)
expect(stderr).toMatch(/Location:.*pages[\\/]index\.js/)
})
}
)
})
/* eslint-env jest */
import { remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
// In order for the global isNextStart to be set
import 'e2e-utils'
describe('Invalid SCSS in _document', () => {
;(Boolean((global as any).isNextStart) ? describe : describe.skip)(
'production only',
() => {
const appDir = __dirname
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should fail to build', async () => {
const { code, stderr } = await nextBuild(appDir, [], {
stderr: true,
})
expect(code).not.toBe(0)
expect(stderr).toContain('Failed to compile')
expect(stderr).toContain('styles.module.scss')
expect(stderr).toMatch(
/CSS.*cannot.*be imported within.*pages[\\/]_document\.js/
)
expect(stderr).toMatch(/Location:.*pages[\\/]_document\.js/)
})
}
)
})
/* eslint-env jest */
import { remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
// In order for the global isNextStart to be set
import 'e2e-utils'
describe.skip('Invalid CSS Module Usage in node_modules', () => {
;(Boolean((global as any).isNextStart) ? describe : describe.skip)(
'production only',
() => {
const appDir = __dirname
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should fail to build', async () => {
const { code, stderr } = await nextBuild(appDir, [], {
stderr: true,
})
expect(code).not.toBe(0)
expect(stderr).toContain('Failed to compile')
expect(stderr).toContain('node_modules/example/index.module.scss')
expect(stderr).toMatch(
/CSS Modules.*cannot.*be imported from within.*node_modules/
)
expect(stderr).toMatch(
/Location:.*node_modules[\\/]example[\\/]index\.mjs/
)
})
}
)
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('SCSS Support loader handling Preprocessor loader order', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the module', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('red'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Multi Global Support (reversed)', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('#verify-blue').getComputedCss('color')
).toBe(colorToRgb('blue'))
})
})
export default function Home() {
return (
<div className="red-text blue-text" id="verify-blue">
This text should be blue.
</div>
)
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Multi Global Support', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('#verify-red').getComputedCss('color')
).toBe(colorToRgb('red'))
})
})
export default function Home() {
return (
<>
<div className="red-text blue-text" id="verify-red">
This text should be red.
</div>
</>
)
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb, retry } from 'next-test-utils'
describe('SCSS Support', () => {
const { next, isNextDev } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
describe('Has CSS in computed styles in Production', () => {
it('should have CSS for page', async () => {
const browser = await next.browser('/page2')
expect(
await browser.elementByCss('.blue-text').getComputedCss('color')
).toBe(colorToRgb('blue'))
})
})
if (isNextDev) {
describe('Can hot reload CSS without losing state', () => {
it('should update CSS color without remounting <input>', async () => {
const browser = await next.browser('/page1')
const desiredText = 'hello world'
await browser.elementById('text-input').type(desiredText)
expect(await browser.elementById('text-input').getValue()).toBe(
desiredText
)
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('red'))
await next.patchFile('styles/global1.scss', (contents) => {
return contents.replace('$var: red', '$var: purple')
})
await retry(async () => {
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('purple'))
})
// ensure text remained
expect(await browser.elementById('text-input').getValue()).toBe(
desiredText
)
})
})
}
describe('Has CSS in computed styles in Development', () => {
it('should have CSS for page', async () => {
const browser = await next.browser('/page2')
expect(
await browser.elementByCss('.blue-text').getComputedCss('color')
).toBe(colorToRgb('blue'))
})
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Nested @import() Global Support', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('red'))
expect(
await browser.elementByCss('.blue-text').getComputedCss('color')
).toBe(colorToRgb('blue'))
})
})
export default function Home() {
return (
<>
<div className="red-text">This text should be red.</div>
<div className="blue-text">This text should be blue.</div>
</>
)
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Valid Nested CSS Module Usage from within node_modules', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(await browser.elementByCss('#other2').getComputedCss('color')).toBe(
colorToRgb('red')
)
expect(await browser.elementByCss('#other3').getComputedCss('color')).toBe(
colorToRgb('black')
)
expect(
await browser.elementByCss('#subclass').getComputedCss('color')
).toBe(colorToRgb('yellow'))
expect(
await browser.elementByCss('#subclass').getComputedCss('background-color')
).toBe(colorToRgb('blue'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Valid CSS Module Usage from within node_modules', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(await browser.elementByCss('#nm-div').getComputedCss('color')).toBe(
colorToRgb('red')
)
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Good Nested CSS Import from node_modules', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('red'))
expect(
await browser.elementByCss('.blue-text').getComputedCss('color')
).toBe(colorToRgb('blue'))
})
})
export default function Home() {
return (
<>
<div className="red-text">This text should be red.</div>
<div className="blue-text">This text should be blue.</div>
</>
)
}
@import 'example/test.scss';
.test {
background: red;
}
module.exports = {
experimental: {
turbo: {
resolveAlias: {
'~*': '*',
},
},
},
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
describe('Good CSS Import from node_modules with tilde', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
nprogress: '0.2.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser
.elementByCss('#nprogress .bar')
.getComputedCss('background-color')
).toBe('rgb(34, 153, 221)')
})
})
export default function Home() {
return (
<div id="nprogress">
<div className="bar">The text.</div>
</div>
)
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
describe('Good CSS Import from node_modules', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
nprogress: '0.2.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser
.elementByCss('#nprogress .bar')
.getComputedCss('background-color')
).toBe('rgb(34, 153, 221)')
})
})
export default function Home() {
return (
<div id="nprogress">
<div className="bar">The text.</div>
</div>
)
}
@import 'nprogress/nprogress.css';
.test {
background: red;
}
import { redText } from './index.module.scss'
export default function Home() {
return (
<div id="verify-red" className={redText}>
This text should be red.
</div>
)
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Has CSS Module in computed styles in Production', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('#verify-red').getComputedCss('color')
).toBe(colorToRgb('red'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Basic Global Support with src/ dir', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('red'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Basic Global Support scss', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('red'))
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
describe('unused scss', () => {
describe('Body is not hidden when unused in Development', () => {
const { next, isNextDev } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
;(isNextDev ? describe : describe.skip)('development only', () => {
it('should have body visible', async () => {
const browser = await next.browser('/')
const currentDisplay = await browser.eval(
`window.getComputedStyle(document.querySelector('body')).display`
)
expect(currentDisplay).toBe('block')
})
})
})
describe('Body is not hidden when broken in Development', () => {
const { next, isNextDev } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
;(isNextDev ? describe : describe.skip)('development only', () => {
it('should have body visible', async () => {
await next.patchFile('pages/index.js', (contents) => {
return contents.replace('<div />', '<div>')
})
const browser = await next.browser('/')
const currentDisplay = await browser.eval(
`window.getComputedStyle(document.querySelector('body')).display`
)
expect(currentDisplay).toBe('block')
})
})
})
})
$var: red;
.red-text {
color: $var;
background-image: url('./dark.svg'), url(dark2.svg);
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb, getUrlFromBackgroundImage } from 'next-test-utils'
// TODO: Skipped as this test should set up the server to handle assetPrefix which it currently does not do.
describe.skip('SCSS Support loader handling', () => {
describe('CSS URL via `file-loader` and asset prefix (1)', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('red'))
const background = await browser
.elementByCss('.red-text')
.getComputedCss('background-image')
expect(background).toMatch(
/url\(".*\/foo\/_next\/static\/media\/dark\..*\.svg"\), url\(".*\/foo\/_next\/static\/media\/dark2\..*\.svg"\)/
)
const urls = getUrlFromBackgroundImage(background)
for (const url of urls) {
const response = await next.fetch(url)
expect(response.status).toBe(200)
}
})
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb, getUrlFromBackgroundImage } from 'next-test-utils'
// TODO: Skipped as this test should set up the server to handle assetPrefix which it currently does not do.
describe.skip('SCSS Support loader handling', () => {
describe('CSS URL via `file-loader` and asset prefix (2)', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('red'))
const background = await browser
.elementByCss('.red-text')
.getComputedCss('background-image')
expect(background).toMatch(
/url\(".*\/foo\/_next\/static\/media\/dark\..*\.svg"\), url\(".*\/foo\/_next\/static\/media\/dark2\..*\.svg"\)/
)
const urls = getUrlFromBackgroundImage(background)
for (const url of urls) {
const response = await next.fetch(url)
expect(response.status).toBe(200)
}
})
})
})
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb, getUrlFromBackgroundImage } from 'next-test-utils'
describe('SCSS Support loader handling', () => {
describe('CSS URL via file-loader sass partial', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('red'))
const background = await browser
.elementByCss('.red-text')
.getComputedCss('background-image')
expect(background).toMatch(
/url\(".*\/_next\/static\/media\/darka\..*\.svg"\), url\(".*\/_next\/static\/media\/darkb\..*\.svg"\)/
)
const urls = getUrlFromBackgroundImage(background)
for (const url of urls) {
const response = await next.fetch(url)
expect(response.status).toBe(200)
}
})
})
})
$var: red;
.red-text {
color: $var;
background-image: url('./dark.svg'), url(dark2.svg);
}
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb, getUrlFromBackgroundImage } from 'next-test-utils'
describe('SCSS Support loader handling', () => {
describe('CSS URL via `file-loader`', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should render the page', async () => {
const browser = await next.browser('/')
expect(
await browser.elementByCss('.red-text').getComputedCss('color')
).toBe(colorToRgb('red'))
const background = await browser
.elementByCss('.red-text')
.getComputedCss('background-image')
expect(background).toMatch(
/url\(".*\/_next\/static\/media\/dark\..*\.svg"\), url\(".*\/_next\/static\/media\/dark2\..*\.svg"\)/
)
const urls = getUrlFromBackgroundImage(background)
for (const url of urls) {
const response = await next.fetch(url)
expect(response.status).toBe(200)
}
})
})
})
/* eslint-env jest */
import { remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
// In order for the global isNextStart to be set
import 'e2e-utils'
describe('Valid and Invalid Global CSS with Custom App', () => {
;(Boolean((global as any).isNextStart) ? describe : describe.skip)(
'production only',
() => {
const appDir = __dirname
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should fail to build', async () => {
const { code, stderr } = await nextBuild(appDir, [], {
stderr: true,
})
expect(code).not.toBe(0)
expect(stderr).toContain('Failed to compile')
expect(stderr).toContain('styles/global.scss')
expect(stderr).toContain(
'Please move all first-party global CSS imports'
)
expect(stderr).toMatch(/Location:.*pages[\\/]index\.js/)
})
}
)
})
/* eslint-env jest */
import { remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
import { quote as shellQuote } from 'shell-quote'
// In order for the global isNextStart to be set
import 'e2e-utils'
describe('SCSS Support', () => {
;(Boolean((global as any).isNextStart) ? describe : describe.skip)(
'production only',
() => {
describe('Friendly Webpack Error', () => {
const appDir = __dirname
const mockFile = join(appDir, 'mock.js')
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should be a friendly error successfully', async () => {
const { code, stderr } = await nextBuild(appDir, [], {
env: { NODE_OPTIONS: shellQuote([`--require`, mockFile]) },
stderr: true,
})
let cleanScssErrMsg =
'\n\n' +
'./styles/global.scss\n' +
"To use Next.js' built-in Sass support, you first need to install `sass`.\n" +
'Run `npm i sass` or `yarn add sass` inside your workspace.\n' +
'\n' +
'Learn more: https://nextjs.org/docs/messages/install-sass\n'
// eslint-disable-next-line
expect(code).toBe(1)
// eslint-disable-next-line
expect(stderr).toContain('Failed to compile.')
// eslint-disable-next-line
expect(stderr).toContain(cleanScssErrMsg)
// eslint-disable-next-line
expect(stderr).not.toContain('css-loader')
// eslint-disable-next-line
expect(stderr).not.toContain('sass-loader')
})
})
}
)
})
import React from 'react'
import App from 'next/app'
import '../styles/global.scss'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return <Component {...pageProps} />
}
}
export default MyApp
/* eslint-env jest */
import { nextTestSetup } from 'e2e-utils'
import { colorToRgb } from 'next-test-utils'
describe('Ordering with styled-jsx', () => {
const { next } = nextTestSetup({
files: __dirname,
dependencies: {
sass: '1.54.0',
},
})
it('should have the correct color (css ordering)', async () => {
const browser = await next.browser('/')
expect(await browser.elementByCss('.my-text').getComputedCss('color')).toBe(
colorToRgb('green')
)
})
})
/* eslint-env jest */
import cheerio from 'cheerio'
import { readdir, readFile, remove } from 'fs-extra'
import {
findPort,
killApp,
nextBuild,
nextStart,
renderViaHTTP,
} from 'next-test-utils'
import { join } from 'path'
describe('3rd Party CSS Module Support', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
const appDir = __dirname
let appPort
let app
let stdout
let code
beforeAll(async () => {
await remove(join(appDir, '.next'))
;({ code, stdout } = await nextBuild(appDir, [], {
stdout: true,
}))
appPort = await findPort()
app = await nextStart(appDir, appPort)
})
afterAll(async () => {
await killApp(app)
})
it('should have compiled successfully', () => {
expect(code).toBe(0)
expect(stdout).toMatch(/Compiled successfully/)
})
it(`should've emitted a single CSS file`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))
expect(cssFiles.length).toBe(1)
const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8')
expect(
cssContent.replace(/\/\*.*?\*\//g, '').trim()
).toMatchInlineSnapshot(
`".index_foo__72b4D{position:relative}.index_foo__72b4D .bar,.index_foo__72b4D .baz{height:100%;overflow:hidden}.index_foo__72b4D .lol,.index_foo__72b4D>.lel{width:80%}"`
)
})
it(`should've injected the CSS on server render`, async () => {
const content = await renderViaHTTP(appPort, '/')
const $ = cheerio.load(content)
const cssPreload = $('link[rel="preload"][as="style"]')
expect(cssPreload.length).toBe(1)
expect(cssPreload.attr('href')).toMatch(/^\/_next\/static\/css\/.*\.css$/)
const cssSheet = $('link[rel="stylesheet"]')
expect(cssSheet.length).toBe(1)
expect(cssSheet.attr('href')).toMatch(/^\/_next\/static\/css\/.*\.css$/)
expect($('#verify-div').attr('class')).toMatchInlineSnapshot(
`"index_foo__72b4D"`
)
})
})
})
import { foo } from './index.module.scss'
export default function Home() {
return <div id="verify-div" className={foo} />
}
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
.foo :global(.bar), .foo :global(.bar),
.foo :global(.baz) { .foo :global(.baz) {
background-color: blue; height: 100%;
overflow: hidden;
} }
.foo :global(.lol) { .foo :global(.lol) {
background-color: red; width: 80%;
} }
.foo > :global(.lel) { .foo > :global(.lel) {
background-color: green; width: 80%;
} }
/* eslint-env jest */
import { readdir, readFile, remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
describe('Basic Module Include Paths Support', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
const appDir = __dirname
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should compile successfully', async () => {
const { code, stdout } = await nextBuild(appDir, [], {
stdout: true,
})
expect(code).toBe(0)
expect(stdout).toMatch(/Compiled successfully/)
})
it(`should've emitted a single CSS file`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))
expect(cssFiles.length).toBe(1)
expect(await readFile(join(cssFolder, cssFiles[0]), 'utf8')).toContain(
'color:red'
)
})
})
})
/* eslint-env jest */
import { readdir, readFile, remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
describe('Basic Module Prepend Data Support', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
const appDir = __dirname
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should compile successfully', async () => {
const { code, stdout } = await nextBuild(appDir, [], {
stdout: true,
})
expect(code).toBe(0)
expect(stdout).toMatch(/Compiled successfully/)
})
it(`should've emitted a single CSS file`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))
expect(cssFiles.length).toBe(1)
expect(await readFile(join(cssFolder, cssFiles[0]), 'utf8')).toContain(
'color:red'
)
})
})
})
/* eslint-env jest */
import cheerio from 'cheerio'
import { readdir, readFile, remove } from 'fs-extra'
import {
findPort,
killApp,
nextBuild,
nextStart,
renderViaHTTP,
} from 'next-test-utils'
import { join } from 'path'
describe('Basic SCSS Module Support', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
const appDir = __dirname
let appPort
let app
let stdout
let code
beforeAll(async () => {
await remove(join(appDir, '.next'))
;({ code, stdout } = await nextBuild(appDir, [], {
stdout: true,
}))
appPort = await findPort()
app = await nextStart(appDir, appPort)
})
afterAll(async () => {
await killApp(app)
})
it('should have compiled successfully', () => {
expect(code).toBe(0)
expect(stdout).toMatch(/Compiled successfully/)
})
it(`should've emitted a single CSS file`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))
expect(cssFiles.length).toBe(1)
const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8')
expect(
cssContent.replace(/\/\*.*?\*\//g, '').trim()
).toMatchInlineSnapshot(`".index_redText__zXafh{color:red}"`)
})
it(`should've injected the CSS on server render`, async () => {
const content = await renderViaHTTP(appPort, '/')
const $ = cheerio.load(content)
const cssPreload = $('link[rel="preload"][as="style"]')
expect(cssPreload.length).toBe(1)
expect(cssPreload.attr('href')).toMatch(/^\/_next\/static\/css\/.*\.css$/)
const cssSheet = $('link[rel="stylesheet"]')
expect(cssSheet.length).toBe(1)
expect(cssSheet.attr('href')).toMatch(/^\/_next\/static\/css\/.*\.css$/)
expect($('#verify-red').attr('class')).toMatchInlineSnapshot(
`"index_redText__zXafh"`
)
})
})
})
/* eslint-env jest */
import { readdir, readFile, remove } from 'fs-extra'
import { findPort, killApp, nextBuild, nextStart } from 'next-test-utils'
import webdriver from 'next-webdriver'
import { join } from 'path'
describe('Catch-all Route CSS Module Usage', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
const appDir = __dirname
let stdout
let code
let app
let appPort
beforeAll(async () => {
await remove(join(appDir, '.next'))
;({ code, stdout } = await nextBuild(appDir, [], {
stdout: true,
}))
appPort = await findPort()
app = await nextStart(appDir, appPort)
})
afterAll(() => killApp(app))
it('should have compiled successfully', () => {
expect(code).toBe(0)
expect(stdout).toMatch(/Compiled successfully/)
})
it('should apply styles correctly', async () => {
const browser = await webdriver(appPort, '/post-1')
const background = await browser
.elementByCss('#my-div')
.getComputedCss('background-color')
expect(background).toMatch(/rgb(a|)\(255, 0, 0/)
})
it(`should've emitted a single CSS file`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))
expect(cssFiles.length).toBe(1)
const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8')
expect(
cssContent.replace(/\/\*.*?\*\//g, '').trim()
).toMatchInlineSnapshot(`".___post__home__bZNj1{background:red}"`)
})
})
})
/* eslint-env jest */ /* eslint-env jest */
import { nextTestSetup } from 'e2e-utils' import { readdir, readFile, remove } from 'fs-extra'
import { readdir, readFile } from 'fs-extra' import { nextBuild } from 'next-test-utils'
import { join } from 'path' import { join } from 'path'
describe('SCSS Support', () => { describe('SCSS Support', () => {
const { next, isNextDev } = nextTestSetup({ ;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
files: __dirname, describe('CSS Compilation and Prefixing', () => {
dependencies: { const appDir = __dirname
sass: '1.54.0',
}, beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should compile successfully', async () => {
const { code, stdout } = await nextBuild(appDir, [], {
stdout: true,
})
expect(code).toBe(0)
expect(stdout).toMatch(/Compiled successfully/)
}) })
// TODO: Figure out this test for dev and Turbopack
;(isNextDev ? describe.skip : describe)('Production only', () => {
describe('CSS Compilation and Prefixing', () => {
it(`should've compiled and prefixed`, async () => { it(`should've compiled and prefixed`, async () => {
const cssFolder = join(next.testDir, '.next/static/css') const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder) const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f)) const cssFiles = files.filter((f) => /\.css$/.test(f))
...@@ -30,12 +36,11 @@ describe('SCSS Support', () => { ...@@ -30,12 +36,11 @@ describe('SCSS Support', () => {
) )
// Contains a source map // Contains a source map
console.log({ cssContent })
expect(cssContent).toMatch(/\/\*#\s*sourceMappingURL=(.+\.map)\s*\*\//) expect(cssContent).toMatch(/\/\*#\s*sourceMappingURL=(.+\.map)\s*\*\//)
}) })
it(`should've emitted a source map`, async () => { it(`should've emitted a source map`, async () => {
const cssFolder = join(next.testDir, '.next/static/css') const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder) const files = await readdir(cssFolder)
const cssMapFiles = files.filter((f) => /\.css\.map$/.test(f)) const cssMapFiles = files.filter((f) => /\.css\.map$/.test(f))
...@@ -47,24 +52,24 @@ describe('SCSS Support', () => { ...@@ -47,24 +52,24 @@ describe('SCSS Support', () => {
const { version, mappings, sourcesContent } = JSON.parse(cssMapContent) const { version, mappings, sourcesContent } = JSON.parse(cssMapContent)
expect({ version, mappings, sourcesContent }).toMatchInlineSnapshot(` expect({ version, mappings, sourcesContent }).toMatchInlineSnapshot(`
{ {
"mappings": "AAEE,uBACE,SAHE,CAON,cACE,2CAAA", "mappings": "AAEE,uBACE,SAHE,CAON,cACE,2CAAA",
"sourcesContent": [ "sourcesContent": [
"$var: red; "$var: red;
.redText { .redText {
::placeholder { ::placeholder {
color: $var; color: $var;
} }
} }
.flex-parsing { .flex-parsing {
flex: 0 0 calc(50% - var(--vertical-gutter)); flex: 0 0 calc(50% - var(--vertical-gutter));
} }
", ",
], ],
"version": 3, "version": 3,
} }
`) `)
}) })
}) })
}) })
......
/* eslint-env jest */
import { readdir, readFile, remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
describe('CSS Module Composes Usage (Basic)', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
// This is a very bad feature. Do not use it.
const appDir = __dirname
let stdout
let code
beforeAll(async () => {
await remove(join(appDir, '.next'))
;({ code, stdout } = await nextBuild(appDir, [], {
stdout: true,
}))
})
it('should have compiled successfully', () => {
expect(code).toBe(0)
expect(stdout).toMatch(/Compiled successfully/)
})
it(`should've emitted a single CSS file`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))
expect(cssFiles.length).toBe(1)
const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8')
expect(
cssContent.replace(/\/\*.*?\*\//g, '').trim()
).toMatchInlineSnapshot(
`".index_className__OLWEh{background:red;color:#ff0}.index_subClass__Z_IFg{background:blue}"`
)
})
})
})
/* eslint-env jest */
import { readdir, readFile, remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
describe('CSS Module Composes Usage (External)', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
// This is a very bad feature. Do not use it.
const appDir = __dirname
let stdout
let code
beforeAll(async () => {
await remove(join(appDir, '.next'))
;({ code, stdout } = await nextBuild(appDir, [], {
stdout: true,
}))
})
it('should have compiled successfully', () => {
expect(code).toBe(0)
expect(stdout).toMatch(/Compiled successfully/)
})
it(`should've emitted a single CSS file`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))
expect(cssFiles.length).toBe(1)
const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8')
expect(
cssContent.replace(/\/\*.*?\*\//g, '').trim()
).toMatchInlineSnapshot(
`".other_className__A8aN2{background:red;color:#ff0}.index_subClass__Z_IFg{background:blue}"`
)
})
})
})
$var: blue; $var: blue;
.subClass { .subClass {
composes: className from './other.module.scss'; composes: className from './other.scss';
background: $var; background: $var;
} }
/* eslint-env jest */
import { readdir, readFile, remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
describe('SCSS Support loader handling', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
describe('Data Urls', () => {
const appDir = __dirname
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should compile successfully', async () => {
const { code, stdout } = await nextBuild(appDir, [], {
stdout: true,
})
// eslint-disable-next-line
expect(code).toBe(0)
// eslint-disable-next-line
expect(stdout).toMatch(/Compiled successfully/)
})
it(`should've emitted expected files`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))
expect(cssFiles.length).toBe(1)
const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8')
expect(cssContent.replace(/\/\*.*?\*\//g, '').trim()).toMatch(
/^\.red-text\{color:red;background-image:url\("data:[^"]+"\)\}$/
)
})
})
})
})
/* eslint-env jest */
import { remove } from 'fs-extra'
import { findPort, killApp, launchApp } from 'next-test-utils'
import webdriver from 'next-webdriver'
import { join } from 'path'
describe('Has CSS Module in computed styles in Development', () => {
const appDir = __dirname
let appPort
let app
beforeAll(async () => {
await remove(join(appDir, '.next'))
appPort = await findPort()
app = await launchApp(appDir, appPort)
})
afterAll(async () => {
await killApp(app)
})
it('should have CSS for page', async () => {
const browser = await webdriver(appPort, '/')
const currentColor = await browser.eval(
`window.getComputedStyle(document.querySelector('#verify-red')).color`
)
expect(currentColor).toMatchInlineSnapshot(`"rgb(255, 0, 0)"`)
})
})
/* eslint-env jest */
import { readdir, readFile, remove } from 'fs-extra'
import { findPort, killApp, nextBuild, nextStart } from 'next-test-utils'
import webdriver from 'next-webdriver'
import { join } from 'path'
describe('Dynamic Route CSS Module Usage', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
const appDir = __dirname
let stdout
let code
let app
let appPort
beforeAll(async () => {
await remove(join(appDir, '.next'))
;({ code, stdout } = await nextBuild(appDir, [], {
stdout: true,
}))
appPort = await findPort()
app = await nextStart(appDir, appPort)
})
afterAll(() => killApp(app))
it('should have compiled successfully', () => {
expect(code).toBe(0)
expect(stdout).toMatch(/Compiled successfully/)
})
it(`should've emitted a single CSS file`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))
expect(cssFiles.length).toBe(1)
const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8')
expect(
cssContent.replace(/\/\*.*?\*\//g, '').trim()
).toMatchInlineSnapshot(`"._post__home__ZI5mq{background:red}"`)
})
it('should apply styles correctly', async () => {
const browser = await webdriver(appPort, '/post-1')
const background = await browser
.elementByCss('#my-div')
.getComputedCss('background-color')
expect(background).toMatch(/rgb(a|)\(255, 0, 0/)
})
})
})
/* eslint-env jest */
import { readdir, readFile, remove } from 'fs-extra'
import { nextBuild } from 'next-test-utils'
import { join } from 'path'
describe('SCSS Support loader handling', () => {
;(process.env.TURBOPACK ? describe.skip : describe)('production mode', () => {
describe('External imports', () => {
const appDir = __dirname
beforeAll(async () => {
await remove(join(appDir, '.next'))
})
it('should compile successfully', async () => {
const { code, stdout } = await nextBuild(appDir, [], {
stdout: true,
})
// eslint-disable-next-line
expect(code).toBe(0)
// eslint-disable-next-line
expect(stdout).toMatch(/Compiled successfully/)
})
it(`should've emitted expected files`, async () => {
const cssFolder = join(appDir, '.next/static/css')
const files = await readdir(cssFolder)
const cssFiles = files.filter((f) => /\.css$/.test(f))
expect(cssFiles.length).toBe(1)
const cssContent = await readFile(join(cssFolder, cssFiles[0]), 'utf8')
expect(cssContent.replace(/\/\*.*?\*\//g, '').trim()).toMatch(
/^@import"https:\/\/fonts\.googleapis\.com\/css2\?family=Poppins:wght@400&display=swap";\.red-text\{color:red;font-family:Poppins;font-style:normal;font-weight:400\}$/
)
})
})
})
})
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment