From b6c0a141ba36e3fc2ec102c2f15d1bcc86d656da Mon Sep 17 00:00:00 2001 From: Wei Zhu Date: Thu, 2 Mar 2017 19:04:16 +0800 Subject: [PATCH] Run snapshots test againts demos --- .babelrc | 2 +- .gitignore | 1 + .jest.json | 33 + .jest.web.json | 31 + .../__snapshots__/demo.test.web.js.snap | 163 + .../accordion/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 187 ++ .../__snapshots__/demo.test.web.js.snap | 44 + .../action-sheet/__tests__/demo.test.js | 3 + .../action-sheet/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 607 ++++ .../__snapshots__/demo.test.web.js.snap | 100 + .../activity-indicator/__tests__/demo.test.js | 3 + .../__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 475 +++ .../__snapshots__/demo.test.web.js.snap | 306 ++ components/badge/__tests__/demo.test.js | 3 + components/badge/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 554 ++++ .../__snapshots__/demo.test.web.js.snap | 186 ++ ...eb.test.js.snap => index.test.web.js.snap} | 0 components/button/__tests__/demo.test.js | 3 + components/button/__tests__/demo.test.web.js | 3 + .../{index.web.test.js => index.test.web.js} | 0 .../__tests__/__snapshots__/demo.test.js.snap | 378 +++ .../__snapshots__/demo.test.web.js.snap | 114 + components/card/__tests__/demo.test.js | 3 + components/card/__tests__/demo.test.web.js | 3 + components/card/index.web.tsx | 6 +- .../__tests__/__snapshots__/demo.test.js.snap | 428 +++ .../__snapshots__/demo.test.web.js.snap | 141 + components/carousel/__tests__/demo.test.js | 3 + .../carousel/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 1142 +++++++ .../__snapshots__/demo.test.web.js.snap | 187 ++ components/checkbox/__tests__/demo.test.js | 3 + .../checkbox/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 169 + .../__snapshots__/demo.test.web.js.snap | 160 + components/date-picker/__tests__/demo.test.js | 3 + .../date-picker/__tests__/demo.test.web.js | 3 + .../__snapshots__/demo.test.web.js.snap | 928 ++++++ components/drawer/__tests__/demo.test.js | 3 + components/drawer/__tests__/demo.test.web.js | 3 + components/drawer/demo/basic.tsx | 2 + .../__tests__/__snapshots__/demo.test.js.snap | 2604 +++++++++++++++ .../__snapshots__/demo.test.web.js.snap | 321 ++ components/flex/__tests__/demo.test.js | 3 + components/flex/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 2308 +++++++++++++ .../__snapshots__/demo.test.web.js.snap | 768 +++++ components/grid/__tests__/demo.test.js | 3 + components/grid/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 1477 +++++++++ .../__snapshots__/demo.test.web.js.snap | 479 +++ components/icon/__tests__/demo.test.js | 3 + components/icon/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 647 ++++ .../__snapshots__/demo.test.web.js.snap | 111 + .../image-picker/__tests__/demo.test.js | 3 + .../image-picker/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 1332 ++++++++ .../__snapshots__/demo.test.web.js.snap | 420 +++ components/input-item/__tests__/demo.test.js | 3 + .../input-item/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 2871 +++++++++++++++++ .../__snapshots__/demo.test.web.js.snap | 1022 ++++++ components/list-view/__tests__/demo.test.js | 3 + .../list-view/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 1779 ++++++++++ .../__snapshots__/demo.test.web.js.snap | 644 ++++ components/list/__tests__/demo.test.js | 3 + components/list/__tests__/demo.test.web.js | 3 + components/list/index.web.tsx | 2 +- .../__tests__/__snapshots__/demo.test.js.snap | 543 ++++ .../__snapshots__/demo.test.web.js.snap | 99 + .../locale-provider/__tests__/demo.test.js | 3 + .../__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 7 + .../__snapshots__/demo.test.web.js.snap | 42 + components/menu/__tests__/demo.test.js | 3 + components/menu/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 427 +++ .../__snapshots__/demo.test.web.js.snap | 164 + components/modal/__tests__/demo.test.js | 3 + components/modal/__tests__/demo.test.web.js | 3 + .../__snapshots__/demo.test.web.js.snap | 54 + components/nav-bar/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 582 ++++ .../__snapshots__/demo.test.web.js.snap | 166 + components/notice-bar/__tests__/demo.test.js | 3 + .../notice-bar/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 735 +++++ .../__snapshots__/demo.test.web.js.snap | 182 ++ components/pagination/__tests__/demo.test.js | 3 + .../pagination/__tests__/demo.test.web.js | 3 + .../__snapshots__/demo.test.web.js.snap | 64 + .../picker-view/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 176 + .../__snapshots__/demo.test.web.js.snap | 130 + components/picker/__tests__/demo.test.js | 3 + components/picker/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 117 + .../__snapshots__/demo.test.web.js.snap | 37 + components/popover/__tests__/demo.test.js | 3 + components/popover/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 159 + .../__snapshots__/demo.test.web.js.snap | 31 + components/popup/__tests__/demo.test.js | 3 + components/popup/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 206 ++ .../__snapshots__/demo.test.web.js.snap | 55 + components/progress/__tests__/demo.test.js | 3 + .../progress/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 663 ++++ .../__snapshots__/demo.test.web.js.snap | 373 +++ components/radio/__tests__/demo.test.js | 3 + components/radio/__tests__/demo.test.web.js | 3 + .../__snapshots__/demo.test.web.js.snap | 133 + components/range/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 789 +++++ .../__snapshots__/demo.test.web.js.snap | 230 ++ .../refresh-control/__tests__/demo.test.js | 3 + .../__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 450 +++ .../__snapshots__/demo.test.web.js.snap | 181 ++ components/result/__tests__/demo.test.js | 3 + components/result/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 155 + .../__snapshots__/demo.test.web.js.snap | 222 ++ components/search-bar/__tests__/demo.test.js | 3 + .../search-bar/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 158 + .../__snapshots__/demo.test.web.js.snap | 171 + .../segmented-control/__tests__/demo.test.js | 3 + .../__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 283 ++ .../__snapshots__/demo.test.web.js.snap | 230 ++ components/slider/__tests__/demo.test.js | 3 + components/slider/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 722 +++++ .../__snapshots__/demo.test.web.js.snap | 140 + components/stepper/__tests__/demo.test.js | 3 + components/stepper/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 1672 ++++++++++ .../__snapshots__/demo.test.web.js.snap | 1412 ++++++++ components/steps/__tests__/demo.test.js | 3 + components/steps/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 200 ++ .../__snapshots__/demo.test.web.js.snap | 180 ++ .../swipe-action/__tests__/demo.test.js | 3 + .../swipe-action/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 476 +++ .../__snapshots__/demo.test.web.js.snap | 137 + components/switch/__tests__/demo.test.js | 3 + components/switch/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 126 + .../__snapshots__/demo.test.web.js.snap | 196 ++ components/tab-bar/__tests__/demo.test.js | 3 + components/tab-bar/__tests__/demo.test.web.js | 3 + .../__snapshots__/demo.test.web.js.snap | 362 +++ components/table/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 318 ++ .../__snapshots__/demo.test.web.js.snap | 361 +++ components/tabs/__tests__/demo.test.js | 3 + components/tabs/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 519 +++ .../__snapshots__/demo.test.web.js.snap | 74 + components/tag/__tests__/demo.test.js | 3 + components/tag/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 467 +++ .../__snapshots__/demo.test.web.js.snap | 357 ++ .../textarea-item/__tests__/demo.test.js | 3 + .../textarea-item/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 539 ++++ .../__snapshots__/demo.test.web.js.snap | 77 + components/toast/__tests__/demo.test.js | 3 + components/toast/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 171 + .../__snapshots__/demo.test.web.js.snap | 46 + components/white-space/__tests__/demo.test.js | 3 + .../white-space/__tests__/demo.test.web.js | 3 + .../__tests__/__snapshots__/demo.test.js.snap | 141 + .../__snapshots__/demo.test.web.js.snap | 41 + components/wing-blank/__tests__/demo.test.js | 3 + .../wing-blank/__tests__/demo.test.web.js | 3 + package.json | 34 +- rn-kitchen-sink/android/app/build.gradle | 2 +- tests/imageStub.js | 1 + tests/setup.js | 57 + tests/shared/demoTest.js | 41 + 191 files changed, 40244 insertions(+), 35 deletions(-) create mode 100644 .jest.json create mode 100644 .jest.web.json create mode 100644 components/accordion/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/accordion/__tests__/demo.test.web.js create mode 100644 components/action-sheet/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/action-sheet/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/action-sheet/__tests__/demo.test.js create mode 100644 components/action-sheet/__tests__/demo.test.web.js create mode 100644 components/activity-indicator/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/activity-indicator/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/activity-indicator/__tests__/demo.test.js create mode 100644 components/activity-indicator/__tests__/demo.test.web.js create mode 100644 components/badge/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/badge/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/badge/__tests__/demo.test.js create mode 100644 components/badge/__tests__/demo.test.web.js create mode 100644 components/button/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/button/__tests__/__snapshots__/demo.test.web.js.snap rename components/button/__tests__/__snapshots__/{index.web.test.js.snap => index.test.web.js.snap} (100%) create mode 100644 components/button/__tests__/demo.test.js create mode 100644 components/button/__tests__/demo.test.web.js rename components/button/__tests__/{index.web.test.js => index.test.web.js} (100%) create mode 100644 components/card/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/card/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/card/__tests__/demo.test.js create mode 100644 components/card/__tests__/demo.test.web.js create mode 100644 components/carousel/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/carousel/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/carousel/__tests__/demo.test.js create mode 100644 components/carousel/__tests__/demo.test.web.js create mode 100644 components/checkbox/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/checkbox/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/checkbox/__tests__/demo.test.js create mode 100644 components/checkbox/__tests__/demo.test.web.js create mode 100644 components/date-picker/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/date-picker/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/date-picker/__tests__/demo.test.js create mode 100644 components/date-picker/__tests__/demo.test.web.js create mode 100644 components/drawer/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/drawer/__tests__/demo.test.js create mode 100644 components/drawer/__tests__/demo.test.web.js create mode 100644 components/flex/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/flex/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/flex/__tests__/demo.test.js create mode 100644 components/flex/__tests__/demo.test.web.js create mode 100644 components/grid/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/grid/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/grid/__tests__/demo.test.js create mode 100644 components/grid/__tests__/demo.test.web.js create mode 100644 components/icon/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/icon/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/icon/__tests__/demo.test.js create mode 100644 components/icon/__tests__/demo.test.web.js create mode 100644 components/image-picker/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/image-picker/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/image-picker/__tests__/demo.test.js create mode 100644 components/image-picker/__tests__/demo.test.web.js create mode 100644 components/input-item/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/input-item/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/input-item/__tests__/demo.test.js create mode 100644 components/input-item/__tests__/demo.test.web.js create mode 100644 components/list-view/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/list-view/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/list-view/__tests__/demo.test.js create mode 100644 components/list-view/__tests__/demo.test.web.js create mode 100644 components/list/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/list/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/list/__tests__/demo.test.js create mode 100644 components/list/__tests__/demo.test.web.js create mode 100644 components/locale-provider/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/locale-provider/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/locale-provider/__tests__/demo.test.js create mode 100644 components/locale-provider/__tests__/demo.test.web.js create mode 100644 components/menu/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/menu/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/menu/__tests__/demo.test.js create mode 100644 components/menu/__tests__/demo.test.web.js create mode 100644 components/modal/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/modal/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/modal/__tests__/demo.test.js create mode 100644 components/modal/__tests__/demo.test.web.js create mode 100644 components/nav-bar/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/nav-bar/__tests__/demo.test.web.js create mode 100644 components/notice-bar/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/notice-bar/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/notice-bar/__tests__/demo.test.js create mode 100644 components/notice-bar/__tests__/demo.test.web.js create mode 100644 components/pagination/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/pagination/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/pagination/__tests__/demo.test.js create mode 100644 components/pagination/__tests__/demo.test.web.js create mode 100644 components/picker-view/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/picker-view/__tests__/demo.test.web.js create mode 100644 components/picker/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/picker/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/picker/__tests__/demo.test.js create mode 100644 components/picker/__tests__/demo.test.web.js create mode 100644 components/popover/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/popover/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/popover/__tests__/demo.test.js create mode 100644 components/popover/__tests__/demo.test.web.js create mode 100644 components/popup/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/popup/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/popup/__tests__/demo.test.js create mode 100644 components/popup/__tests__/demo.test.web.js create mode 100644 components/progress/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/progress/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/progress/__tests__/demo.test.js create mode 100644 components/progress/__tests__/demo.test.web.js create mode 100644 components/radio/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/radio/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/radio/__tests__/demo.test.js create mode 100644 components/radio/__tests__/demo.test.web.js create mode 100644 components/range/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/range/__tests__/demo.test.web.js create mode 100644 components/refresh-control/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/refresh-control/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/refresh-control/__tests__/demo.test.js create mode 100644 components/refresh-control/__tests__/demo.test.web.js create mode 100644 components/result/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/result/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/result/__tests__/demo.test.js create mode 100644 components/result/__tests__/demo.test.web.js create mode 100644 components/search-bar/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/search-bar/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/search-bar/__tests__/demo.test.js create mode 100644 components/search-bar/__tests__/demo.test.web.js create mode 100644 components/segmented-control/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/segmented-control/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/segmented-control/__tests__/demo.test.js create mode 100644 components/segmented-control/__tests__/demo.test.web.js create mode 100644 components/slider/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/slider/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/slider/__tests__/demo.test.js create mode 100644 components/slider/__tests__/demo.test.web.js create mode 100644 components/stepper/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/stepper/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/stepper/__tests__/demo.test.js create mode 100644 components/stepper/__tests__/demo.test.web.js create mode 100644 components/steps/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/steps/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/steps/__tests__/demo.test.js create mode 100644 components/steps/__tests__/demo.test.web.js create mode 100644 components/swipe-action/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/swipe-action/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/swipe-action/__tests__/demo.test.js create mode 100644 components/swipe-action/__tests__/demo.test.web.js create mode 100644 components/switch/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/switch/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/switch/__tests__/demo.test.js create mode 100644 components/switch/__tests__/demo.test.web.js create mode 100644 components/tab-bar/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/tab-bar/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/tab-bar/__tests__/demo.test.js create mode 100644 components/tab-bar/__tests__/demo.test.web.js create mode 100644 components/table/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/table/__tests__/demo.test.web.js create mode 100644 components/tabs/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/tabs/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/tabs/__tests__/demo.test.js create mode 100644 components/tabs/__tests__/demo.test.web.js create mode 100644 components/tag/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/tag/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/tag/__tests__/demo.test.js create mode 100644 components/tag/__tests__/demo.test.web.js create mode 100644 components/textarea-item/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/textarea-item/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/textarea-item/__tests__/demo.test.js create mode 100644 components/textarea-item/__tests__/demo.test.web.js create mode 100644 components/toast/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/toast/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/toast/__tests__/demo.test.js create mode 100644 components/toast/__tests__/demo.test.web.js create mode 100644 components/white-space/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/white-space/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/white-space/__tests__/demo.test.js create mode 100644 components/white-space/__tests__/demo.test.web.js create mode 100644 components/wing-blank/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/wing-blank/__tests__/__snapshots__/demo.test.web.js.snap create mode 100644 components/wing-blank/__tests__/demo.test.js create mode 100644 components/wing-blank/__tests__/demo.test.web.js create mode 100644 tests/imageStub.js create mode 100644 tests/setup.js create mode 100644 tests/shared/demoTest.js diff --git a/.babelrc b/.babelrc index f8d168a017d..c1d070078db 100644 --- a/.babelrc +++ b/.babelrc @@ -1,4 +1,4 @@ { "presets": ["react-native"], - "plugins": [["import", { "libraryName": "antd-mobile", "libraryDirectory": "components" }]] + "plugins": [["import", { "libraryName": "antd-mobile", "libraryDirectory": "../../../../components" }]] } diff --git a/.gitignore b/.gitignore index c8cb4aed016..ecfa728ea20 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ my-release-key.keystore yarn.lock npm-debug.log* !components/**/__tests__/*.js +coverage diff --git a/.jest.json b/.jest.json new file mode 100644 index 00000000000..45b95714c58 --- /dev/null +++ b/.jest.json @@ -0,0 +1,33 @@ +{ + "preset": "react-native", + "setupFiles": [ + "./tests/setup.js" + ], + "moduleFileExtensions": [ + "ts", + "tsx", + "js", + "jsx", + "json", + "md" + ], + "moduleNameMapper": { + "\\.png": "/tests/imageStub.js" + }, + "testPathIgnorePatterns": [ + "/node_modules/", + "_site", + "site" + ], + "transform": { + "\\.tsx?$": "./node_modules/typescript-babel-jest", + "\\.js$": "./node_modules/babel-jest", + "\\.md$": "./node_modules/antd-demo-jest/mobile" + }, + "testRegex": ".*\\.test\\.js$", + "collectCoverageFrom": [ + "components/**/*.{ts,tsx}", + "!components/*/style/index.tsx" + ], + "testEnvironment": "jsdom" +} diff --git a/.jest.web.json b/.jest.web.json new file mode 100644 index 00000000000..0be2b2f25b5 --- /dev/null +++ b/.jest.web.json @@ -0,0 +1,31 @@ +{ + "moduleFileExtensions": [ + "web.tsx", + "web.js", + "ts", + "tsx", + "js", + "jsx", + "json", + "md" + ], + "moduleNameMapper": { + "\\.svg$": "/tests/imageStub.js" + }, + "testPathIgnorePatterns": [ + "/node_modules/", + "_site", + "site" + ], + "transform": { + "\\.tsx?$": "./node_modules/typescript-babel-jest", + "\\.js$": "./node_modules/babel-jest", + "\\.md$": "./node_modules/antd-demo-jest/mobile" + }, + "testRegex": ".*\\.test\\.web\\.js$", + "collectCoverageFrom": [ + "components/**/*.{ts,tsx}", + "!components/*/style/index.tsx" + ], + "testEnvironment": "jsdom" +} diff --git a/components/accordion/__tests__/__snapshots__/demo.test.web.js.snap b/components/accordion/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..3dc4f9e18ae --- /dev/null +++ b/components/accordion/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,163 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/accordion/demo/accordion.md correctly 1`] = ` +
+
+
+ +
+
+ +
+
+ +
+
+
+`; + +exports[`renders ./components/accordion/demo/basic.md correctly 1`] = ` +
+
+
+ +
+
+
+
+
+
+
+ 子内容一 +
+
+
+
+
+
+ 子内容二 +
+
+
+
+
+
+ 子内容三 +
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+`; diff --git a/components/accordion/__tests__/demo.test.web.js b/components/accordion/__tests__/demo.test.web.js new file mode 100644 index 00000000000..87c9bfba742 --- /dev/null +++ b/components/accordion/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('accordion'); diff --git a/components/action-sheet/__tests__/__snapshots__/demo.test.js.snap b/components/action-sheet/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..69a8bc6385c --- /dev/null +++ b/components/action-sheet/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,187 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/action-sheet/demo/basic.tsx correctly 1`] = ` + + + + + 默认状态操作列表 + + + + + 点击过的按钮: + none + + + + + 带分享功能的操作列表 + + + + + + + +`; diff --git a/components/action-sheet/__tests__/__snapshots__/demo.test.web.js.snap b/components/action-sheet/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..26955bab0e0 --- /dev/null +++ b/components/action-sheet/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,44 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/action-sheet/demo/basic.md correctly 1`] = ` + +`; diff --git a/components/action-sheet/__tests__/demo.test.js b/components/action-sheet/__tests__/demo.test.js new file mode 100644 index 00000000000..3c65c08c9cf --- /dev/null +++ b/components/action-sheet/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('action-sheet'); diff --git a/components/action-sheet/__tests__/demo.test.web.js b/components/action-sheet/__tests__/demo.test.web.js new file mode 100644 index 00000000000..2f43b2e1dab --- /dev/null +++ b/components/action-sheet/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('action-sheet'); diff --git a/components/activity-indicator/__tests__/__snapshots__/demo.test.js.snap b/components/activity-indicator/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..44a97354d5d --- /dev/null +++ b/components/activity-indicator/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,607 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/activity-indicator/demo/basic.tsx correctly 1`] = ` + + + + + + Icon无文案 + + + + + + + + + + + + + + + Icon带文案 + + + + + + + 正在加载... + + + + + + + + + + + 深色背景 + + + + + + + + + + + + + + + + + 大号icon + + + + + + + + + + + + + + 点击显示 Toast + + + + +`; diff --git a/components/activity-indicator/__tests__/__snapshots__/demo.test.web.js.snap b/components/activity-indicator/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..18e3ef558ce --- /dev/null +++ b/components/activity-indicator/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,100 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/activity-indicator/demo/basic.md correctly 1`] = ` +
+
+
+

+ icon无文案 +

+
+
+ +
+
+
+

+ icon带文案 +

+
+
+ + + 加载中... + +
+
+
+

+ 大号icon,自定义文案样式 +

+
+
+
+ +
+ + 加载中... + +
+
+
+ +`; diff --git a/components/activity-indicator/__tests__/demo.test.js b/components/activity-indicator/__tests__/demo.test.js new file mode 100644 index 00000000000..496e45ecdf8 --- /dev/null +++ b/components/activity-indicator/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('activity-indicator'); diff --git a/components/activity-indicator/__tests__/demo.test.web.js b/components/activity-indicator/__tests__/demo.test.web.js new file mode 100644 index 00000000000..2d0d85287cc --- /dev/null +++ b/components/activity-indicator/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('activity-indicator'); diff --git a/components/badge/__tests__/__snapshots__/demo.test.js.snap b/components/badge/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..7a49ecc9a47 --- /dev/null +++ b/components/badge/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,475 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/badge/demo/basic.tsx correctly 1`] = ` + + + + + + + + 9 + + + + + + + + + + + + 100+ + + + + + + + + + + + + 99+ + + + + + + + + + + + + new + + + + + + + + + + + + + + + + + + + + 33 + + + + + + +`; diff --git a/components/badge/__tests__/__snapshots__/demo.test.web.js.snap b/components/badge/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..7af63a9398d --- /dev/null +++ b/components/badge/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,306 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/badge/demo/basic.md correctly 1`] = ` +
+
+
+
+
+
+ + + + + + + + 小圆点 + +
+
+ 内容内容 +
+
+
+
+
+
+ +
+
+
+ 文本内容 +
+
+ + + 77 + + +
+
+
+
+
+
+
+ 文本内容 +
+
+ + + 促 + + +
+
+
+
+
+
+ 文本内容 + + + new + + +
+
+ 内容内容 +
+
+
+
+
+
+
+ 营销: + + + 减 + + + + + 惠 + + + + + 免 + + + + + 反 + + + + + HOT + + +
+
+
+
+
+
+ 自定义: + + + 4 + + + + + 券 + + + + + NEW + + + + + 自动缴费 + + +
+
+
+
+
+
+ 超出99 + + + 99+ + + +
+
+ 内容内容 +
+
+
+
+
+
+`; diff --git a/components/badge/__tests__/demo.test.js b/components/badge/__tests__/demo.test.js new file mode 100644 index 00000000000..f91e48230fb --- /dev/null +++ b/components/badge/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('badge'); diff --git a/components/badge/__tests__/demo.test.web.js b/components/badge/__tests__/demo.test.web.js new file mode 100644 index 00000000000..5205baad24d --- /dev/null +++ b/components/badge/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('badge'); diff --git a/components/button/__tests__/__snapshots__/demo.test.js.snap b/components/button/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..380623a3d11 --- /dev/null +++ b/components/button/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,554 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/button/demo/basic.tsx correctly 1`] = ` + + + + + + default button + + + + + + primary button + + + + + + warning button + + + + + + disable button + + + + + + 无点击反馈 + + + + + + 自定义点击反馈 style + + + + + + 小按钮 + + + + ghost small button + + + + +`; diff --git a/components/button/__tests__/__snapshots__/demo.test.web.js.snap b/components/button/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..d8ab5bc0afc --- /dev/null +++ b/components/button/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,186 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/button/demo/basic.md correctly 1`] = ` +
+ +`; + +exports[`renders ./components/button/demo/complex.md correctly 1`] = ` +
+
+
+
+
+ 区域经理 +
+ 可进行收款、退款、折扣管理、查看数据等操作 +
+
+ +
+
+
+
+
+ 区域经理 +
+ 可进行收款、退款、折扣管理、查看数据等操作 +
+
+ +
+
+
+
+`; diff --git a/components/button/__tests__/__snapshots__/index.web.test.js.snap b/components/button/__tests__/__snapshots__/index.test.web.js.snap similarity index 100% rename from components/button/__tests__/__snapshots__/index.web.test.js.snap rename to components/button/__tests__/__snapshots__/index.test.web.js.snap diff --git a/components/button/__tests__/demo.test.js b/components/button/__tests__/demo.test.js new file mode 100644 index 00000000000..f4ce50e43ab --- /dev/null +++ b/components/button/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('button'); diff --git a/components/button/__tests__/demo.test.web.js b/components/button/__tests__/demo.test.web.js new file mode 100644 index 00000000000..4d738aad259 --- /dev/null +++ b/components/button/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('button'); diff --git a/components/button/__tests__/index.web.test.js b/components/button/__tests__/index.test.web.js similarity index 100% rename from components/button/__tests__/index.web.test.js rename to components/button/__tests__/index.test.web.js diff --git a/components/card/__tests__/__snapshots__/demo.test.js.snap b/components/card/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..e9eb8e64b13 --- /dev/null +++ b/components/card/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,378 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/card/demo/basic.tsx correctly 1`] = ` + + + + + + + + 这是 title + + + + this is extra + + + + + + 这是卡片内容 + + + + + + 这是卡尾 + + + 这是尾部介绍 + + + + + + + + + + + 这是 title + + + + this is extra + + + + + + 这是卡片内容 + + + + + + 这是卡尾 + + + 这是尾部介绍 + + + + +`; diff --git a/components/card/__tests__/__snapshots__/demo.test.web.js.snap b/components/card/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..5fbabba1368 --- /dev/null +++ b/components/card/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,114 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/card/demo/basic.md correctly 1`] = ` +
+
+
+
+
+ + 这是 title +
+
+ + this is extra + +
+
+
+
+ 这是卡片内容 +
+
+ +
+
+
+`; + +exports[`renders ./components/card/demo/full.md correctly 1`] = ` +
+
+
+
+
+ + 这是 title +
+
+ + this is extra + +
+
+
+
+ 这是卡片内容 +
+
+ +
+
+`; diff --git a/components/card/__tests__/demo.test.js b/components/card/__tests__/demo.test.js new file mode 100644 index 00000000000..ba7c6b904e4 --- /dev/null +++ b/components/card/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('card'); diff --git a/components/card/__tests__/demo.test.web.js b/components/card/__tests__/demo.test.web.js new file mode 100644 index 00000000000..a6b35401142 --- /dev/null +++ b/components/card/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('card'); diff --git a/components/card/index.web.tsx b/components/card/index.web.tsx index 07c76a3eeee..9feb56c4270 100644 --- a/components/card/index.web.tsx +++ b/components/card/index.web.tsx @@ -1,8 +1,8 @@ import React from 'react'; import classNames from 'classnames'; -import CardHeader from './CardHeader'; -import CardBody from './CardBody'; -import CardFooter from './CardFooter'; +import CardHeader from './CardHeader.web'; +import CardBody from './CardBody.web'; +import CardFooter from './CardFooter.web'; export interface CardProps { prefixCls?: string; diff --git a/components/carousel/__tests__/__snapshots__/demo.test.js.snap b/components/carousel/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..2cc668585c1 --- /dev/null +++ b/components/carousel/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,428 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/carousel/demo/basic.tsx correctly 1`] = ` + + + + + + + + Carousel 5 + + + + + + + Carousel 1 + + + + + + + Carousel 2 + + + + + + + Carousel 3 + + + + + + + Carousel 4 + + + + + + + Carousel 5 + + + + + + + Carousel 1 + + + + + + + + + + + + + + + + Carousel 根据内容自适应高度 + + + +`; diff --git a/components/carousel/__tests__/__snapshots__/demo.test.web.js.snap b/components/carousel/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..8acb578d78c --- /dev/null +++ b/components/carousel/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,141 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/carousel/demo/basic.md correctly 1`] = ` +
+
+ normal +
+ +
+
+ vertical +
+ +
+`; diff --git a/components/carousel/__tests__/demo.test.js b/components/carousel/__tests__/demo.test.js new file mode 100644 index 00000000000..19d847464c9 --- /dev/null +++ b/components/carousel/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('carousel'); diff --git a/components/carousel/__tests__/demo.test.web.js b/components/carousel/__tests__/demo.test.web.js new file mode 100644 index 00000000000..92c6c8bad7c --- /dev/null +++ b/components/carousel/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('carousel'); diff --git a/components/checkbox/__tests__/__snapshots__/demo.test.js.snap b/components/checkbox/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..3fdf9c41245 --- /dev/null +++ b/components/checkbox/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,1142 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/checkbox/demo/basic.tsx correctly 1`] = ` + + + + + + + + + + Checkbox + + + + + + + + + + + + + + + + + + + 同意同意同意同意同意同意同意同意同意同意同意同意同意同意同意同意同意同意同意同意同意 + + + + + + + + + + + 同意 《信用支付服务合同 + + + + + + + + + + + 未选中,不可编辑 《信用支付服务合同》 + + + + + + + + + + + 强制选中,不可编辑 《信用支付服务合同信用支付服务合同信用支付服务合同》 + + + + + + + 表单多选项,普通列表中多选项 + + + + + + + + + + 签约 + + + + + + + + + + + + + + 物料铺设 + + + + + + + + + + + + + + 机具维护(不能选) + + + + + + + + + + + + + + 产品问题解决(必选) + + + + + + + + + +`; diff --git a/components/checkbox/__tests__/__snapshots__/demo.test.web.js.snap b/components/checkbox/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..fd38138647c --- /dev/null +++ b/components/checkbox/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,187 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/checkbox/demo/basic.md correctly 1`] = ` +
+
+
+ CheckboxItem 演示 +
+
+
+
+ +
+
+
+ 博士 +
+
+
+
+
+ +
+
+
+ 本科 +
+
+
+
+
+ +
+
+
+ 高中 +
+
+
+
+
+ +
+
+
+ 初中 +
+ 辅助文字内容 +
+
+
+
+
+
+
+
+
+ +
+
+
+
+`; diff --git a/components/checkbox/__tests__/demo.test.js b/components/checkbox/__tests__/demo.test.js new file mode 100644 index 00000000000..6f16592a325 --- /dev/null +++ b/components/checkbox/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('checkbox'); diff --git a/components/checkbox/__tests__/demo.test.web.js b/components/checkbox/__tests__/demo.test.web.js new file mode 100644 index 00000000000..3c6691465d1 --- /dev/null +++ b/components/checkbox/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('checkbox'); diff --git a/components/date-picker/__tests__/__snapshots__/demo.test.js.snap b/components/date-picker/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..d2115b7a7e9 --- /dev/null +++ b/components/date-picker/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,169 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/date-picker/demo/popup.tsx correctly 1`] = ` + + + + + + + + + + 选择时间 + + + + + 请选择 + + + + + + + + + + + +`; diff --git a/components/date-picker/__tests__/__snapshots__/demo.test.web.js.snap b/components/date-picker/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..79fa9066cad --- /dev/null +++ b/components/date-picker/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,160 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/date-picker/demo/basic.md correctly 1`] = ` +
+
+
+
+
+
+
+ 日期 +
+
+ 2016-11-22 +
+
+
+
+
+
+
+
+
+ 时间 +
+
+ 请选择 +
+
+
+
+
+
+
+
+
+ 时间,限定上下限 +
+
+ 00:00 +
+
+
+
+
+
+
+
+
+ 日期+时间 +
+
+ 2016-11-22 00:00 +
+
+
+
+
+
+
+
+
+ time(en_US) +
+
+ 16:00 +00:00 +
+
+
+
+
+
+
+
+
+ 自定义控制显示/隐藏的元素 +
+
+
+
+
+
+
+ 时间选择(自定义 children) + + 请选择(可选) + +
+
+
+
+
+`; diff --git a/components/date-picker/__tests__/demo.test.js b/components/date-picker/__tests__/demo.test.js new file mode 100644 index 00000000000..a5601997157 --- /dev/null +++ b/components/date-picker/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('date-picker'); diff --git a/components/date-picker/__tests__/demo.test.web.js b/components/date-picker/__tests__/demo.test.web.js new file mode 100644 index 00000000000..cf781de4528 --- /dev/null +++ b/components/date-picker/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('date-picker'); diff --git a/components/drawer/__tests__/__snapshots__/demo.test.web.js.snap b/components/drawer/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..6285d6e8956 --- /dev/null +++ b/components/drawer/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,928 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/drawer/demo/basic.md correctly 1`] = ` +
+
+
+ + + + + + +
+
+ 基本 +
+
+
+
+
+
+
+
+
+ +
+
+
+ 分类 +
+
+
+
+
+ +
+
+
+ 分类1 +
+
+
+
+
+ +
+
+
+ 分类2 +
+
+
+
+
+ +
+
+
+ 分类3 +
+
+
+
+
+ +
+
+
+ 分类4 +
+
+
+
+
+ +
+
+
+ 分类5 +
+
+
+
+
+ +
+
+
+ 分类6 +
+
+
+
+
+ +
+
+
+ 分类7 +
+
+
+
+
+ +
+
+
+ 分类8 +
+
+
+
+
+ +
+
+
+ 分类9 +
+
+
+
+
+ +
+
+
+ 分类10 +
+
+
+
+
+ +
+
+
+ 分类11 +
+
+
+
+
+ +
+
+
+ 分类12 +
+
+
+
+
+ +
+
+
+ 分类13 +
+
+
+
+
+ +
+
+
+ 分类14 +
+
+
+
+
+ +
+
+
+ 分类15 +
+
+
+
+
+ +
+
+
+ 分类16 +
+
+
+
+
+ +
+
+
+ 分类17 +
+
+
+
+
+ +
+
+
+ 分类18 +
+
+
+
+
+ +
+
+
+ 分类19 +
+
+
+
+
+
+ +
+`; + +exports[`renders ./components/drawer/demo/dock.md correctly 1`] = ` +
+
+
+ + + + + + +
+
+ 嵌入文档 +
+
+
+
+
+
+
+
+
+ +
+
+
+ 分类 +
+
+
+
+
+ +
+
+
+ 分类1 +
+
+
+
+
+ +
+
+
+ 分类2 +
+
+
+
+
+ +
+
+
+ 分类3 +
+
+
+
+
+ +
+
+
+ 分类4 +
+
+
+
+
+ +
+
+
+ 分类5 +
+
+
+
+
+ +
+
+
+ 分类6 +
+
+
+
+
+ +
+
+
+ 分类7 +
+
+
+
+
+ +
+
+
+ 分类8 +
+
+
+
+
+ +
+
+
+ 分类9 +
+
+
+
+
+ +
+
+
+ 分类10 +
+
+
+
+
+ +
+
+
+ 分类11 +
+
+
+
+
+ +
+
+
+ 分类12 +
+
+
+
+
+ +
+
+
+ 分类13 +
+
+
+
+
+ +
+
+
+ 分类14 +
+
+
+
+
+ +
+
+
+ 分类15 +
+
+
+
+
+ +
+
+
+ 分类16 +
+
+
+
+
+ +
+
+
+ 分类17 +
+
+
+
+
+ +
+
+
+ 分类18 +
+
+
+
+
+ +
+
+
+ 分类19 +
+
+
+
+
+
+ +
+`; diff --git a/components/drawer/__tests__/demo.test.js b/components/drawer/__tests__/demo.test.js new file mode 100644 index 00000000000..41591c3bb26 --- /dev/null +++ b/components/drawer/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('drawer', { skip: ['basic'] }); diff --git a/components/drawer/__tests__/demo.test.web.js b/components/drawer/__tests__/demo.test.web.js new file mode 100644 index 00000000000..b7abc9bc5c8 --- /dev/null +++ b/components/drawer/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('drawer'); diff --git a/components/drawer/demo/basic.tsx b/components/drawer/demo/basic.tsx index b91b97525f0..fa9cb393c28 100644 --- a/components/drawer/demo/basic.tsx +++ b/components/drawer/demo/basic.tsx @@ -55,6 +55,8 @@ export default class DrawerExample extends React.Component { onOpenChange: this.onOpenChange, }; + console.log(this.props); + return ( + + + 项目的排列方向 + + + direction="row":主轴为水平方向,起点在左端 + + + + + + + + 按钮1 + + + + + + + 按钮2 + + + + + + + 按钮3 + + + + + + + + direction="column":主轴为垂直方向,起点在上沿 + + + + + + + + 按钮1 + + + + + + + 按钮2 + + + + + + + 按钮3 + + + + + + + + 项目在主轴上的对齐方式 + + + justify="start":左对齐 + + + + + + + + + + + + + + justify="center":居中 + + + + + + + + + + + + + + justify="end":右对齐 + + + + + + + + + + + + + + justify="between":两端对齐,项目之间的间隔都相等 + + + + + + + + + + + + + + justify="around":每个项目两侧的间隔相等 + + + + + + + + + + + + + + 项目在交叉轴上的对齐方式 + + + align="start":交叉轴的起点对齐 + + + + + + 兜兜 + + + 兜兜 + + + 兜兜 + + + 兜兜 + + + + + + align="center":交叉轴的中点对齐 + + + + + + 兜兜 + + + 兜兜 + + + 兜兜 + + + 兜兜 + + + + + + align="end":交叉轴的终点对齐 + + + + + + 兜兜 + + + 兜兜 + + + 兜兜 + + + 兜兜 + + + + + + align="stretch":如果项目未设置高度或设为auto,将占满整个容器的高度 + + + + + + + 兜兜 + + + 兜兜 + + + 兜兜 + + + 兜兜 + + + + + + + 是否折行 + + + wrap="wrap":换行 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + wrap="nowrap":不换行 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +`; diff --git a/components/flex/__tests__/__snapshots__/demo.test.web.js.snap b/components/flex/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..4ada85b5b0c --- /dev/null +++ b/components/flex/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,321 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/flex/demo/basic.md correctly 1`] = ` +
+
+ 基本 +
+
+
+
+ Item +
+
+
+
+ Item +
+
+
+
+
+
+
+ Item +
+
+
+
+ Item +
+
+
+
+ Item +
+
+
+
+
+
+
+ Item +
+
+
+
+ Item +
+
+
+
+ Item +
+
+
+
+ Item +
+
+
+
+
+ wrap 换行 +
+
+
+ Item +
+
+ Item +
+
+ Item +
+
+ Item +
+
+ Item +
+
+ Item +
+
+ Item +
+
+
+
+ 轴对齐方式 +
+
+
+ Item +
+
+ Item +
+
+ Item +
+
+
+
+
+ Item +
+
+ Item +
+
+ Item +
+
+
+
+
+ Item +
+
+ Item +
+
+ Item +
+
+
+
+
+ Item +
+
+ Item +
+
+ Item +
+
+
+
+
+ Item +
+
+ Item +
+
+ Item +
+
+
+
+
+ Item +
+
+ Item +
+
+ Item +
+
+
+`; diff --git a/components/flex/__tests__/demo.test.js b/components/flex/__tests__/demo.test.js new file mode 100644 index 00000000000..2a664baecc3 --- /dev/null +++ b/components/flex/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('flex'); diff --git a/components/flex/__tests__/demo.test.web.js b/components/flex/__tests__/demo.test.web.js new file mode 100644 index 00000000000..c458f3eb971 --- /dev/null +++ b/components/flex/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('flex'); diff --git a/components/grid/__tests__/__snapshots__/demo.test.js.snap b/components/grid/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..73287494551 --- /dev/null +++ b/components/grid/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,2308 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/grid/demo/basic.tsx correctly 1`] = ` + + + + 简单示例 + + + + + + + + + + 名字0 + + + + + + + + 名字1 + + + + + + + + 名字2 + + + + + + + + 名字3 + + + + + + + + + + 名字4 + + + + + + + + 名字5 + + + + + + + + 名字6 + + + + + + + + 名字7 + + + + + + + + + + 名字8 + + + + + + + + + + + + 走马灯 + + + + + + + + + + + + 名字0 + + + + + + + + 名字1 + + + + + + + + 名字2 + + + + + + + + + + 名字3 + + + + + + + + 名字4 + + + + + + + + 名字5 + + + + + + + + + + + + + + 名字6 + + + + + + + + 名字7 + + + + + + + + 名字8 + + + + + + + + + + + + + + + + + + + + +`; diff --git a/components/grid/__tests__/__snapshots__/demo.test.web.js.snap b/components/grid/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..aa024c46921 --- /dev/null +++ b/components/grid/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,768 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/grid/demo/basic.md correctly 1`] = ` +
+
+ 基本使用 +
+
+
+
+
+ +
+ 名字0 +
+
+
+
+
+ +
+ 名字1 +
+
+
+
+
+ +
+ 名字2 +
+
+
+
+
+ +
+ 名字3 +
+
+
+
+
+
+
+ +
+ 名字4 +
+
+
+
+
+ +
+ 名字5 +
+
+
+
+
+ +
+ 名字6 +
+
+
+
+
+ +
+ 名字7 +
+
+
+
+
+
+
+ +
+ 名字8 +
+
+
+
+
+
+
+
+
+ 无边线 +
+
+
+
+
+ +
+ 名字0 +
+
+
+
+
+ +
+ 名字1 +
+
+
+
+
+ +
+ 名字2 +
+
+
+
+
+
+
+ +
+ 名字3 +
+
+
+
+
+ +
+ 名字4 +
+
+
+
+
+ +
+ 名字5 +
+
+
+
+
+
+
+ +
+ 名字6 +
+
+
+
+
+ +
+ 名字7 +
+
+
+
+
+ +
+ 名字8 +
+
+
+
+
+
+ 走马灯 +
+
+ +
+
+ 自定义格子内容 +
+
+
+
+
+
+ + 1.名字0 + +
+ +
+
+
+
+
+ + 2.名字1 + +
+ +
+
+
+
+
+ + 3.名字2 + +
+ +
+
+
+
+
+
+
+ + 4.名字3 + +
+ +
+
+
+
+
+ + 5.名字4 + +
+ +
+
+
+
+
+
+`; diff --git a/components/grid/__tests__/demo.test.js b/components/grid/__tests__/demo.test.js new file mode 100644 index 00000000000..57ffacb2677 --- /dev/null +++ b/components/grid/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('grid'); diff --git a/components/grid/__tests__/demo.test.web.js b/components/grid/__tests__/demo.test.web.js new file mode 100644 index 00000000000..ed83c471c29 --- /dev/null +++ b/components/grid/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('grid'); diff --git a/components/icon/__tests__/__snapshots__/demo.test.js.snap b/components/icon/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..b7c2ab6acc1 --- /dev/null +++ b/components/icon/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,1477 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/icon/demo/basic.tsx correctly 1`] = ` + + + + + +  + + + check-circle + + + + + + +  + + + check + + + + + + +  + + + check-circle-o + + + + + + + + +  + + + cross-circle + + + + + + +  + + + cross + + + + + + +  + + + cross-circle-o + + + + + + + + +  + + + up + + + + + + +  + + + down + + + + + + +  + + + left + + + + + + + + +  + + + right + + + + + + +  + + + ellipsis + + + + + + +  + + + loading + + + + + + + + +  + + + 自定义图标 + + + + + + + +`; diff --git a/components/icon/__tests__/__snapshots__/demo.test.web.js.snap b/components/icon/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..e85fbfcc7d6 --- /dev/null +++ b/components/icon/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,479 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/icon/demo/basic.md correctly 1`] = ` +
+
+
+
+ + + +
+ check-circle +
+
+
+
+
+ + + +
+ check +
+
+
+
+
+ + + +
+ check-circle-o +
+
+
+
+
+
+
+ + + +
+ cross-circle +
+
+
+
+
+ + + +
+ cross +
+
+
+
+
+ + + +
+ cross-circle-o +
+
+
+
+
+
+
+ + + +
+ up +
+
+
+
+
+ + + +
+ down +
+
+
+
+
+ + + +
+ left +
+
+
+
+
+
+
+ + + +
+ right +
+
+
+
+
+ + + +
+ ellipsis +
+
+
+
+
+ + + +
+ koubei-o +
+
+
+
+
+
+
+ + + +
+ koubei +
+
+
+
+
+ + + +
+ loading +
+
+
+
+
+ + + +
+ 自定义图标 +
+
+
+
+
+`; + +exports[`renders ./components/icon/demo/size.md correctly 1`] = ` +
+
+
+
+ + + +
+ xxs +
+
+
+
+
+ + + +
+ xs +
+
+
+
+
+ + + +
+ sm +
+
+
+
+
+ + + +
+ md +
+
+
+
+
+ + + +
+ lg +
+
+
+
+
+`; diff --git a/components/icon/__tests__/demo.test.js b/components/icon/__tests__/demo.test.js new file mode 100644 index 00000000000..9a9537e4f37 --- /dev/null +++ b/components/icon/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('icon'); diff --git a/components/icon/__tests__/demo.test.web.js b/components/icon/__tests__/demo.test.web.js new file mode 100644 index 00000000000..cdbe21e5145 --- /dev/null +++ b/components/icon/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('icon'); diff --git a/components/image-picker/__tests__/__snapshots__/demo.test.js.snap b/components/image-picker/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..a0867652075 --- /dev/null +++ b/components/image-picker/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,647 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/image-picker/demo/basic.tsx correctly 1`] = ` + + + + + + + × + + + + + + + + × + + + + + + + + × + + + + + + + + × + + + + + + + + × + + + + + + + + × + + + + + + + + + + + + + + + + + + + + +`; diff --git a/components/image-picker/__tests__/__snapshots__/demo.test.web.js.snap b/components/image-picker/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..ce194a0ea5b --- /dev/null +++ b/components/image-picker/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,111 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/image-picker/demo/basic.md correctly 1`] = ` +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+`; + +exports[`renders ./components/image-picker/demo/custom.md correctly 1`] = ` +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+`; diff --git a/components/image-picker/__tests__/demo.test.js b/components/image-picker/__tests__/demo.test.js new file mode 100644 index 00000000000..fc3ed4abb0e --- /dev/null +++ b/components/image-picker/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('image-picker'); diff --git a/components/image-picker/__tests__/demo.test.web.js b/components/image-picker/__tests__/demo.test.web.js new file mode 100644 index 00000000000..79a154c1312 --- /dev/null +++ b/components/image-picker/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('image-picker'); diff --git a/components/input-item/__tests__/__snapshots__/demo.test.js.snap b/components/input-item/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..3dd4e4a66d0 --- /dev/null +++ b/components/input-item/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,1332 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/input-item/demo/basic.tsx correctly 1`] = ` + + + + + 基本 + + + + + + 输入框 + + + + + 元 + + + + + + + + + 输入框 + + + + + 元 + + + + + + + + + 标题 + + + + + + 标题 + + + + + + + + + + 点击获取光标 + + + + + + + + + + + + + 固定标签字数 + + + + + + 姓名 + + + + + + 校验码 + + + + + + 四字标签 + + + + + + + + + + 格式 + + + + + + 文本输入 + + + + + + + + + 银行卡 + + + + + + 手机号 + + + + + + 密码 + + + + + + 数字 + + + + + + + +`; diff --git a/components/input-item/__tests__/__snapshots__/demo.test.web.js.snap b/components/input-item/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..d08a8d6ff00 --- /dev/null +++ b/components/input-item/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,420 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/input-item/demo/basic.md correctly 1`] = ` +
+
+
+ 自定义获取光标 +
+
+
+
+ 标题 +
+
+ +
+
+
+
+ 标题 +
+
+ +
+
+
+
+
+
+ 点击获取光标 +
+
+
+
+
+
+
+
+ 受控 / 非受控 +
+
+
+
+ 受控组件 +
+
+ +
+
+
+
+ 非受控组件 +
+
+ +
+
+
+
+
+
+
+ 带清除按钮 +
+
+
+
+ 标题 +
+
+ +
+
+
+
+
+
+
+ 标题字数 +
+
+
+
+ 标题过长超过默认的5个字 +
+
+ +
+
+
+
+
+
+
+ 标题可自定义(文字 / 图片 / 无标题) +
+
+
+
+ +
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+ 右侧注释可自定义 +
+
+
+
+ 价格 +
+
+ +
+
+ 元 +
+
+
+
+
+
+
+ 格式 +
+
+
+
+ 银行卡 +
+
+ +
+
+
+
+ 手机号码 +
+
+ +
+
+
+
+ 密码 +
+
+ +
+
+
+
+ 数字键盘 +
+
+ +
+
+
+
+
+
+
+ 不可编辑 / 禁用 +
+
+
+
+ 姓名 +
+
+ +
+
+
+
+ 姓名 +
+
+ +
+
+
+
+
+`; diff --git a/components/input-item/__tests__/demo.test.js b/components/input-item/__tests__/demo.test.js new file mode 100644 index 00000000000..9a361da111d --- /dev/null +++ b/components/input-item/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('input-item'); diff --git a/components/input-item/__tests__/demo.test.web.js b/components/input-item/__tests__/demo.test.web.js new file mode 100644 index 00000000000..9538b65a219 --- /dev/null +++ b/components/input-item/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('input-item'); diff --git a/components/list-view/__tests__/__snapshots__/demo.test.js.snap b/components/list-view/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..78662385dc4 --- /dev/null +++ b/components/list-view/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,2871 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/list-view/demo/basic.tsx correctly 1`] = ` + + + 列表头 + + + 任务 0 + + + + + + + 食惠周 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + S0, R0 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 麦当劳邀您过周末 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + S0, R1 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 相约酒店 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + S0, R2 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 食惠周 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + S0, R3 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 麦当劳邀您过周末 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + S0, R4 + + + + + 35 + + 元/任务 + + + + + + + + 任务 1 + + + + + + + 相约酒店 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + S1, R0 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 食惠周 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + S1, R1 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 麦当劳邀您过周末 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + S1, R2 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 相约酒店 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + S1, R3 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 食惠周 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + S1, R4 + + + + + 35 + + 元/任务 + + + + + + + + + 加载完毕 + + + +`; + +exports[`renders ./components/list-view/demo/basic-row.tsx correctly 1`] = ` + + + 列表头 + + + + + + + 食惠周 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + 0 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 麦当劳邀您过周末 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + 1 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 相约酒店 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + 2 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 食惠周 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + 3 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 麦当劳邀您过周末 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + 4 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 相约酒店 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + 5 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 食惠周 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + 6 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 麦当劳邀您过周末 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + 7 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 相约酒店 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + 8 + + + + + 35 + + 元/任务 + + + + + + + + + + + + + 食惠周 + + + + + + + 不是所有的兼职汪都需要风吹日晒 + - + 9 + + + + + 35 + + 元/任务 + + + + + + + + + + 加载完毕 + + + +`; diff --git a/components/list-view/__tests__/__snapshots__/demo.test.web.js.snap b/components/list-view/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..983ff696dd5 --- /dev/null +++ b/components/list-view/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,1022 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/list-view/demo/basic.md correctly 1`] = ` +
+
+
+
+ + header + +
+
+ + you can custom body wrap element + +
+ +
+
+
+`; + +exports[`renders ./components/list-view/demo/basic-body.md correctly 1`] = ` +
+
+ + header + +
+
+ +
+`; + +exports[`renders ./components/list-view/demo/basic-sticky.md correctly 1`] = ` +
+
+ + header + +
+
+
+
+ +
+`; + +exports[`renders ./components/list-view/demo/idxed.md correctly 1`] = ` +
+
+
+
+ + 头部内容请自定义 + +
+
+
+
+
+
+
+ A +
+
+
+
+
+
+
+
+
+ 安徽省 +
+
+
+
+
+
+ 安徽省0 +
+
+
+
+
+
+ 安徽省1 +
+
+
+
+
+
+ 安徽省2 +
+
+
+
+
+
+ 安徽省3 +
+
+
+
+
+
+ 安徽省4 +
+
+
+
+
+
+ 安徽省5 +
+
+
+
+
+
+ 安徽省6 +
+
+
+
+
+
+ 安徽省7 +
+
+
+
+
+
+ 安徽省8 +
+
+
+
+
+
+ 安徽省9 +
+
+
+
+
+
+
+
+
+ B +
+
+
+
+
+
+
+
+
+ 北京市 +
+
+
+
+
+
+ 北京市0 +
+
+
+
+
+
+ 北京市1 +
+
+
+
+
+
+ 北京市2 +
+
+
+
+
+
+ 北京市3 +
+
+
+
+
+
+ 北京市4 +
+
+
+
+
+
+ 北京市5 +
+
+
+
+
+
+ 北京市6 +
+
+
+
+
+
+ 北京市7 +
+
+
+
+
+ +
+
+ +
+`; + +exports[`renders ./components/list-view/demo/idxed-sticky.md correctly 1`] = ` +
+
+
+
+
+
+ + 头部内容请自定义 + +
+
+
+
+
+
+
+
+
+
+
+ A +
+
+
+
+
+
+
+
+
+
+
+ 安徽省 +
+
+
+
+
+
+ 安徽省0 +
+
+
+
+
+
+ 安徽省1 +
+
+
+
+
+
+ 安徽省2 +
+
+
+
+
+
+ 安徽省3 +
+
+
+
+
+
+ 安徽省4 +
+
+
+
+
+
+ 安徽省5 +
+
+
+
+
+
+ 安徽省6 +
+
+
+
+
+
+ 安徽省7 +
+
+
+
+
+
+ 安徽省8 +
+
+
+
+
+
+ 安徽省9 +
+
+
+
+
+
+
+
+
+
+
+
+ B +
+
+
+
+
+
+
+
+
+
+
+ 北京市 +
+
+
+
+
+
+ 北京市0 +
+
+
+
+
+
+ 北京市1 +
+
+
+
+
+
+ 北京市2 +
+
+
+
+
+
+ 北京市3 +
+
+
+
+
+
+ 北京市4 +
+
+
+
+
+
+ 北京市5 +
+
+
+
+
+
+ 北京市6 +
+
+
+
+
+
+ 北京市7 +
+
+
+
+
+
+ +
+ +
+
+`; diff --git a/components/list-view/__tests__/demo.test.js b/components/list-view/__tests__/demo.test.js new file mode 100644 index 00000000000..3d6b8b6c4a6 --- /dev/null +++ b/components/list-view/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('list-view'); diff --git a/components/list-view/__tests__/demo.test.web.js b/components/list-view/__tests__/demo.test.web.js new file mode 100644 index 00000000000..c29ddea3b7f --- /dev/null +++ b/components/list-view/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('list-view'); diff --git a/components/list/__tests__/__snapshots__/demo.test.js.snap b/components/list/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..a029a5f8642 --- /dev/null +++ b/components/list/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,1779 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/list/demo/basic.tsx correctly 1`] = ` + + + + + 左侧无icon + + + + + + + + + 标题文字点击无反馈,文字超长则隐藏,文字超长则隐藏 + + + + + + + + + + + 文字超长折行文字超长折行文字超长折行文字超长折行文字超长折行 + + + + + + + + + + + 标题文字 + + + + + 箭头向右 + + + + + + + + + + + + 标题文字 + + + + + 箭头向下 + + + + + + + + + + + + 标题文字 + + + + + 箭头向上 + + + + + + + + + + + + 标题文字 + + + + + 没有箭头 + + + + + + + + + + + + 垂直居中对齐 + + + + + 内容内容 + + + + 辅助文字内容 + + + + + + + + + + + + 垂直居中对齐 + + + + 辅助文字内容 + + + + + + 内容内容 + + + + + + + + + + + 顶部对齐 + + + + 辅助文字内容辅助文字内容辅助文字内容辅助文字内容 + + + + + 辅助文字内容 + + + + + + 文字超长折行文字超长折行文字超长折行文字超长折行文字超长折行文字超长折行文字超长折行 + + + + + + + + + + + + 底部对齐 + + + + + 内容内容 + + + + 辅助文字内容 + + + + + + + + + + + + + 带缩略图 + + + + + + + + + + thumb + + + + + + + + + + + + thumb + + + + + + + + + + + + extra为Image + + + + + + + + + + + +`; diff --git a/components/list/__tests__/__snapshots__/demo.test.web.js.snap b/components/list/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..0b96d590bbc --- /dev/null +++ b/components/list/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,644 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/list/demo/basic.md correctly 1`] = ` +
+
+
+ 基本样式 +
+
+
+
+
+ 标题文字 +
+
+ 内容内容 +
+
+
+
+
+
+
+ 带副标题 +
+
+
+
+
+ 标题文字 +
+ 副标题 +
+
+
+
+
+
+
+ +
+
+
+ 标题文字 +
+ 副标题 +
+
+
+
+
+
+
+
+
+ 右侧自定义(无内容 / 文字 / 图片) +
+
+
+
+
+ 标题文字 +
+
+
+
+
+
+ 标题文字 +
+
+
+
+
+
+
+ 标题文字 +
+
+ 内容内容 +
+
+
+
+
+
+ +
+
+
+ 标题文字 +
+ 副标题 +
+
+
+ 10:30 +
+
+
+
+
+
+
+ 垂直居中对齐 +
+
+
+
+
+ 标题文字 +
+ 副标题 +
+
+
+ 内容内容 +
+
+
+
+
+
+
+ 左侧带图标 +
+
+
+
+ +
+
+
+ 我的钱包 +
+
+
+
+
+
+ +
+
+
+ 我的花销占比 +
+
+
+
+
+
+
+
+ 文字换行 +
+
+
+
+
+ 单行模式,文字超长则隐藏;文本内容文本内容文本内容文本内容 +
+
+
+
+
+
+ 多行模式,文字超长则换行;文本内容文本内容文本内容文本内容文本内容文本内容 +
+
+
+
+
+
+ 多行标题文字超长直接折行,文字可能比较长、文字可能比较长、 +
+
+ 内容内容 +
+
+
+
+
+
+ 极个别情况下,单行标题文字可能比较长,文字可能比较长、文字可能比较长、靠近右边会折行 +
+
+ 没有箭头 +
+
+
+
+
+
+
+
+ 其他 +
+
+
+
+
+ 点击禁用 +
+
+
+
+
+
+
+ +
+
+
+
+
+
+`; + +exports[`renders ./components/list/demo/form.md correctly 1`] = ` +
+
+
+ 验证表单 +
+
+
+
+ 帐号 +
+
+ +
+
+
+
+ 密码 +
+
+ +
+
+
+
+
+ 确认信息 +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 预定人数 +
+
+
+
+ + + + + + + + + + +
+
+ +
+
+
+
+
+ +
+ + +`; diff --git a/components/list/__tests__/demo.test.js b/components/list/__tests__/demo.test.js new file mode 100644 index 00000000000..2cd25488c68 --- /dev/null +++ b/components/list/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('list'); diff --git a/components/list/__tests__/demo.test.web.js b/components/list/__tests__/demo.test.web.js new file mode 100644 index 00000000000..7c4e0a0afe9 --- /dev/null +++ b/components/list/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('list'); diff --git a/components/list/index.web.tsx b/components/list/index.web.tsx index 092e6f3d507..f4cd896997a 100644 --- a/components/list/index.web.tsx +++ b/components/list/index.web.tsx @@ -1,6 +1,6 @@ /* tslint:disable:jsx-no-multiline-js */ import React from 'react'; -import Item from './ListItem'; +import Item from './ListItem.web'; import classNames from 'classnames'; import { ListProps } from './PropsType'; diff --git a/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap b/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..adab69af583 --- /dev/null +++ b/components/locale-provider/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,543 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/locale-provider/demo/basic.tsx correctly 1`] = ` + + + + change to chinese + + + + + + + + + + Prev + + + + + + + 2 + + + / + 5 + + + + + + + Next + + + + + + + + + + + + + + + 日期 + + + + + 点击查看国际化 + + + + + + + + + + + + +`; diff --git a/components/locale-provider/__tests__/__snapshots__/demo.test.web.js.snap b/components/locale-provider/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..f301284eeaf --- /dev/null +++ b/components/locale-provider/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,99 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/locale-provider/demo/basic.md correctly 1`] = ` +
+ + + change to chinese + + +
+
+
+
+ +
+ + 2 + + / + + 5 + +
+ +
+
+
+
+
+
+
+
+
+ 日期 +
+
+ 点击查看国际化 +
+
+
+
+
+
+
+
+
+`; diff --git a/components/locale-provider/__tests__/demo.test.js b/components/locale-provider/__tests__/demo.test.js new file mode 100644 index 00000000000..6c561d89501 --- /dev/null +++ b/components/locale-provider/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('locale-provider'); diff --git a/components/locale-provider/__tests__/demo.test.web.js b/components/locale-provider/__tests__/demo.test.web.js new file mode 100644 index 00000000000..890d3b1fe7a --- /dev/null +++ b/components/locale-provider/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('locale-provider'); diff --git a/components/menu/__tests__/__snapshots__/demo.test.js.snap b/components/menu/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..a4975e927f3 --- /dev/null +++ b/components/menu/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/menu/demo/basic.tsx correctly 1`] = ` +
+ TODO for react-native +
+`; diff --git a/components/menu/__tests__/__snapshots__/demo.test.web.js.snap b/components/menu/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..c14a7023804 --- /dev/null +++ b/components/menu/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,42 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/menu/demo/basic.md correctly 1`] = ` +
+
+
+
+ + + + + + + 菜单 + +
+
+ 标题 +
+
+
+
+
+`; diff --git a/components/menu/__tests__/demo.test.js b/components/menu/__tests__/demo.test.js new file mode 100644 index 00000000000..8ab072d8cab --- /dev/null +++ b/components/menu/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('menu'); diff --git a/components/menu/__tests__/demo.test.web.js b/components/menu/__tests__/demo.test.web.js new file mode 100644 index 00000000000..43321a5800f --- /dev/null +++ b/components/menu/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('menu'); diff --git a/components/modal/__tests__/__snapshots__/demo.test.js.snap b/components/modal/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..9156a52731d --- /dev/null +++ b/components/modal/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,427 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/modal/demo/basic.tsx correctly 1`] = ` + + + + + 显示对话框 + + + + + + 显示全屏对话框 + + + + + + 显示 Modal.alert + + + + + + 显示 Modal.opertation + + + + + + + + + 这是内容... + + + 这是内容... + + + + + close modal + + + + + + + +`; diff --git a/components/modal/__tests__/__snapshots__/demo.test.web.js.snap b/components/modal/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..95119d5c1ea --- /dev/null +++ b/components/modal/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,164 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/modal/demo/alert.md correctly 1`] = ` +
+
+ + + 自定义按钮 + + +
+ + + 确认对话框 + + +
+ + + 弹出多个按钮 + + +
+ + + 按钮 Promise + + +
+
+`; + +exports[`renders ./components/modal/demo/basic.md correctly 1`] = ` +
+
+ +
+
+`; + +exports[`renders ./components/modal/demo/operation.md correctly 1`] = ` +
+
+ + + 操作按钮 + + +
+
+`; + +exports[`renders ./components/modal/demo/propmt.md correctly 1`] = ` +
+
+ + + 按钮 Promise + + +
+ + + 输入框默认值 + + +
+ + + 输入框密码形式 + + +
+ + + 自定义按钮形式 + + +
+ + + 输入框登录形式 + + +
+
+`; diff --git a/components/modal/__tests__/demo.test.js b/components/modal/__tests__/demo.test.js new file mode 100644 index 00000000000..135064e7908 --- /dev/null +++ b/components/modal/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('modal'); diff --git a/components/modal/__tests__/demo.test.web.js b/components/modal/__tests__/demo.test.web.js new file mode 100644 index 00000000000..ee5631d0f64 --- /dev/null +++ b/components/modal/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('modal'); diff --git a/components/nav-bar/__tests__/__snapshots__/demo.test.web.js.snap b/components/nav-bar/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..47d678f105b --- /dev/null +++ b/components/nav-bar/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,54 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/nav-bar/demo/basic.md correctly 1`] = ` +
+
+
+ + + + + + + 返回 + +
+
+ NavBar +
+
+ + + + + + +
+
+
+`; diff --git a/components/nav-bar/__tests__/demo.test.web.js b/components/nav-bar/__tests__/demo.test.web.js new file mode 100644 index 00000000000..8e7d000e184 --- /dev/null +++ b/components/nav-bar/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('nav-bar'); diff --git a/components/notice-bar/__tests__/__snapshots__/demo.test.js.snap b/components/notice-bar/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..c4c857f9d29 --- /dev/null +++ b/components/notice-bar/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,582 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/notice-bar/demo/basic.tsx correctly 1`] = ` + + + + + + + + 国庆期间余额宝收益和转出到账时间 + + + + + + + + + 国庆期间余额宝收益和转出到账时间1 + + + + × + + + + + + + + + + 自定义 NoticeBar 前面的图标 + + + + × + + + + + + + + + + 国庆期间余额宝收益和转出到账时间 + + + ∟ + + + + + + + + + 国庆期间余额宝收益和转出到账时间 + + + ∟ + + + + + + 去除 NoticeBar 默认的喇叭图标 + + + + × + + + + +`; diff --git a/components/notice-bar/__tests__/__snapshots__/demo.test.web.js.snap b/components/notice-bar/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..86a2ff83838 --- /dev/null +++ b/components/notice-bar/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,166 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/notice-bar/demo/basic.md correctly 1`] = ` +
+
+
+
+ + + + + +
+
+
+
+ 国庆期间余额宝收益和转出到账时间通知:由于国庆到来,余额宝收益到账将延迟,特此通知 +
+
+
+
+
+
+
+ + + + + +
+
+
+
+ 国庆期间余额宝收益和转出到账时间 +
+
+
+
+ + + +
+
+
+
+
+
+
+ 去除 NoticeBar 默认的喇叭图标 +
+
+
+
+ + + +
+
+
+
+
+ + + + + +
+
+
+
+ 自定义 NoticeBar 前面的小图标 +
+
+
+
+ + + +
+
+
+`; diff --git a/components/notice-bar/__tests__/demo.test.js b/components/notice-bar/__tests__/demo.test.js new file mode 100644 index 00000000000..f15cbe5961f --- /dev/null +++ b/components/notice-bar/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('notice-bar'); diff --git a/components/notice-bar/__tests__/demo.test.web.js b/components/notice-bar/__tests__/demo.test.web.js new file mode 100644 index 00000000000..171fe83a115 --- /dev/null +++ b/components/notice-bar/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('notice-bar'); diff --git a/components/pagination/__tests__/__snapshots__/demo.test.js.snap b/components/pagination/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..08631437555 --- /dev/null +++ b/components/pagination/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,735 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/pagination/demo/basic.tsx correctly 1`] = ` + + + + + + + + 上一页 + + + + + + + 2 + + + / + 5 + + + + + + + 下一页 + + + + + + + + + + + + 上一页 + + + + + + + + 下一页 + + + + + + + + + + 4 + + + / + 5 + + + + + + + + + + + + + + +`; diff --git a/components/pagination/__tests__/__snapshots__/demo.test.web.js.snap b/components/pagination/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..6ebd65a7e03 --- /dev/null +++ b/components/pagination/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,182 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/pagination/demo/basic.md correctly 1`] = ` + +`; diff --git a/components/pagination/__tests__/demo.test.js b/components/pagination/__tests__/demo.test.js new file mode 100644 index 00000000000..73db7e111ce --- /dev/null +++ b/components/pagination/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('pagination'); diff --git a/components/pagination/__tests__/demo.test.web.js b/components/pagination/__tests__/demo.test.web.js new file mode 100644 index 00000000000..6b7263cd380 --- /dev/null +++ b/components/pagination/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('pagination'); diff --git a/components/picker-view/__tests__/__snapshots__/demo.test.web.js.snap b/components/picker-view/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..927c12713ce --- /dev/null +++ b/components/picker-view/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,64 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/picker-view/demo/basic.md correctly 1`] = ` +
+
+
+
+
+
+
+ 2013 +
+
+ 2014 +
+
+
+
+
+
+
+
+
+
+ 春 +
+
+ 夏 +
+
+
+
+
+`; diff --git a/components/picker-view/__tests__/demo.test.web.js b/components/picker-view/__tests__/demo.test.web.js new file mode 100644 index 00000000000..159a1f420d5 --- /dev/null +++ b/components/picker-view/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('picker-view'); diff --git a/components/picker/__tests__/__snapshots__/demo.test.js.snap b/components/picker/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..3bbdd18fba8 --- /dev/null +++ b/components/picker/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,176 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/picker/demo/popup.tsx correctly 1`] = ` + + + + + + + + + + 省市选择(异步加载) + + + + + 请选择 + + + + + + + + + + + +`; diff --git a/components/picker/__tests__/__snapshots__/demo.test.web.js.snap b/components/picker/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..2e389b1c71f --- /dev/null +++ b/components/picker/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,130 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/picker/demo/basic.md correctly 1`] = ` +
+
+
+
+
+
+
+
+ 选择地区(多列,联动) +
+
+ 安徽省,六安市,金安区 +
+
+
+
+
+
+
+
+
+ 选择季节(多列,不联动) +
+
+ 2013,春 +
+
+
+
+
+
+
+
+
+ 选择地区(单列) +
+
+ 请选择 +
+
+
+
+
+
+
+
+
+ 选择地区(多列,异步加载) +
+
+ 请选择 +
+
+
+
+
+
+
+
+
+ 选择地区(自定义 children) +
+
+ 请选择(可选) +
+
+
+
+
+
+
+`; diff --git a/components/picker/__tests__/demo.test.js b/components/picker/__tests__/demo.test.js new file mode 100644 index 00000000000..49ada29b4e4 --- /dev/null +++ b/components/picker/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('picker'); diff --git a/components/picker/__tests__/demo.test.web.js b/components/picker/__tests__/demo.test.web.js new file mode 100644 index 00000000000..c36b8e8f956 --- /dev/null +++ b/components/picker/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('picker'); diff --git a/components/popover/__tests__/__snapshots__/demo.test.js.snap b/components/popover/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..bd6a80f49ec --- /dev/null +++ b/components/popover/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,117 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/popover/demo/basic.tsx correctly 1`] = ` + + + + 选择了: + + + + + + + + + + 菜单 + + + + + + + + +`; diff --git a/components/popover/__tests__/__snapshots__/demo.test.web.js.snap b/components/popover/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..80ccba19284 --- /dev/null +++ b/components/popover/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,37 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/popover/demo/basic.md correctly 1`] = ` +
+
+
+ +
+
+ NavBar +
+
+
+ + + +
+
+
+
+`; diff --git a/components/popover/__tests__/demo.test.js b/components/popover/__tests__/demo.test.js new file mode 100644 index 00000000000..152b07a5276 --- /dev/null +++ b/components/popover/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('popover'); diff --git a/components/popover/__tests__/demo.test.web.js b/components/popover/__tests__/demo.test.web.js new file mode 100644 index 00000000000..bc90257c99b --- /dev/null +++ b/components/popover/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('popover'); diff --git a/components/popup/__tests__/__snapshots__/demo.test.js.snap b/components/popup/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..c43ca3d06fc --- /dev/null +++ b/components/popup/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,159 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/popup/demo/basic.tsx correctly 1`] = ` + + + + + 向下弹出效果 + + + + + + 向上弹出效果 + + + +`; diff --git a/components/popup/__tests__/__snapshots__/demo.test.web.js.snap b/components/popup/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..7e71d1c5ed9 --- /dev/null +++ b/components/popup/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/popup/demo/basic.md correctly 1`] = ` + +`; + +exports[`renders ./components/popup/demo/basic-up.md correctly 1`] = ` +
+`; diff --git a/components/popup/__tests__/demo.test.js b/components/popup/__tests__/demo.test.js new file mode 100644 index 00000000000..53dfa4b90dd --- /dev/null +++ b/components/popup/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('popup'); diff --git a/components/popup/__tests__/demo.test.web.js b/components/popup/__tests__/demo.test.web.js new file mode 100644 index 00000000000..d5457749450 --- /dev/null +++ b/components/popup/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('popup'); diff --git a/components/progress/__tests__/__snapshots__/demo.test.js.snap b/components/progress/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..b6c420822dd --- /dev/null +++ b/components/progress/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,206 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/progress/demo/basic.tsx correctly 1`] = ` + + + + + + + + + + + + 40 + % + + + + + (+-)10 + + + + + + + +`; diff --git a/components/progress/__tests__/__snapshots__/demo.test.web.js.snap b/components/progress/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..5da5a25155a --- /dev/null +++ b/components/progress/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,55 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/progress/demo/basic.md correctly 1`] = ` +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 50% +
+
+ + + (+-)10 + + +
+`; diff --git a/components/progress/__tests__/demo.test.js b/components/progress/__tests__/demo.test.js new file mode 100644 index 00000000000..4eee7308652 --- /dev/null +++ b/components/progress/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('progress'); diff --git a/components/progress/__tests__/demo.test.web.js b/components/progress/__tests__/demo.test.web.js new file mode 100644 index 00000000000..faf2faf935b --- /dev/null +++ b/components/progress/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('progress'); diff --git a/components/radio/__tests__/__snapshots__/demo.test.js.snap b/components/radio/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..8bd88c81503 --- /dev/null +++ b/components/radio/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,663 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/radio/demo/basic.tsx correctly 1`] = ` + + + + + + 支持 + + + + + + + + + + + + 表单单选项,普通列表中单选项 + + + + + + + 使用 Ant Desgin Component + + + + + + + + + + + + + + 使用 Ant Desgin Component + + + + + + + + + + + + + + 个性化调整disabled + + + + + + + + + + + + + + 个性化调整disabled + + + + + + + + + + + + +`; diff --git a/components/radio/__tests__/__snapshots__/demo.test.web.js.snap b/components/radio/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..aaf4d98beda --- /dev/null +++ b/components/radio/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,373 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/radio/demo/basic.md correctly 1`] = ` +
+
+
+ RadioItem 演示 +
+
+
+
+
+ 博士 +
+
+ +
+
+
+
+
+
+ 本科 +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ 篮球 +
+ 辅助文字内容 +
+
+
+ +
+
+
+
+
+
+ 足球 +
+ 辅助文字内容 +
+
+
+ +
+
+
+
+
+
+
+ 禁用状态 +
+
+
+
+
+ 博士 +
+
+ +
+
+
+
+
+
+ 本科 +
+
+ +
+
+
+
+
+
+
+
+
+
+
+ 篮球 +
+ 辅助文字内容 +
+
+
+ +
+
+
+
+
+
+ 足球 +
+ 辅助文字内容 +
+
+
+ +
+
+
+
+
+
+
+ Radio 演示 (自定义样式) +
+
+ +
+
+
+`; diff --git a/components/radio/__tests__/demo.test.js b/components/radio/__tests__/demo.test.js new file mode 100644 index 00000000000..c7772f5e283 --- /dev/null +++ b/components/radio/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('radio'); diff --git a/components/radio/__tests__/demo.test.web.js b/components/radio/__tests__/demo.test.web.js new file mode 100644 index 00000000000..47c21698193 --- /dev/null +++ b/components/radio/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('radio'); diff --git a/components/range/__tests__/__snapshots__/demo.test.web.js.snap b/components/range/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..e503ccfe7db --- /dev/null +++ b/components/range/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,133 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/range/demo/basic.md correctly 1`] = ` +
+
+
+

