-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7db2f3c
commit 9939b3b
Showing
12 changed files
with
320 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
export const visitH5Demo = (componentName, delay = 800) => { | ||
const getPath = () => `${Cypress.env('baseUrl')}${componentName}` | ||
cy.visit(getPath(componentName), { | ||
onBeforeLoad: (win) => { | ||
Object.defineProperty(win.navigator, 'userAgent', { | ||
value: | ||
'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Mobile/14E5239e Safari/602.1', | ||
}) | ||
}, | ||
}) | ||
cy.get('#nav').contains(componentName) | ||
cy.wait(delay) | ||
} | ||
export const visitTaroDemo = (componentName, delay = 1000) => { | ||
const getPath = (component) => | ||
`${Cypress.env('baseUrl')}base/pages/${component.toLowerCase()}/index` | ||
|
||
cy.visit(getPath(componentName)) | ||
cy.get('.applets-demo-header').contains(componentName) | ||
cy.wait(delay) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
import { componentTest } from './utils' | ||
import { visitH5Demo } from '../common/visit-demo' | ||
|
||
describe('bussiness components test', () => { | ||
componentTest('Barrage', () => {}) | ||
componentTest('Card', () => {}) | ||
componentTest('TimeSelect', () => {}) | ||
componentTest('TrendArrow', () => {}) | ||
componentTest('WaterMark', () => {}) | ||
componentTest('AvatarCropper', () => {}) | ||
it('Barrage', () => { | ||
visitH5Demo('Barrage') | ||
}) | ||
it('Card', () => { | ||
visitH5Demo('Card') | ||
}) | ||
it('TimeSelect', () => { | ||
visitH5Demo('TimeSelect') | ||
}) | ||
it('TrendArrow', () => { | ||
visitH5Demo('TrendArrow') | ||
}) | ||
it('WaterMark', () => { | ||
visitH5Demo('WaterMark') | ||
}) | ||
it('AvatarCropper', () => { | ||
visitH5Demo('AvatarCropper') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,67 @@ | ||
import { componentTest } from './utils' | ||
import { visitH5Demo } from '../common/visit-demo' | ||
|
||
describe('dentry components test', () => { | ||
componentTest('Address', () => {}) | ||
componentTest('Calendar', () => {}) | ||
componentTest('CalendarCard', () => {}) | ||
componentTest('Cascader', () => {}) | ||
componentTest('Checkbox', () => {}) | ||
componentTest('DatePicker', () => {}) | ||
componentTest('Form', () => {}) | ||
componentTest('Input', () => {}) | ||
componentTest('InputNumber', () => {}) | ||
componentTest('Menu', () => {}) | ||
componentTest('NumberKeyboard', () => {}) | ||
componentTest('Picker', () => {}) | ||
componentTest('Radio', () => {}) | ||
componentTest('Range', () => {}) | ||
componentTest('Rate', () => {}) | ||
componentTest('SearchBar', () => {}) | ||
componentTest('ShortPassword', () => {}) | ||
componentTest('Signature', () => {}) | ||
componentTest('Switch', () => {}) | ||
componentTest('TextArea', () => {}) | ||
componentTest('Uploader', () => {}) | ||
it('Address', () => { | ||
visitH5Demo('Address') | ||
}) | ||
it('Calendar', () => { | ||
visitH5Demo('Calendar') | ||
}) | ||
it('CalendarCard', () => { | ||
visitH5Demo('CalendarCard') | ||
}) | ||
it('Cascader', () => { | ||
visitH5Demo('Cascader') | ||
}) | ||
it('Checkbox', () => { | ||
visitH5Demo('Checkbox') | ||
}) | ||
it('DatePicker', () => { | ||
visitH5Demo('DatePicker') | ||
}) | ||
it('Form', () => { | ||
visitH5Demo('Form') | ||
}) | ||
it('Input', () => { | ||
visitH5Demo('Input') | ||
}) | ||
it('InputNumber', () => { | ||
visitH5Demo('InputNumber') | ||
}) | ||
it('Menu', () => { | ||
visitH5Demo('Menu') | ||
}) | ||
it('NumberKeyboard', () => { | ||
visitH5Demo('NumberKeyboard') | ||
}) | ||
it('Picker', () => { | ||
visitH5Demo('Picker') | ||
}) | ||
it('Radio', () => { | ||
visitH5Demo('Radio') | ||
}) | ||
it('Range', () => { | ||
visitH5Demo('Range') | ||
}) | ||
it('Rate', () => { | ||
visitH5Demo('Rate') | ||
}) | ||
it('SearchBar', () => { | ||
visitH5Demo('SearchBar') | ||
}) | ||
it('ShortPassword', () => { | ||
visitH5Demo('ShortPassword') | ||
}) | ||
it('Signature', () => { | ||
visitH5Demo('Signature') | ||
}) | ||
it('Switch', () => { | ||
visitH5Demo('Switch') | ||
}) | ||
it('TextArea', () => { | ||
visitH5Demo('TextArea') | ||
}) | ||
it('Uploader', () => { | ||
visitH5Demo('Uploader') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,61 @@ | ||
import { componentTest } from './utils' | ||
import { visitH5Demo } from '../common/visit-demo' | ||
|
||
describe('exhibition components test', () => { | ||
componentTest('Animate', () => {}) | ||
componentTest('AnimatingNumbers', () => {}) | ||
componentTest('Audio', () => {}) | ||
componentTest('Avatar', () => {}) | ||
componentTest('CircleProgress', () => {}) | ||
componentTest('Collapse', () => {}) | ||
componentTest('CountDown', () => {}) | ||
componentTest('Ellipsis', () => {}) | ||
componentTest('ImagePreview', () => {}) | ||
componentTest('Indicator', () => {}) | ||
componentTest('Pagination', () => {}) | ||
componentTest('Price', () => {}) | ||
componentTest('Progress', () => {}) | ||
componentTest('Swiper', () => {}) | ||
componentTest('Table', () => {}) | ||
componentTest('Tag', () => {}) | ||
componentTest('Tour', () => {}) | ||
componentTest('Video', () => {}) | ||
componentTest('VirtualList', () => {}) | ||
it('Animate', () => { | ||
visitH5Demo('Animate') | ||
}) | ||
it('AnimatingNumbers', () => { | ||
visitH5Demo('AnimatingNumbers') | ||
}) | ||
it('Audio', () => { | ||
visitH5Demo('Audio') | ||
}) | ||
it('Avatar', () => { | ||
visitH5Demo('Avatar') | ||
}) | ||
it('CircleProgress', () => { | ||
visitH5Demo('CircleProgress') | ||
}) | ||
it('Collapse', () => { | ||
visitH5Demo('Collapse') | ||
}) | ||
it('CountDown', () => { | ||
visitH5Demo('CountDown') | ||
}) | ||
it('Ellipsis', () => { | ||
visitH5Demo('Ellipsis') | ||
}) | ||
it('ImagePreview', () => { | ||
visitH5Demo('ImagePreview') | ||
}) | ||
it('Indicator', () => { | ||
visitH5Demo('Indicator') | ||
}) | ||
it('Pagination', () => { | ||
visitH5Demo('Pagination') | ||
}) | ||
it('Price', () => { | ||
visitH5Demo('Price') | ||
}) | ||
it('Progress', () => { | ||
visitH5Demo('Progress') | ||
}) | ||
it('Swiper', () => { | ||
visitH5Demo('Swiper') | ||
}) | ||
it('Table', () => { | ||
visitH5Demo('Table') | ||
}) | ||
it('Tag', () => { | ||
visitH5Demo('Tag') | ||
}) | ||
it('Tour', () => { | ||
visitH5Demo('Tour') | ||
}) | ||
it('Video', () => { | ||
visitH5Demo('Video') | ||
}) | ||
it('VirtualList', () => { | ||
visitH5Demo('VirtualList') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,52 @@ | ||
import { componentTest } from './utils' | ||
import { visitH5Demo } from '../common/visit-demo' | ||
|
||
describe('feedback components test', () => { | ||
componentTest('ActionSheet', () => {}) | ||
componentTest('Badge', () => {}) | ||
componentTest('Dialog', () => {}) | ||
componentTest('Drag', () => {}) | ||
componentTest('Empty', () => {}) | ||
componentTest('ResultPage', () => {}) | ||
componentTest('InfiniteLoading', () => {}) | ||
componentTest('Loading', () => {}) | ||
componentTest('NoticeBar', () => {}) | ||
componentTest('Notify', () => {}) | ||
componentTest('Popover', () => {}) | ||
componentTest('Popup', () => {}) | ||
componentTest('PullToRefresh', () => {}) | ||
componentTest('Skeleton', () => {}) | ||
componentTest('Swipe', () => {}) | ||
componentTest('Toast', () => {}) | ||
it('ActionSheet', () => { | ||
visitH5Demo('ActionSheet') | ||
}) | ||
it('Badge', () => { | ||
visitH5Demo('Badge') | ||
}) | ||
it('Dialog', () => { | ||
visitH5Demo('Dialog') | ||
}) | ||
it('Drag', () => { | ||
visitH5Demo('Drag') | ||
}) | ||
it('Empty', () => { | ||
visitH5Demo('Empty') | ||
}) | ||
it('ResultPage', () => { | ||
visitH5Demo('ResultPage') | ||
}) | ||
it('InfiniteLoading', () => { | ||
visitH5Demo('InfiniteLoading') | ||
}) | ||
it('Loading', () => { | ||
visitH5Demo('Loading') | ||
}) | ||
it('NoticeBar', () => { | ||
visitH5Demo('NoticeBar') | ||
}) | ||
it('Notify', () => { | ||
visitH5Demo('Notify') | ||
}) | ||
it('Popover', () => { | ||
visitH5Demo('Popover') | ||
}) | ||
it('Popup', () => { | ||
visitH5Demo('Popup') | ||
}) | ||
it('PullToRefresh', () => { | ||
visitH5Demo('PullToRefresh') | ||
}) | ||
it('Skeleton', () => { | ||
visitH5Demo('Skeleton') | ||
}) | ||
it('Swipe', () => { | ||
visitH5Demo('Swipe') | ||
}) | ||
it('Toast', () => { | ||
visitH5Demo('Toast') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,22 @@ | ||
import { componentTest } from './utils' | ||
import { visitH5Demo } from '../common/visit-demo' | ||
|
||
describe('layout components test', () => { | ||
componentTest('Divider', () => {}) | ||
componentTest('Grid', () => {}) | ||
componentTest('Layout', () => {}) | ||
componentTest('Space', () => {}) | ||
componentTest('Sticky', () => {}) | ||
componentTest('SafeArea', () => {}) | ||
it('Divider', () => { | ||
visitH5Demo('Divider') | ||
}) | ||
it('Grid', () => { | ||
visitH5Demo('Grid') | ||
}) | ||
it('Layout', () => { | ||
visitH5Demo('Layout') | ||
}) | ||
it('Space', () => { | ||
visitH5Demo('Space') | ||
}) | ||
it('Sticky', () => { | ||
visitH5Demo('Sticky') | ||
}) | ||
it('SafeArea', () => { | ||
visitH5Demo('SafeArea') | ||
}) | ||
}) |
Oops, something went wrong.