This is an automated email from the ASF dual-hosted git repository.

wangyizhi pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new 9add742  [Feature][UI Next] Add e2e to security token manage page. 
(#8392)
9add742 is described below

commit 9add74291916843ac8a916b7fbb4e1e3e2f1906a
Author: songjianet <[email protected]>
AuthorDate: Tue Feb 15 20:58:12 2022 +0800

    [Feature][UI Next] Add e2e to security token manage page. (#8392)
---
 dolphinscheduler-ui-next/docs/e2e/security.md      | 27 +++++++++++-----------
 .../token-manage/components/token-modal.tsx        |  5 ++++
 .../src/views/security/token-manage/index.tsx      | 13 +++++++++--
 .../src/views/security/token-manage/use-table.ts   |  4 +++-
 4 files changed, 32 insertions(+), 17 deletions(-)

diff --git a/dolphinscheduler-ui-next/docs/e2e/security.md 
b/dolphinscheduler-ui-next/docs/e2e/security.md
index c69ea97..72ee807 100644
--- a/dolphinscheduler-ui-next/docs/e2e/security.md
+++ b/dolphinscheduler-ui-next/docs/e2e/security.md
@@ -102,17 +102,16 @@ id:
 
 #### token manage
 
-class:
-- [ ] items
-- [ ] el-popconfirm
-- [ ] el-button--primary
-- [ ] userName
-- [ ] token
-- [ ] edit
-- [ ] delete
-
-id:
-- [ ] btnCreateToken
-- [ ] btnGenerateToken
-- [ ] btnSubmit
-- [ ] btnCancel
+| check              | class               |
+|--------------------|---------------------|
+| :white_check_mark: | items               |
+|  | el-popconfirm       |
+|  | el-button--primary  |
+| :white_check_mark: | username            |
+| :white_check_mark: | token               |
+| :white_check_mark: | edit                |
+| :white_check_mark: | delete              |
+| :white_check_mark: | btn-create-token    |
+| :white_check_mark: | btn-generate-token  |
+| :white_check_mark: | btn-submit          |
+| :white_check_mark: | btn-cancel          |
diff --git 
a/dolphinscheduler-ui-next/src/views/security/token-manage/components/token-modal.tsx
 
b/dolphinscheduler-ui-next/src/views/security/token-manage/components/token-modal.tsx
index e0abcf9..2dd8b8c 100644
--- 
a/dolphinscheduler-ui-next/src/views/security/token-manage/components/token-modal.tsx
+++ 
b/dolphinscheduler-ui-next/src/views/security/token-manage/components/token-modal.tsx
@@ -139,6 +139,8 @@ const TokenModal = defineComponent({
           confirmDisabled={
             !this.model.userId || !this.model.expireTime || !this.model.token
           }
+          confirmClassName='btn-submit'
+          cancelClassName='btn-cancel'
         >
           {{
             default: () => (
@@ -163,6 +165,7 @@ const TokenModal = defineComponent({
                   'GENERAL_USER' && (
                   <NFormItem label={t('security.token.user')} path='userId'>
                     <NSelect
+                      class='username'
                       filterable
                       placeholder={t('security.token.user_tips')}
                       options={this.model.generalOptions}
@@ -173,12 +176,14 @@ const TokenModal = defineComponent({
                 <NFormItem label={t('security.token.token')} path='token'>
                   <NSpace>
                     <NInput
+                      class='token'
                       style={{ width: '504px' }}
                       disabled
                       placeholder={t('security.token.token_tips')}
                       v-model={[this.model.token, 'value']}
                     />
                     <NButton
+                      class='btn-generate-token'
                       strong
                       secondary
                       circle
diff --git a/dolphinscheduler-ui-next/src/views/security/token-manage/index.tsx 
b/dolphinscheduler-ui-next/src/views/security/token-manage/index.tsx
index 5c723d6..4f7bdd5 100644
--- a/dolphinscheduler-ui-next/src/views/security/token-manage/index.tsx
+++ b/dolphinscheduler-ui-next/src/views/security/token-manage/index.tsx
@@ -105,7 +105,12 @@ const tokenManage = defineComponent({
         <NCard>
           <div class={styles['search-card']}>
             <div>
-              <NButton size='small' type='primary' onClick={handleModalChange}>
+              <NButton
+                class='btn-create-token'
+                size='small'
+                type='primary'
+                onClick={handleModalChange}
+              >
                 {t('security.token.create_token')}
               </NButton>
             </div>
@@ -129,7 +134,11 @@ const tokenManage = defineComponent({
           </div>
         </NCard>
         <Card class={styles['table-card']}>
-          <NDataTable columns={this.columns} data={this.tableData} />
+          <NDataTable
+            row-class-name='items'
+            columns={this.columns}
+            data={this.tableData}
+          />
           <div class={styles.pagination}>
             <NPagination
               v-model:page={this.page}
diff --git 
a/dolphinscheduler-ui-next/src/views/security/token-manage/use-table.ts 
b/dolphinscheduler-ui-next/src/views/security/token-manage/use-table.ts
index cf6584e..1612199 100644
--- a/dolphinscheduler-ui-next/src/views/security/token-manage/use-table.ts
+++ b/dolphinscheduler-ui-next/src/views/security/token-manage/use-table.ts
@@ -81,6 +81,7 @@ export function useTable() {
                         circle: true,
                         type: 'info',
                         size: 'small',
+                        class: 'edit',
                         onClick: () => {
                           handleEdit(row)
                         }
@@ -111,7 +112,8 @@ export function useTable() {
                             {
                               circle: true,
                               type: 'error',
-                              size: 'small'
+                              size: 'small',
+                              class: 'delete'
                             },
                             {
                               icon: () => h(DeleteOutlined)

Reply via email to