[Feature][UI Next] Add e2e to security token manage page. (#8392)

This commit is contained in:
songjianet 2022-02-15 20:58:12 +08:00 committed by GitHub
parent 08f642c756
commit 9add742919
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 17 deletions

View File

@ -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 |

View File

@ -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

View File

@ -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}

View File

@ -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)