This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #217 from asigloo/feature/unit-test
Feature/unit test & E2E
- Loading branch information
Showing
90 changed files
with
12,731 additions
and
6,409 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
dist/ | ||
*.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname $0)/_/husky.sh" | ||
|
||
npm run lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname $0)/_/husky.sh" | ||
|
||
npm test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.vuegenerator | ||
.eslintrc.js | ||
.eslintignore | ||
.husky | ||
netlify.toml | ||
jest.config.js | ||
babel.config.js | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"baseUrl": "http://localhost:6044", | ||
"pluginsFile": "tests/e2e/plugins/index.js", | ||
"testFiles": "**/*.e2e.js*" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.DS_Store | ||
node_modules | ||
/dist | ||
|
||
|
||
# local env files | ||
.env.local | ||
.env.*.local | ||
|
||
# Log files | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# vue-3 | ||
|
||
## Project setup | ||
``` | ||
yarn install | ||
``` | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
yarn serve | ||
``` | ||
|
||
### Compiles and minifies for production | ||
``` | ||
yarn build | ||
``` | ||
|
||
### Lints and fixes files | ||
``` | ||
yarn lint | ||
``` | ||
|
||
### Customize configuration | ||
See [Configuration Reference](https://cli.vuejs.org/config/). |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1.0"> | ||
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> | ||
<title><%= htmlWebpackPlugin.options.title %></title> | ||
</head> | ||
<body> | ||
<noscript> | ||
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> | ||
</noscript> | ||
<div id="app"></div> | ||
<!-- built files will be auto injected --> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<template> | ||
<div id="app"> | ||
<Toolbar /> | ||
<router-view /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from 'vue'; | ||
import Toolbar from './components/Toolbar.vue'; | ||
const components = { | ||
Toolbar, | ||
}; | ||
export default defineComponent({ | ||
name: 'app', | ||
components, | ||
}); | ||
</script> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<template> | ||
<div class="console bg-marine text-white text-xs p-4 rounded-md relative"> | ||
<ul class="absolute top-1 left-2"> | ||
<li class="rounded w-2 h-2 bg-salmon inline-block mr-1"></li> | ||
<li class="rounded w-2 h-2 bg-yellow-300 inline-block mr-1"></li> | ||
<li class="rounded w-2 h-2 bg-green-500 inline-block"></li> | ||
</ul> | ||
<pre | ||
data-cy="form-values" | ||
class="shadow-lg pt-4" | ||
:data-formValues="jsonValues" | ||
>{{ content }}</pre | ||
> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { computed, defineComponent } from 'vue'; | ||
const props = { | ||
content: String, | ||
}; | ||
export default defineComponent({ | ||
name: 'console', | ||
props, | ||
setup(props) { | ||
const jsonValues = computed(() => JSON.stringify(props.content)); | ||
return { | ||
jsonValues, | ||
}; | ||
}, | ||
}); | ||
</script> | ||
|
||
<style></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<template> | ||
<header class="toolbar flex px-8 py-4 border-b border-gray-100"> | ||
<img src="../assets/logo.svg" class="logo mr-8" /> | ||
<h1 class="text-bg text-xl font-bold font-display text-gray-700"> | ||
{{ title }} | ||
</h1> | ||
</header> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { computed, defineComponent } from 'vue'; | ||
import { useRoute } from 'vue-router'; | ||
export default defineComponent({ | ||
name: 'toolbar', | ||
setup() { | ||
const route = useRoute(); | ||
const title = computed(() => route.meta.title || 'Vue Dynamic Forms'); | ||
return { title }; | ||
}, | ||
}); | ||
</script> | ||
|
||
<style> | ||
.logo { | ||
width: 32px; | ||
height: 32px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { createApp } from 'vue'; | ||
import App from './App.vue'; | ||
import './styles/main.scss'; | ||
import router from './router'; | ||
|
||
import { createDynamicForms } from '../../../src'; | ||
|
||
const VueDynamicForms = createDynamicForms({ | ||
autoValidate: true, | ||
form: { | ||
customClass: 'plugin-options-class-added', | ||
method: 'POST', | ||
netlify: false, | ||
netlifyHoneypot: null, | ||
}, | ||
}); | ||
|
||
export const app = createApp(App); | ||
|
||
app.use(VueDynamicForms); | ||
|
||
app.use(router).mount('#app'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'; | ||
import Home from '../views/Home.vue'; | ||
|
||
const routes: Array<RouteRecordRaw> = [ | ||
{ | ||
path: '/', | ||
name: 'Home', | ||
component: Home, | ||
}, | ||
{ | ||
path: '/general', | ||
name: 'General', | ||
meta: { | ||
title: 'General', | ||
}, | ||
component: () => | ||
import(/* webpackChunkName: "general" */ '../views/General.vue'), | ||
}, | ||
{ | ||
path: '/basic', | ||
name: 'Basic', | ||
meta: { | ||
title: 'Basic', | ||
}, | ||
component: () => | ||
import(/* webpackChunkName: "basic" */ '../views/Basic.vue'), | ||
}, | ||
{ | ||
path: '/text-fields', | ||
name: 'Text Fields', | ||
meta: { | ||
title: 'Text Fields', | ||
}, | ||
component: () => | ||
import(/* webpackChunkName: "text-fields" */ '../views/TextFields.vue'), | ||
}, | ||
{ | ||
path: '/number-fields', | ||
name: 'Number Fields', | ||
meta: { | ||
title: 'Number Fields', | ||
}, | ||
component: () => | ||
import(/* webpackChunkName: "text-fields" */ '../views/NumberFields.vue'), | ||
}, | ||
{ | ||
path: '/select-fields', | ||
name: 'Select Fields', | ||
meta: { | ||
title: 'Select Fields', | ||
}, | ||
component: () => | ||
import(/* webpackChunkName: "text-fields" */ '../views/SelectFields.vue'), | ||
}, | ||
{ | ||
path: '/textarea-fields', | ||
name: 'TextArea Fields', | ||
meta: { | ||
title: 'TextArea Fields', | ||
}, | ||
component: () => | ||
import( | ||
/* webpackChunkName: "text-fields" */ '../views/TextAreaFields.vue' | ||
), | ||
}, | ||
{ | ||
path: '/checkbox-fields', | ||
name: 'Checkbox Fields', | ||
meta: { | ||
title: 'Checkbox Fields', | ||
}, | ||
component: () => | ||
import( | ||
/* webpackChunkName: "checkbox-fields" */ '../views/CheckboxFields.vue' | ||
), | ||
}, | ||
{ | ||
path: '/radio-fields', | ||
name: 'Radio Fields', | ||
meta: { | ||
title: 'Radio Fields', | ||
}, | ||
component: () => | ||
import(/* webpackChunkName: "radio-fields" */ '../views/RadioFields.vue'), | ||
}, | ||
{ | ||
path: '/login', | ||
name: 'Login', | ||
meta: { | ||
title: 'Login', | ||
}, | ||
component: () => | ||
import(/* webpackChunkName: "campaigns" */ '../views/Login.vue'), | ||
}, | ||
]; | ||
|
||
const router = createRouter({ | ||
history: createWebHistory(process.env.BASE_URL), | ||
routes, | ||
}); | ||
|
||
export default router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare module '*.vue' { | ||
import { defineComponent } from 'vue'; | ||
const component: ReturnType<typeof defineComponent>; | ||
export default component; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@import 'tailwindcss/base'; | ||
|
||
@import 'tailwindcss/components'; | ||
|
||
@import 'tailwindcss/utilities'; | ||
|
||
@import '@/styles/themes/default.scss'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.