Skip to content

Commit

Permalink
Merge pull request #40 from NickMcBurney/sb7-improvements
Browse files Browse the repository at this point in the history
[email protected] update and package upgrades
  • Loading branch information
NickMcBurney authored Mar 19, 2023
2 parents d9dea9b + 316cc5d commit a60808f
Show file tree
Hide file tree
Showing 5 changed files with 790 additions and 843 deletions.
39 changes: 20 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"types": "dist/ts/index.d.ts",
"types": "dist/index.d.ts",
"files": [
"dist/**/*"
],
Expand All @@ -37,34 +37,35 @@
"vue-router": "~4.1.6"
},
"devDependencies": {
"@playwright/test": "^1.29.2",
"@storybook/addon-actions": "7.0.0-rc.3",
"@storybook/addon-essentials": "7.0.0-rc.3",
"@storybook/addons": "7.0.0-rc.3",
"@storybook/blocks": "7.0.0-rc.3",
"@storybook/preview-api": "7.0.0-rc.3",
"@storybook/types": "7.0.0-rc.3",
"@storybook/vue3": "7.0.0-rc.3",
"@storybook/vue3-vite": "7.0.0-rc.3",
"@types/node": "^18.11.18",
"@vitejs/plugin-vue": "^4.0.0",
"auto": "^10.37.6",
"@playwright/test": "^1.31.2",
"@storybook/addon-actions": "7.0.0-rc.4",
"@storybook/addon-essentials": "7.0.0-rc.4",
"@storybook/addons": "7.0.0-rc.4",
"@storybook/blocks": "7.0.0-rc.4",
"@storybook/preview-api": "7.0.0-rc.4",
"@storybook/types": "7.0.0-rc.4",
"@storybook/vue3": "7.0.0-rc.4",
"@storybook/vue3-vite": "7.0.0-rc.4",
"@types/node": "^18.15.3",
"@vitejs/plugin-vue": "^4.1.0",
"auto": "^10.43.0",
"concurrently": "^6.5.1",
"esbuild": "^0.17.11",
"prettier": "^2.8.2",
"esbuild": "^0.17.12",
"prettier": "^2.8.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^3.0.2",
"rollup": "^3.19.1",
"rollup-plugin-dts": "^5.2.0",
"rollup-plugin-dts": "^5.3.0",
"rollup-plugin-esbuild": "^5.0.0",
"storybook": "7.0.0-rc.3",
"typescript": "^4.9.4",
"vite": "^4.1.4",
"storybook": "7.0.0-rc.4",
"typescript": "^4.9.5",
"vite": "^4.2.0",
"vue": "^3.2.47",
"zx": "^1.15.2"
},
"peerDependencies": {
"@storybook/preview-api": "7.x",
"@storybook/vue3": "7.x",
"vue": "3.x",
"vue-router": "4.x"
Expand Down
84 changes: 9 additions & 75 deletions playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,40 +1,6 @@
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';


const setBrowsers = () => {
const browsers = [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
}
]

if (process.env.CI) {
browsers.push({
name: 'firefox',
use: {
...devices['Desktop Firefox'],
},
})
browsers.push({
name: 'webkit',
use: {
...devices['Desktop Safari'],
},
})
}

return browsers
}
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();

/**
* See https://playwright.dev/docs/test-configuration.
*/
Expand All @@ -54,7 +20,7 @@ const config: PlaywrightTestConfig = {
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
retries: process.env.CI ? 1 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
Expand All @@ -67,50 +33,18 @@ const config: PlaywrightTestConfig = {
// baseURL: 'http://localhost:3000',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
trace: 'on-first-retry'
},

/* Configure projects for major browsers */
projects: [
...setBrowsers()

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: {
// ...devices['Pixel 5'],
// },
// },
// {
// name: 'Mobile Safari',
// use: {
// ...devices['iPhone 12'],
// },
// },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: {
// channel: 'msedge',
// },
// },
// {
// name: 'Google Chrome',
// use: {
// channel: 'chrome',
// },
// },
],

/* Folder for test artifacts such as screenshots, videos, traces, etc. */
// outputDir: 'test-results/',

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// port: 3000,
// },
{
name: 'chromium',
use: {
...devices['Desktop Chrome']
}
}
]
};

export default config;
Loading

0 comments on commit a60808f

Please sign in to comment.