+ Range, 基础使用 +

+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ Range, 带 Tooltip +

+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ Range, 禁用 +

+
+
+
+
+
+
+
+
+
+
+
+
+`; diff --git a/components/range/__tests__/demo.test.web.js b/components/range/__tests__/demo.test.web.js new file mode 100644 index 00000000000..70015857800 --- /dev/null +++ b/components/range/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('range'); diff --git a/components/refresh-control/__tests__/__snapshots__/demo.test.js.snap b/components/refresh-control/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..1ae8769a942 --- /dev/null +++ b/components/refresh-control/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,789 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/refresh-control/demo/basic.tsx correctly 1`] = ` + + } + style={ + Object { + "flex": 1, + } + } +> + + + Initial row 0 (0 clicks) + + + + + Initial row 1 (0 clicks) + + + + + Initial row 2 (0 clicks) + + + + + Initial row 3 (0 clicks) + + + + + Initial row 4 (0 clicks) + + + + + Initial row 5 (0 clicks) + + + + + Initial row 6 (0 clicks) + + + + + Initial row 7 (0 clicks) + + + + + Initial row 8 (0 clicks) + + + + + Initial row 9 (0 clicks) + + + + + Initial row 10 (0 clicks) + + + + + Initial row 11 (0 clicks) + + + + + Initial row 12 (0 clicks) + + + + + Initial row 13 (0 clicks) + + + + + Initial row 14 (0 clicks) + + + + + Initial row 15 (0 clicks) + + + + + Initial row 16 (0 clicks) + + + + + Initial row 17 (0 clicks) + + + + + Initial row 18 (0 clicks) + + + + + Initial row 19 (0 clicks) + + + +`; diff --git a/components/refresh-control/__tests__/__snapshots__/demo.test.web.js.snap b/components/refresh-control/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..9a7bea1a77d --- /dev/null +++ b/components/refresh-control/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,230 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/refresh-control/demo/basic.md correctly 1`] = ` +
+
+
+
+
+ + 下拉可以刷新 + +
+
+ + 松开立即刷新 + +
+
+
+ + + +
+
+
+
+
+

