-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy pathautoprefixer-project.spec.ts
37 lines (33 loc) · 1.07 KB
/
autoprefixer-project.spec.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { browserFunctions, StylableProjectRunner } from '@stylable/e2e-test-kit';
import { expect } from 'chai';
import { dirname } from 'path';
const project = 'autoprefixer-project';
const projectDir = dirname(
require.resolve(`@stylable/webpack-plugin/test/e2e/projects/${project}/webpack.config`),
);
describe(`(${project})`, () => {
const projectRunner = StylableProjectRunner.mochaSetup(
{
projectDir,
launchOptions: {
// headless: false
},
},
before,
afterEach,
after,
);
it('renders css', async () => {
const { page } = await projectRunner.openInBrowser();
const styleElements = await page.evaluate(browserFunctions.getStyleElementsMetadata, {
includeCSSContent: true,
});
expect(styleElements).to.eql([
{
id: './src/index.st.css',
depth: '1',
css: '::-moz-placeholder {\n color: gray;\n}\n::placeholder {\n color: gray;\n}',
},
]);
});
});