Skip to content

Commit 7807c33

Browse files
authored
chore: updated the contribution guide, optimized the instructions on triggering component e2e tests (#3348)
1 parent 4b806d9 commit 7807c33

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

CONTRIBUTING.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,15 @@ The commit message should be in the form of a `type(scope): description of the m
5757

5858
1. The specification of the title is the same as the commit information, which is entered in the form of `type(scope): description information`.
5959

60-
2. **e2e test** of trigger components: Adding '[componentName1, componentName2]' to the Pull Request title will execute test cases for componentName1, componentName2, and declare this structure when changes to code affect components.
60+
2. Trigger component **e2e test**: CI will automatically trigger the test cases of the corresponding components according to the files modified by the PR. If you need to manually trigger the test of a specific component, you can add the component name in the format of `[componentName1, componentName2]` in the Pull Request title, and the system will execute the test cases of these specified components.
6161

62-
- Note: The `github action` in this project identifies test e2e use cases to be executed by matching the component names declared by `[componentName1, componentName2]` with the path names in the `examples/sites/demos` directory. (Because running the full test case is too time consuming)
63-
64-
- When modifying a sub-component of a component, such as the `col` component, which has no corresponding examples and test cases, the `layout` component should be tested, because the `col` component is a sub-component of the `layout` component. The PR title can be: `fix(col): [layout] xxxxxxxxxxxxxx`
62+
- Note: The `github action` under this project will use the component name declared by `[componentName1, componentName2]` to match the path name under the `examples/sites/demos` directory to identify the test e2e cases to be executed. (Because running all test cases is too time-consuming)
6563

6664
3. Example title:
6765

68-
- Supplement alert component document: `docs(alert): [alert] xxxxxxxxxxxxxxx`, `docs(site): [alert] xxxxxxxxxxxxxxx`
69-
- Supplement alert component test case: `test(alert): [alert] xxxxxxxxxxxxxx`
70-
- Fixed bug in alert component @opentiny/vue-renderless: `fix(vue-renderless/alert): [alert] xxxxxxxxxxxxxx`
66+
- Added alert component documentation: `docs(alert): xxxxxxxxxxxxxxx`, `docs(site):xxxxxxxxxxxxxxx`
67+
- Added alert component test cases: `test(alert): xxxxxxxxxxxxxx`
68+
- Fixed the defect of alert component @opentiny/vue-renderless (manually trigger e2e test cases): `fix(vue-renderless/alert): [alert] xxxxxxxxxxxxxxx`
7169

7270
#### Pull Request Description
7371

CONTRIBUTING.zh-CN.md

+4-6
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,15 @@ commit 信息要以 `type(scope): 描述信息` 的形式填写,例如 `fix(vu
5757

5858
1. 标题的规范与 commit 信息一样,以`type(scope): 描述信息` 的形式填写。
5959

60-
2. 触发组件的 **e2e 测试**: Pull Request 标题里添加 `[componentName1, componentName2]`,将会执行 componentName1,componentName2 的测试用例,当改动的代码会影响组件时,需要声明这个结构
60+
2. 触发组件的 **e2e 测试**: CI 会自动根据 PR 修改的文件来触发相应组件的测试用例。如果需要手动触发特定组件的测试,可以在 Pull Request 标题中添加 `[componentName1, componentName2]` 格式的组件名称,系统将会执行这些指定组件的测试用例
6161

6262
- 注:本项目下的 `github action` 会用`[componentName1, componentName2]`声明的组件名匹配 `examples/sites/demos` 目录下的路径名称,识别要执行的测试e2e用例。(因为全量跑测试用例太耗费时间)
6363

64-
- 当修改了某个组件的子组件,比如`col`组件,它本身没有对应的示例以及测试用例,这时应该要测试的是`layout`组件,因为`col`组件是`layout`组件的子组件,PR 标题可以这样: `fix(col): [layout] xxxxxxxxxxxxxx`
65-
6664
3. 标题示例:
6765

68-
- 补充 alert 组件文档: `docs(alert): [alert] xxxxxxxxxxxxxxx`, `docs(site): [alert] xxxxxxxxxxxxxxx`
69-
- 补充 alert 组件测试用例: `test(alert): [alert] xxxxxxxxxxxxxx`
70-
- 修复 alert 组件 @opentiny/vue-renderless 下的缺陷: `fix(vue-renderless/alert): [alert] xxxxxxxxxxxxxx`
66+
- 补充 alert 组件文档: `docs(alert): xxxxxxxxxxxxxxx`, `docs(site):xxxxxxxxxxxxxxx`
67+
- 补充 alert 组件测试用例: `test(alert): xxxxxxxxxxxxxx`
68+
- 修复 alert 组件 @opentiny/vue-renderless 下的缺陷(手动触发 e2e 测试用例): `fix(vue-renderless/alert): [alert] xxxxxxxxxxxxxx`
7169

7270
#### Pull Request 的描述
7371

0 commit comments

Comments
 (0)