lenghui.yp
4 years ago
44 changed files with 370 additions and 31 deletions
@ -0,0 +1,47 @@ |
|||||
|
version: 2 |
||||
|
jobs: |
||||
|
build: |
||||
|
docker: |
||||
|
- image: circleci/node:latest |
||||
|
|
||||
|
working_directory: ~/repo |
||||
|
|
||||
|
steps: |
||||
|
- checkout |
||||
|
|
||||
|
# 恢复缓存 |
||||
|
- restore_cache: |
||||
|
key: node-modules-{{ checksum "package.json" }} |
||||
|
# 安装依赖 |
||||
|
- run: |
||||
|
name: Install Dependencies |
||||
|
command: yarn --frozen-lockfile |
||||
|
# 格式化代码 |
||||
|
- run: |
||||
|
name: Format Code |
||||
|
command: yarn lint |
||||
|
# 写缓存 |
||||
|
- save_cache: |
||||
|
key: node-modules-{{ checksum "package-lock.json" }} |
||||
|
paths: |
||||
|
- ./node_modules |
||||
|
- ~/.cache/yarn |
||||
|
# 代码打包构建 |
||||
|
# - run: |
||||
|
# name: Run Build |
||||
|
# command: yarn build |
||||
|
# 跑单元测试代码 |
||||
|
- run: |
||||
|
name: Run Tests |
||||
|
command: yarn test |
||||
|
no_output_timeout: 300m |
||||
|
# 跑端对端测试代码 |
||||
|
- run: |
||||
|
name: Run E2E Tests |
||||
|
command: yarn e2e |
||||
|
no_output_timeout: 300m |
||||
|
# 集成文档 |
||||
|
- run: |
||||
|
name: Generate Doc |
||||
|
command: yarn doc |
||||
|
no_output_timeout: 300m |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,5 @@ |
|||||
|
describe('test', () => { |
||||
|
it('test suite', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,11 @@ |
|||||
|
module.exports = { |
||||
|
clearMocks: true, |
||||
|
coverageDirectory: "coverage", |
||||
|
coverageProvider: "v8", |
||||
|
testEnvironment: "node", |
||||
|
rootDir: '../', |
||||
|
moduleFileExtensions: ['js', 'json', 'jsx', 'node'], |
||||
|
testMatch: [ |
||||
|
"<rootDir>/__tests__/cli/src/**/*.(spec|test).[jt]s?(x)" |
||||
|
] |
||||
|
}; |
@ -0,0 +1,11 @@ |
|||||
|
module.exports = { |
||||
|
clearMocks: true, |
||||
|
coverageDirectory: "coverage", |
||||
|
coverageProvider: "v8", |
||||
|
testEnvironment: "node", |
||||
|
rootDir: '../', |
||||
|
moduleFileExtensions: ['js', 'json', 'jsx', 'node'], |
||||
|
testMatch: [ |
||||
|
"<rootDir>/__tests__/core/src/**/*.(spec|test).[jt]s?(x)" |
||||
|
] |
||||
|
}; |
@ -0,0 +1,11 @@ |
|||||
|
module.exports = { |
||||
|
clearMocks: true, |
||||
|
coverageDirectory: "coverage", |
||||
|
coverageProvider: "v8", |
||||
|
testEnvironment: "node", |
||||
|
rootDir: '../', |
||||
|
moduleFileExtensions: ['js', 'json', 'jsx', 'node'], |
||||
|
testMatch: [ |
||||
|
"<rootDir>/__tests__/json-schema-editor/src/**/*.(spec|test).[jt]s?(x)" |
||||
|
] |
||||
|
}; |
@ -0,0 +1,11 @@ |
|||||
|
module.exports = { |
||||
|
clearMocks: true, |
||||
|
coverageDirectory: "coverage", |
||||
|
coverageProvider: "v8", |
||||
|
testEnvironment: "node", |
||||
|
rootDir: '../', |
||||
|
moduleFileExtensions: ['js', 'json', 'jsx', 'node'], |
||||
|
testMatch: [ |
||||
|
"<rootDir>/__tests__/plugin-store/src/**/*.(spec|test).[jt]s?(x)" |
||||
|
] |
||||
|
}; |
@ -0,0 +1,5 @@ |
|||||
|
{ |
||||
|
"name": "Using fixtures to represent data", |
||||
|
"email": "hello@cypress.io", |
||||
|
"body": "Fixtures are a great way to mock data for responses to routes" |
||||
|
} |
@ -0,0 +1,28 @@ |
|||||
|
/// <reference types="cypress" />
|
||||
|
|
||||
|
context('Actions', () => { |
||||
|
// 1. 打开http://localhost:8001/
|
||||
|
beforeEach(() => { |
||||
|
cy.visit('http://localhost:8001/') |
||||
|
}) |
||||
|
|
||||
|
// 2. 测试是否能将左侧的组件拖动到画布中
|
||||
|
it('the components on the left can be dragged into the canvas', () => { |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
// 3. 测试是否可修改节点的显示名称、逻辑触发名称、代码、投放配置schema、依赖
|
||||
|
it('you can modify the display name, logical trigger name, code, delivery configuration schema, and dependencies of the node', () => { |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
// 4. 测试能够run起来一个最小流程(写好代码)
|
||||
|
it('A minimal process can be run', () => { |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
// 5. 测试更改节点位置,输出结果不变
|
||||
|
it('ensure that the node position is changed and the output result remains unchanged', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,28 @@ |
|||||
|
/// <reference types="cypress" />
|
||||
|
|
||||
|
context('Actions', () => { |
||||
|
// 1. 打开http://localhost:8001/
|
||||
|
beforeEach(() => { |
||||
|
cy.visit('http://localhost:8001/') |
||||
|
}) |
||||
|
|
||||
|
// 2. 测试是否能将左侧的组件拖动到画布中
|
||||
|
it('the components on the left can be dragged into the canvas', () => { |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
// 3. 测试是否可修改节点的显示名称、逻辑触发名称、代码、投放配置schema、依赖
|
||||
|
it('you can modify the display name, logical trigger name, code, delivery configuration schema, and dependencies of the node', () => { |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
// 4. 测试能够run起来一个最小流程(写好代码)
|
||||
|
it('A minimal process can be run', () => { |
||||
|
|
||||
|
}) |
||||
|
|
||||
|
// 5. 测试更改节点位置,输出结果不变
|
||||
|
it('ensure that the node position is changed and the output result remains unchanged', () => { |
||||
|
|
||||
|
}) |
||||
|
}) |
@ -0,0 +1,21 @@ |
|||||
|
/// <reference types="cypress" />
|
||||
|
// ***********************************************************
|
||||
|
// This example plugins/index.js can be used to load plugins
|
||||
|
//
|
||||
|
// You can change the location of this file or turn off loading
|
||||
|
// the plugins file with the 'pluginsFile' configuration option.
|
||||
|
//
|
||||
|
// You can read more here:
|
||||
|
// https://on.cypress.io/plugins-guide
|
||||
|
// ***********************************************************
|
||||
|
|
||||
|
// This function is called when a project is opened or re-opened (e.g. due to
|
||||
|
// the project's config changing)
|
||||
|
|
||||
|
/** |
||||
|
* @type {Cypress.PluginConfig} |
||||
|
*/ |
||||
|
module.exports = (on, config) => { |
||||
|
// `on` is used to hook into various events Cypress emits
|
||||
|
// `config` is the resolved Cypress config
|
||||
|
} |
@ -0,0 +1,25 @@ |
|||||
|
// ***********************************************
|
||||
|
// This example commands.js shows you how to
|
||||
|
// create various custom commands and overwrite
|
||||
|
// existing commands.
|
||||
|
//
|
||||
|
// For more comprehensive examples of custom
|
||||
|
// commands please read more here:
|
||||
|
// https://on.cypress.io/custom-commands
|
||||
|
// ***********************************************
|
||||
|
//
|
||||
|
//
|
||||
|
// -- This is a parent command --
|
||||
|
// Cypress.Commands.add("login", (email, password) => { ... })
|
||||
|
//
|
||||
|
//
|
||||
|
// -- This is a child command --
|
||||
|
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
|
||||
|
//
|
||||
|
//
|
||||
|
// -- This is a dual command --
|
||||
|
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
|
||||
|
//
|
||||
|
//
|
||||
|
// -- This will overwrite an existing command --
|
||||
|
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
@ -0,0 +1,20 @@ |
|||||
|
// ***********************************************************
|
||||
|
// This example support/index.js is processed and
|
||||
|
// loaded automatically before your test files.
|
||||
|
//
|
||||
|
// This is a great place to put global configuration and
|
||||
|
// behavior that modifies Cypress.
|
||||
|
//
|
||||
|
// You can change the location of this file or turn off
|
||||
|
// automatically serving support files with the
|
||||
|
// 'supportFile' configuration option.
|
||||
|
//
|
||||
|
// You can read more here:
|
||||
|
// https://on.cypress.io/configuration
|
||||
|
// ***********************************************************
|
||||
|
|
||||
|
// Import commands.js using ES2015 syntax:
|
||||
|
import './commands' |
||||
|
|
||||
|
// Alternatively you can use CommonJS syntax:
|
||||
|
// require('./commands')
|
@ -0,0 +1,8 @@ |
|||||
|
# 为iMove做贡献 |
||||
|
|
||||
|
* 请先fork一份到自己的项目下,不要直接在仓库下建分支。 |
||||
|
* commit信息要以`[组件名]:描述信息`的形式填写,例如`[canvas]:fix xxx bug`。 |
||||
|
* 如果您已经修复了错误或者添加了应测试的代码,请添加测试! |
||||
|
* 确保提交PR之前请先rebase,保持commit记录的整洁性。 |
||||
|
* 确保PR是提交到`dev`分支,而不是`master`分支。 |
||||
|
* 如果修复的是bug,请在PR中给出描述信息。 |
@ -0,0 +1 @@ |
|||||
|
# 上下文(ctx) |
@ -0,0 +1 @@ |
|||||
|
# 数据读写(data) |
@ -0,0 +1 @@ |
|||||
|
# 边(edge) |
@ -0,0 +1 @@ |
|||||
|
# 节点组(group) |
@ -0,0 +1 @@ |
|||||
|
# 布局(layout) |
@ -0,0 +1 @@ |
|||||
|
# 逻辑元件(module) |
@ -0,0 +1 @@ |
|||||
|
# 节点(node) |
@ -0,0 +1 @@ |
|||||
|
# 流程图(schema) |
@ -0,0 +1 @@ |
|||||
|
## 配置文档 |
@ -0,0 +1 @@ |
|||||
|
## 使用文档 |
@ -0,0 +1 @@ |
|||||
|
## 问题指引 |
@ -0,0 +1 @@ |
|||||
|
## 插件文档 |
Loading…
Reference in new issue