Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit 2074f7a

Browse files
committed
additional tests, adding reset
1 parent f120378 commit 2074f7a

28 files changed

+50
-247
lines changed

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"build": "lerna run build --no-private --stream",
1616
"dev": "NODE_ENV=development vite serve playground --config ./vite.config.ts",
1717
"playground:build": "yarn install && yarn build && yarn bootstrap && NODE_ENV=production vite build playground --config ./vite.config.ts",
18-
"cypress:open:ct": "cross-env NODE_ENV=test node ../cypress/core/tr1/cypress/scripts/cypress.js open-ct",
18+
"cypress:open:ct": "cypress open-ct",
1919
"lint": "eslint '*/**/*.{js,ts,tsx}' --quiet --fix",
2020
"docs:dev": "vitepress dev docs",
2121
"docs:build": "vitepress build docs",
@@ -70,8 +70,7 @@
7070
"concurrently": "^5.3.0",
7171
"consola": "^2.15.0",
7272
"cross-env": "^7.0.2",
73-
"cypress": "^6.8.0",
74-
"cypress-axe": "^0.12.2",
73+
"cypress": "https://cdn.cypress.io/beta/npm/6.9.0/circle-develop-3700fe7271b016f8a89c5a7a4c40d0af62155b45/cypress.tgz",
7574
"esbuild-jest": "^0.4.0",
7675
"eslint": "^7.0.0",
7776
"eslint-config-prettier": "^6.12.0",

packages/c-alert/tests/c-alert.test.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

packages/c-alert/tests/c-alert.test.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ it('contains the correct role', () => {
1616
.should('exist')
1717
})
1818

19-
it('renders its children', () => {
19+
it.only('renders its children', () => {
20+
debugger;
2021
cy.mount(
2122
<CAlert data-testid="alert" variant="left-accent" status="info" mb="3">
2223
<CAlertIcon mr="2" />

packages/c-badge/tests/c-badge.test.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * as WithButtonGroup from './with-button-group.vue'

packages/c-button/examples/button.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
export * as AsIconButton from './as-icon-button.vue'
2+
export * as BaseButton from './base-button.vue'
3+
export * as WithAttachedButtons from './with-attached-buttons.vue'
4+
export * as WithButtonSize from '../examples/with-button-size.vue'
5+
export * as WithButtonIcon from '../examples/with-button-icon.vue'
6+
export * as WithButtonVariants from '../examples/with-button-variants.vue'
7+
export * as WithLoadingStatus from '../examples/with-loading-status.vue'

packages/c-button/examples/index.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,2 @@
1-
export * as AsIconButton from './as-icon-button.vue'
2-
export * as BaseButton from './base-button.vue'
3-
export * as WithAttachedButtons from './with-attached-buttons.vue'
4-
export * as WithButtonGroup from '../examples/with-button-group.vue'
5-
export * as WithButtonSize from '../examples/with-button-size.vue'
6-
export * as withButtonIcon from '../examples/with-button-icon.vue'
7-
export * as WithButtonVariants from '../examples/with-button-variants.vue'
8-
export * as WithLoadingStatus from '../examples/with-loading-status.vue'
1+
export * as Button from './button'
2+
export * as ButtonGroup from './button-group'

packages/c-button/tests/c-button-group.test.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { h } from 'vue'
2+
import { CButtonGroup, CButton } from '../src'
3+
import { ButtonGroup } from '../examples'
4+
5+
afterEach(() => {
6+
cy.checkA11y()
7+
})
8+
9+
Object.entries(ButtonGroup).map(([name, example]) => {
10+
it(`renders ${name} successfully`, () => {
11+
cy.mount(example.default).checkA11y()
12+
})
13+
})
14+
15+
it('with a color scheme', () => {
16+
cy.mount(
17+
<CButtonGroup>
18+
<CButton colorScheme="blue">Save</CButton>
19+
<CButton>Cancel</CButton>
20+
</CButtonGroup>
21+
)
22+
})
Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
import * as Examples from '../examples'
1+
import { Button } from '../examples'
22
import { h } from 'vue'
33

4-
5-
describe('Button Examples', () => {
6-
it('works', () => {
7-
expect(true).to.be.true
8-
})
9-
10-
Object.entries(Examples).map(([name, example]) => {
11-
it(`renders ${name} successfully`, () => {
12-
cy.mount(example.default).checkA11y()
13-
})
4+
Object.entries(Button).map(([name, example]) => {
5+
it(`renders ${name} successfully`, () => {
6+
cy.mount(example.default).checkA11y()
147
})
15-
})
8+
})

0 commit comments

Comments
 (0)