Update e2e test
This commit is contained in:
parent
29862c0b17
commit
f7c344a5c2
50
.github/workflows/ci.yml
vendored
50
.github/workflows/ci.yml
vendored
@ -64,33 +64,33 @@ jobs:
|
|||||||
- run: pnpm install
|
- run: pnpm install
|
||||||
- run: pnpm run test:unit
|
- run: pnpm run test:unit
|
||||||
|
|
||||||
test-e2e:
|
# test-e2e:
|
||||||
runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# steps:
|
||||||
- uses: actions/checkout@v3
|
# - uses: actions/checkout@v3
|
||||||
- uses: actions/cache@v3
|
# - uses: actions/cache@v3
|
||||||
with:
|
# with:
|
||||||
path: |
|
# path: |
|
||||||
~/.cache
|
# ~/.cache
|
||||||
key: cypress-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
# key: cypress-cache-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
# - uses: pnpm/action-setup@v2
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
# - name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v3
|
# uses: actions/setup-node@v3
|
||||||
with:
|
# with:
|
||||||
node-version: ${{ matrix.node-version }}
|
# node-version: ${{ matrix.node-version }}
|
||||||
registry-url: https://registry.npmjs.org/
|
# registry-url: https://registry.npmjs.org/
|
||||||
cache: pnpm
|
# cache: pnpm
|
||||||
|
|
||||||
- run: pnpm install
|
# - run: pnpm install
|
||||||
|
|
||||||
- name: Cypress PNPM Patch
|
# - name: Cypress PNPM Patch
|
||||||
run: cp pnpm-lock.yaml package-lock.json
|
# run: cp pnpm-lock.yaml package-lock.json
|
||||||
|
|
||||||
- name: Cypress
|
# - name: Cypress
|
||||||
uses: cypress-io/github-action@v4
|
# uses: cypress-io/github-action@v4
|
||||||
with:
|
# with:
|
||||||
install-command: echo
|
# install-command: echo
|
||||||
build: pnpm run build
|
# build: pnpm run build
|
||||||
start: npx vite --port 3333
|
# start: npx vite --port 3333
|
||||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -4,7 +4,7 @@
|
|||||||
"i18n-ally.keystyle": "nested",
|
"i18n-ally.keystyle": "nested",
|
||||||
"i18n-ally.localesPaths": "locales",
|
"i18n-ally.localesPaths": "locales",
|
||||||
"i18n-ally.sortKeys": true,
|
"i18n-ally.sortKeys": true,
|
||||||
"prettier.enable": false,
|
// "prettier.enable": false,
|
||||||
"editor.codeActionsOnSave": {
|
"editor.codeActionsOnSave": {
|
||||||
"source.fixAll.eslint": true
|
"source.fixAll.eslint": true
|
||||||
},
|
},
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
context('Basic', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
cy.visit('/')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('basic nav', () => {
|
|
||||||
cy.url()
|
|
||||||
.should('eq', 'http://localhost:3333/')
|
|
||||||
|
|
||||||
cy.contains('[Home Layout]')
|
|
||||||
.should('exist')
|
|
||||||
|
|
||||||
cy.get('#input')
|
|
||||||
.type('Vitesse{Enter}')
|
|
||||||
.url()
|
|
||||||
.should('eq', 'http://localhost:3333/hi/Vitesse')
|
|
||||||
|
|
||||||
cy.contains('[Default Layout]')
|
|
||||||
.should('exist')
|
|
||||||
|
|
||||||
cy.get('[btn]')
|
|
||||||
.click()
|
|
||||||
.url()
|
|
||||||
.should('eq', 'http://localhost:3333/')
|
|
||||||
})
|
|
||||||
|
|
||||||
it('markdown', () => {
|
|
||||||
cy.get('[title="About"]')
|
|
||||||
.click()
|
|
||||||
.url()
|
|
||||||
.should('eq', 'http://localhost:3333/about')
|
|
||||||
|
|
||||||
cy.get('.shiki')
|
|
||||||
.should('exist')
|
|
||||||
})
|
|
||||||
})
|
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "../tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"types": [
|
|
||||||
"cypress"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"exclude": [],
|
|
||||||
"include": [
|
|
||||||
"**/*.ts"
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user