From f099fcd67525e0baf4a85908b9d4d15d221b0ae5 Mon Sep 17 00:00:00 2001 From: tjz <415800467@qq.com> Date: Fri, 18 May 2018 22:52:45 +0800 Subject: [PATCH] test: add from test --- .../__tests__/__snapshots__/demo.test.js.snap | 965 ++++++++++++++++++ components/form/__tests__/demo.test.js | 3 + 2 files changed, 968 insertions(+) create mode 100644 components/form/__tests__/__snapshots__/demo.test.js.snap create mode 100644 components/form/__tests__/demo.test.js diff --git a/components/form/__tests__/__snapshots__/demo.test.js.snap b/components/form/__tests__/__snapshots__/demo.test.js.snap new file mode 100644 index 000000000..0d567cbf1 --- /dev/null +++ b/components/form/__tests__/__snapshots__/demo.test.js.snap @@ -0,0 +1,965 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders ./components/form/demo/advanced-search.vue correctly 1`] = ` + +`; + +exports[`renders ./components/form/demo/coordinated.vue correctly 1`] = ` +
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+`; + +exports[`renders ./components/form/demo/customized-form-controls.vue correctly 1`] = ` +
+
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+`; + +exports[`renders ./components/form/demo/dynamic-form-item.vue correctly 1`] = ` +
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+`; + +exports[`renders ./components/form/demo/dynamic-rule.vue correctly 1`] = ` +
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+`; + +exports[`renders ./components/form/demo/form-in-modal.vue correctly 1`] = ` +
+ + +
+`; + +exports[`renders ./components/form/demo/global-state.vue correctly 1`] = ` +
+
+
+
+ +
+
+
+ +
+
+
+
{
+  "username": {
+    "value": "benjycui"
+  }
+}
+`; + +exports[`renders ./components/form/demo/horizontal-login.vue correctly 1`] = ` +
+
+
+
+ + + + +
+
+
+
+
+
+ + + + +
+
+
+
+
+
+ + +
+
+
+
+`; + +exports[`renders ./components/form/demo/layout.vue correctly 1`] = ` +
+
+
+
+ +
+
+
+ + +
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+
+`; + +exports[`renders ./components/form/demo/normal-login.vue correctly 1`] = ` +
+
+
+
+ + + + +
+
+
+
+
+
+ + + + +
+
+
+
+
+
+ + Or + register now! + + +
+
+
+
+`; + +exports[`renders ./components/form/demo/register.vue correctly 1`] = ` +
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
Zhejiang / Hangzhou / West Lake + + + + + +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ +
+
+
+
+
+
+ +
We must make sure that your are a human.
+
+
+
+
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+`; + +exports[`renders ./components/form/demo/time-related-controls.vue correctly 1`] = ` +
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
~ + + + + +
+
+
+
+
+ +
+
+
~ + + + + +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+
+ + +
+
+
+
+`; + +exports[`renders ./components/form/demo/validate-other.vue correctly 1`] = ` +
+
+
+ +
+
+
China + +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
machines
+ +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ +
+
+
+
+
+
ABCDE + F +
+
+
+ +
+
+
+
+
+ +
+
+
+ + +
+
+ +
+
+
+
+
+ +
+
+
+ + +
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
longgggggggggggggggggggggggggggggggggg
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+
+ + +
+
+
+
+`; + +exports[`renders ./components/form/demo/validate-static.vue correctly 1`] = ` +
+
+
+ +
+
+
+
Should be combination of numbers & alphabets
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
The information is being validated...
+
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+
Should be combination of numbers & alphabets
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ + +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ + + + +
The information is being validated...
+
+
+
+
+
+ +
+
+
+
+
+
Please select the correct date
+
+
+
+
+
+ - +
+
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+
+
+`; + +exports[`renders ./components/form/demo/without-form-create.vue correctly 1`] = ` +
+
+
+ +
+
+
+ +
+
+ +
+
+
+
A prime is a natural number greater than 1 that has no positive divisors other than 1 and itself.
+
+
+
+
+`; diff --git a/components/form/__tests__/demo.test.js b/components/form/__tests__/demo.test.js new file mode 100644 index 000000000..c68de4432 --- /dev/null +++ b/components/form/__tests__/demo.test.js @@ -0,0 +1,3 @@ +import demoTest from '../../../tests/shared/demoTest' + +demoTest('form', { suffix: 'vue', skip: ['index.vue'] })