+ 食惠周 +

+
+ +
+

+ 不是所有的兼职汪都需要风吹日晒-r0 +

+

+ + 35 + + 元/任务 +

+
+
+
+
+
+

+ 麦当劳邀您过周末 +

+
+ +
+

+ 不是所有的兼职汪都需要风吹日晒-r1 +

+

+ + 35 + + 元/任务 +

+
+
+
+
+
+

+ 相约酒店 +

+
+ +
+

+ 不是所有的兼职汪都需要风吹日晒-r2 +

+

+ + 35 + + 元/任务 +

+
+
+
+
+
+

+ 食惠周 +

+
+ +
+

+ 不是所有的兼职汪都需要风吹日晒-r3 +

+

+ + 35 + + 元/任务 +

+
+
+
+
+
+

+ 麦当劳邀您过周末 +

+
+ +
+

+ 不是所有的兼职汪都需要风吹日晒-r4 +

+

+ + 35 + + 元/任务 +

+
+
+
+
+
+
+
+
+`; diff --git a/components/refresh-control/__tests__/demo.test.js b/components/refresh-control/__tests__/demo.test.js new file mode 100644 index 00000000000..3d101ab3d28 --- /dev/null +++ b/components/refresh-control/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('refresh-control'); diff --git a/components/refresh-control/__tests__/demo.test.web.js b/components/refresh-control/__tests__/demo.test.web.js new file mode 100644 index 00000000000..f0dec26a05b --- /dev/null +++ b/components/refresh-control/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('refresh-control'); diff --git a/components/result/__tests__/__snapshots__/demo.test.js.snap b/components/result/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..2eaaaee82f6 --- /dev/null +++ b/components/result/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,450 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/result/demo/basic.tsx correctly 1`] = ` + + + uri + + + + + + + + 验证成功 + + + + + 所提交内容已成功完成验证 + + + + + require + + + + + + + + 验证成功 + + + + + 所提交内容已成功完成验证 + + + + + img + + + + + + + + 验证成功 + + + + + 所提交内容已成功完成验证 + + + + + button + + + + + + + + 验证成功 + + + + + 所提交内容已成功完成验证 + + + + + + 完成 + + + + + +`; diff --git a/components/result/__tests__/__snapshots__/demo.test.web.js.snap b/components/result/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..21570968cc9 --- /dev/null +++ b/components/result/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,181 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/result/demo/basic.md correctly 1`] = ` +
+
+ 支付成功 +
+
+
+ + + +
+
+ 支付成功 +
+
+
+
+ 998.00 +
+ + 1098元 + +
+
+
+
+
+ 验证成功 +
+
+
+ + + +
+
+ 验证成功 +
+
+ 所提交内容已成功完成验证 +
+
+
+
+ 支付失败 +
+
+
+ + + +
+
+ 支付失败 +
+
+ 所选银行卡余额不足 +
+
+
+
+ 等待处理 +
+
+
+ + + +
+
+ 等待处理 +
+
+ 已提交申请,等待银行处理 +
+
+
+
+ 操作失败 +
+
+
+ + + +
+
+ 无法完成操作 +
+
+ 由于你的支付宝账户还未绑定淘宝账户请登请登录www.taobao.com +
+
+
+`; diff --git a/components/result/__tests__/demo.test.js b/components/result/__tests__/demo.test.js new file mode 100644 index 00000000000..d803ee61eef --- /dev/null +++ b/components/result/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import { nativeDemotest } from '../../../tests/shared/demoTest'; + +nativeDemotest('result'); diff --git a/components/result/__tests__/demo.test.web.js b/components/result/__tests__/demo.test.web.js new file mode 100644 index 00000000000..a4b5299450d --- /dev/null +++ b/components/result/__tests__/demo.test.web.js @@ -0,0 +1,3 @@ +import { webDemoTest } from '../../../tests/shared/demoTest'; + +webDemoTest('result'); diff --git a/components/search-bar/__tests__/__snapshots__/demo.test.js.snap b/components/search-bar/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 00000000000..bd8c9245714 --- /dev/null +++ b/components/search-bar/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,155 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/search-bar/demo/basic.tsx correctly 1`] = ` + + + + + + + + + + + 取消 + + + + +`; diff --git a/components/search-bar/__tests__/__snapshots__/demo.test.web.js.snap b/components/search-bar/__tests__/__snapshots__/demo.test.web.js.snap new file mode 100644 index 00000000000..8af880dbfc1 --- /dev/null +++ b/components/search-bar/__tests__/__snapshots__/demo.test.web.js.snap @@ -0,0 +1,222 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/search-bar/demo/basic.md correctly 1`] = ` +
+
+
+ 普通 +
+
+