Skip to content

Commit

Permalink
chore: tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed May 23, 2024
1 parent a69f4dd commit a56fa5f
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 17 deletions.
4 changes: 2 additions & 2 deletions e2e/docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { viteBundler } from '@vuepress/bundler-vite'
import { webpackBundler } from '@vuepress/bundler-webpack'
import { defineUserConfig } from 'vuepress'
import { path } from 'vuepress/utils'
import { testPlugin } from './plugins/testPlugin.js'
import { fooPlugin } from './plugins/foo/fooPlugin.js'
import { e2eTheme } from './theme/node/e2eTheme.js'

const E2E_BASE = (process.env.E2E_BASE ?? '/') as '/' | `/${string}/`
Expand Down Expand Up @@ -82,5 +82,5 @@ export default defineUserConfig({
}
},

plugins: [testPlugin],
plugins: [fooPlugin],
})
1 change: 0 additions & 1 deletion e2e/docs/.vuepress/plugins/clientConfig.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ import { getDirname, path } from 'vuepress/utils'

const __dirname = getDirname(import.meta.url)

export const testPlugin = {
export const fooPlugin = {
name: 'test-plugin',
clientConfigFile: path.resolve(__dirname, './clientConfig.js'),
clientConfigFile: path.resolve(
__dirname,
'./nonDefaultExportClientConfig.js',
),
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// test non-default-export clientConfig
import './test.css'
3 changes: 3 additions & 0 deletions e2e/docs/.vuepress/plugins/foo/test.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#non-default-export {
font-size: 123px;
}
3 changes: 0 additions & 3 deletions e2e/docs/.vuepress/plugins/test.css

This file was deleted.

1 change: 1 addition & 0 deletions e2e/docs/client-config/non-default-export.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# non-default-export
9 changes: 0 additions & 9 deletions e2e/tests/client-config/no-export.spec.ts

This file was deleted.

11 changes: 11 additions & 0 deletions e2e/tests/client-config/non-default-export.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { expect, test } from '@playwright/test'

test('should apply styles correctly if the client config file does not have default export', async ({
page,
}) => {
await page.goto('client-config/non-default-export.html')
await expect(page.locator('#non-default-export')).toHaveCSS(
'font-size',
'123px',
)
})

0 comments on commit a56fa5f

Please sign in to comment.