Skip to content

Commit

Permalink
Merge branch 'main' into create-helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Jan 26, 2024
2 parents 13bdbcc + b9579e2 commit 00aba51
Show file tree
Hide file tree
Showing 32 changed files with 775 additions and 666 deletions.
2 changes: 1 addition & 1 deletion .commitlintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const themePackages = getSubDirectories(path.resolve(__dirname, 'themes'))
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'scope-enum': [2, 'always', [...pluginPackages, ...themePackages]],
'scope-enum': [2, 'always', ['e2e', ...pluginPackages, ...themePackages]],
'footer-max-line-length': [0],
},
}
23 changes: 22 additions & 1 deletion e2e/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
---
title: Home
home: true
title: Home
heroImage: https://v2.vuepress.vuejs.org/images/hero.png
actions:
- text: Action1
link: /action1.html
type: primary

- text: Action2
link: /action2.html
type: secondary

features:
- title: Feature1
details: Detail1

- title: Feature2
details: Detail2

- title: Feature3
details: Detail3

footer: Footer Content
---

HomePage Content
9 changes: 3 additions & 6 deletions e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,13 @@
"e2e:serve": "anywhere -s -h localhost -p 9080 -d docs/.vuepress/dist"
},
"dependencies": {
"@vuepress/bundler-vite": "2.0.0-rc.1",
"@vuepress/bundler-webpack": "2.0.0-rc.1",
"@vuepress/cli": "2.0.0-rc.1",
"@vuepress/client": "2.0.0-rc.1",
"@vuepress/bundler-vite": "2.0.0-rc.2",
"@vuepress/bundler-webpack": "2.0.0-rc.2",
"@vuepress/theme-default": "workspace:*",
"@vuepress/utils": "2.0.0-rc.1",
"sass": "^1.70.0",
"sass-loader": "^14.0.0",
"vue": "^3.4.15",
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"devDependencies": {
"anywhere": "^1.6.0",
Expand Down
65 changes: 65 additions & 0 deletions e2e/tests/theme-default/home.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
describe('homepage', () => {
it('has hero info', () => {
const title = 'VuePress Ecosystem E2E'
const description = 'VuePress Ecosystem E2E Test Site'
const heroImage = 'https://v2.vuepress.vuejs.org/images/hero.png'

cy.visit('/')
cy.get('.hero').then((el) => {
cy.wrap(el)
.get('img')
.should('have.attr', 'src', heroImage)
.should('have.attr', 'alt', title)

cy.wrap(el).get('#main-title').should('have.text', title)

cy.wrap(el).get('.description').should('have.text', description)

cy.wrap(el)
.get('.actions')
.then((el) => {
cy.wrap(el).get('.action-button').should('have.length', 2)

cy.wrap(el)
.get('.action-button')
.eq(0)
.should('have.attr', 'href', '/action1.html')
.should('have.attr', 'aria-label', 'Action1')
.contains('Action1')

cy.wrap(el)
.get('.action-button')
.eq(1)
.should('have.attr', 'href', '/action2.html')
.should('have.attr', 'aria-label', 'Action2')
.contains('Action2')
})
})

cy.get('.features .feature').then((el) => {
cy.wrap(el).should('have.length', 3)
;[1, 2, 3].forEach((i) => {
cy.wrap(el)
.eq(i - 1)
.get('h2')
.contains('Feature' + i)
cy.wrap(el)
.eq(i - 1)
.get('p')
.contains('Detail' + i)
})
})
})

it('has content', () => {
cy.visit('/')

cy.get('.theme-default-content').contains('HomePage Content')
})

it('has footer', () => {
cy.visit('/')

cy.get('.footer').contains('Footer Content')
})
})
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
},
"prettier": "prettier-config-vuepress",
"devDependencies": {
"@commitlint/cli": "^18.5.0",
"@commitlint/config-conventional": "^18.5.0",
"@commitlint/cli": "^18.6.0",
"@commitlint/config-conventional": "^18.6.0",
"@lerna-lite/cli": "^3.2.1",
"@lerna-lite/publish": "^3.2.1",
"@types/node": "^20.11.6",
Expand All @@ -38,7 +38,7 @@
"eslint-config-vuepress": "^4.10.0",
"eslint-config-vuepress-typescript": "^4.10.0",
"eslint-plugin-cypress": "^2.15.1",
"husky": "^9.0.5",
"husky": "^9.0.6",
"lint-staged": "^15.2.0",
"prettier": "^3.2.4",
"prettier-config-vuepress": "^4.4.0",
Expand All @@ -48,7 +48,7 @@
"typescript": "^5.3.3",
"vite": "~5.0.12",
"vitest": "^1.2.1",
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"packageManager": "[email protected]",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-active-header-links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"vue-router": "^4.2.5"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-back-to-top/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"vue": "^3.4.15"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"markdown-it-container": "^4.0.0"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-docsearch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"vue-router": "^4.2.5"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-external-link-icon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"vue": "^3.4.15"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"execa": "^8.0.1"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-google-analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"clean": "rimraf lib *.tsbuildinfo"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-medium-zoom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"vue": "^3.4.15"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-nprogress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"vue-router": "^4.2.5"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-palette/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"chokidar": "^3.5.3"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-prismjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@types/prismjs": "^1.26.3"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-pwa-popup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"vue": "^3.4.15"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"workbox-build": "^7.0.0"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-register-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"chokidar": "^3.5.3"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"vue-router": "^4.2.5"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions plugins/plugin-shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
"clean": "rimraf lib *.tsbuildinfo"
},
"dependencies": {
"shikiji": "^0.10.0"
"shikiji": "^0.10.1"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-theme-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"vue": "^3.4.15"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion plugins/plugin-toc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"vue-router": "^4.2.5"
},
"peerDependencies": {
"vuepress": "2.0.0-rc.1"
"vuepress": "2.0.0-rc.2"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 00aba51

Please sign in to comment.