feat: udpate table header
1. update table header's buttons postion 2. update e2e command to adjust the change Change-Id: I50379428eaad9ba3b4571987b2478e6f05d25caa
This commit is contained in:
parent
968e2cf577
commit
91c5b7933b
@ -48,11 +48,11 @@ Because of the consistency of the front-end framework, when we write related use
|
|||||||
.wait(10000);
|
.wait(10000);
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Start')
|
.clickHeaderActionButtonByTitle('Start')
|
||||||
.checkDisableAction(2000)
|
.checkDisableAction(2000)
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000)
|
.checkDisableAction(2000)
|
||||||
.clickHeaderButtonByTitle('Reboot')
|
.clickHeaderActionButtonByTitle('Reboot')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -66,7 +66,7 @@ Because of the consistency of the front-end framework, when we write related use
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.url()
|
.url()
|
||||||
.should('include', `${listUrl}/create`)
|
.should('include', `${listUrl}/create`)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
@ -149,7 +149,7 @@ Looking at the structure and style of the elements through the page, I found tha
|
|||||||
const volumeJson = {
|
const volumeJson = {
|
||||||
name: volumeName,
|
name: volumeName,
|
||||||
};
|
};
|
||||||
cy.clickHeaderButton(1, 2000)
|
cy.clickHeaderActionButton(0, 2000)
|
||||||
.formAttachFile('content', contentFile)
|
.formAttachFile('content', contentFile)
|
||||||
.formAttachFile('params', paramFile)
|
.formAttachFile('params', paramFile)
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
@ -280,14 +280,14 @@ Looking at the structure and style of the elements through the page, I found tha
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create full backup', () => {
|
it('successfully create full backup', () => {
|
||||||
cy.clickHeaderButton(1, 5000)
|
cy.clickHeaderActionButton(0, 5000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formTableSelectBySearch('volume', volumeName)
|
.formTableSelectBySearch('volume', volumeName)
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.waitTableLoading();
|
.waitTableLoading();
|
||||||
|
|
||||||
cy.clickHeaderButton(1, 5000)
|
cy.clickHeaderActionButton(0, 5000)
|
||||||
.formInput('name', nameIns)
|
.formInput('name', nameIns)
|
||||||
.formTableSelectBySearchOption('volume', 'Status', 'In-use')
|
.formTableSelectBySearchOption('volume', 'Status', 'In-use')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -306,7 +306,7 @@ Looking at the structure and style of the elements through the page, I found tha
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formSelect('policy')
|
.formSelect('policy')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -336,7 +336,7 @@ Looking at the structure and style of the elements through the page, I found tha
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create by file', () => {
|
it('successfully create by file', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formRadioChoose('type', 1)
|
.formRadioChoose('type', 1)
|
||||||
.formInput('name', nameByFile)
|
.formInput('name', nameByFile)
|
||||||
.formAttachFile('public_key', filename)
|
.formAttachFile('public_key', filename)
|
||||||
@ -356,7 +356,7 @@ Looking at the structure and style of the elements through the page, I found tha
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create by file', () => {
|
it('successfully create by file', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formRadioChoose('type', 1)
|
.formRadioChoose('type', 1)
|
||||||
.formInput('name', nameByFile)
|
.formInput('name', nameByFile)
|
||||||
.formAttachFile('public_key', filename)
|
.formAttachFile('public_key', filename)
|
||||||
@ -372,7 +372,7 @@ Looking at the structure and style of the elements through the page, I found tha
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.url()
|
.url()
|
||||||
.should('include', `${listUrl}/create`)
|
.should('include', `${listUrl}/create`)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
@ -420,7 +420,7 @@ Looking at the structure and style of the elements through the page, I found tha
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', name)
|
.formText('description', name)
|
||||||
|
@ -126,7 +126,7 @@ Mainly include: waiting for the list to load
|
|||||||
const volumeJson = {
|
const volumeJson = {
|
||||||
name: volumeName,
|
name: volumeName,
|
||||||
};
|
};
|
||||||
cy.clickHeaderButton(1, 2000)
|
cy.clickHeaderActionButton(0, 2000)
|
||||||
.formAttachFile('content', contentFile)
|
.formAttachFile('content', contentFile)
|
||||||
.formAttachFile('params', paramFile)
|
.formAttachFile('params', paramFile)
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
@ -210,7 +210,7 @@ Mainly include: waiting for the list to load
|
|||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.checkColumnValue(6, 'Shutoff')
|
.checkColumnValue(6, 'Shutoff')
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -237,7 +237,7 @@ Mainly include: waiting for the list to load
|
|||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.checkColumnValue(6, 'Shutoff')
|
.checkColumnValue(6, 'Shutoff')
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -260,7 +260,7 @@ Mainly include: waiting for the list to load
|
|||||||
const volumeJson = {
|
const volumeJson = {
|
||||||
name: volumeName,
|
name: volumeName,
|
||||||
};
|
};
|
||||||
cy.clickHeaderButton(1, 2000)
|
cy.clickHeaderActionButton(0, 2000)
|
||||||
.formAttachFile('content', contentFile)
|
.formAttachFile('content', contentFile)
|
||||||
.formAttachFile('params', paramFile)
|
.formAttachFile('params', paramFile)
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
@ -290,7 +290,7 @@ Mainly contains
|
|||||||
|
|
||||||
The buttons above the table generally include: refresh, create, batch operation button, configure table list items, download
|
The buttons above the table generally include: refresh, create, batch operation button, configure table list items, download
|
||||||
|
|
||||||
- `clickHeaderButton`
|
- `clickHeaderActionButton`
|
||||||
|
|
||||||
- Click the button above the table,
|
- Click the button above the table,
|
||||||
- Parameter `buttonIndex`, the subscript of the button above the table
|
- Parameter `buttonIndex`, the subscript of the button above the table
|
||||||
@ -300,7 +300,7 @@ The buttons above the table generally include: refresh, create, batch operation
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
.wait(5000);
|
.wait(5000);
|
||||||
@ -309,7 +309,7 @@ The buttons above the table generally include: refresh, create, batch operation
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
- `clickHeaderButtonByTitle`
|
- `clickHeaderActionButtonByTitle`
|
||||||
|
|
||||||
- Click the button above the table by name, generally used for batch operation button clicks
|
- Click the button above the table by name, generally used for batch operation button clicks
|
||||||
|
|
||||||
@ -326,7 +326,7 @@ The buttons above the table generally include: refresh, create, batch operation
|
|||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.checkColumnValue(6, 'Shutoff')
|
.checkColumnValue(6, 'Shutoff')
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -573,11 +573,11 @@ The buttons above the table generally include: refresh, create, batch operation
|
|||||||
.wait(10000);
|
.wait(10000);
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Start')
|
.clickHeaderActionButtonByTitle('Start')
|
||||||
.checkDisableAction(2000)
|
.checkDisableAction(2000)
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000)
|
.checkDisableAction(2000)
|
||||||
.clickHeaderButtonByTitle('Reboot')
|
.clickHeaderActionButtonByTitle('Reboot')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -48,11 +48,11 @@
|
|||||||
.wait(10000);
|
.wait(10000);
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Start')
|
.clickHeaderActionButtonByTitle('Start')
|
||||||
.checkDisableAction(2000)
|
.checkDisableAction(2000)
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000)
|
.checkDisableAction(2000)
|
||||||
.clickHeaderButtonByTitle('Reboot')
|
.clickHeaderActionButtonByTitle('Reboot')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -66,7 +66,7 @@
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.url()
|
.url()
|
||||||
.should('include', `${listUrl}/create`)
|
.should('include', `${listUrl}/create`)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
@ -149,7 +149,7 @@
|
|||||||
const volumeJson = {
|
const volumeJson = {
|
||||||
name: volumeName,
|
name: volumeName,
|
||||||
};
|
};
|
||||||
cy.clickHeaderButton(1, 2000)
|
cy.clickHeaderActionButton(0, 2000)
|
||||||
.formAttachFile('content', contentFile)
|
.formAttachFile('content', contentFile)
|
||||||
.formAttachFile('params', paramFile)
|
.formAttachFile('params', paramFile)
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
@ -280,14 +280,14 @@
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create full backup', () => {
|
it('successfully create full backup', () => {
|
||||||
cy.clickHeaderButton(1, 5000)
|
cy.clickHeaderActionButton(0, 5000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formTableSelectBySearch('volume', volumeName)
|
.formTableSelectBySearch('volume', volumeName)
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.waitTableLoading();
|
.waitTableLoading();
|
||||||
|
|
||||||
cy.clickHeaderButton(1, 5000)
|
cy.clickHeaderActionButton(0, 5000)
|
||||||
.formInput('name', nameIns)
|
.formInput('name', nameIns)
|
||||||
.formTableSelectBySearchOption('volume', 'Status', 'In-use')
|
.formTableSelectBySearchOption('volume', 'Status', 'In-use')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -306,7 +306,7 @@
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formSelect('policy')
|
.formSelect('policy')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -336,7 +336,7 @@
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create by file', () => {
|
it('successfully create by file', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formRadioChoose('type', 1)
|
.formRadioChoose('type', 1)
|
||||||
.formInput('name', nameByFile)
|
.formInput('name', nameByFile)
|
||||||
.formAttachFile('public_key', filename)
|
.formAttachFile('public_key', filename)
|
||||||
@ -356,7 +356,7 @@
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create by file', () => {
|
it('successfully create by file', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formRadioChoose('type', 1)
|
.formRadioChoose('type', 1)
|
||||||
.formInput('name', nameByFile)
|
.formInput('name', nameByFile)
|
||||||
.formAttachFile('public_key', filename)
|
.formAttachFile('public_key', filename)
|
||||||
@ -372,7 +372,7 @@
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.url()
|
.url()
|
||||||
.should('include', `${listUrl}/create`)
|
.should('include', `${listUrl}/create`)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
@ -420,7 +420,7 @@
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', name)
|
.formText('description', name)
|
||||||
|
@ -117,7 +117,7 @@
|
|||||||
const volumeJson = {
|
const volumeJson = {
|
||||||
name: volumeName,
|
name: volumeName,
|
||||||
};
|
};
|
||||||
cy.clickHeaderButton(1, 2000)
|
cy.clickHeaderActionButton(0, 2000)
|
||||||
.formAttachFile('content', contentFile)
|
.formAttachFile('content', contentFile)
|
||||||
.formAttachFile('params', paramFile)
|
.formAttachFile('params', paramFile)
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
@ -197,7 +197,7 @@
|
|||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.checkColumnValue(6, 'Shutoff')
|
.checkColumnValue(6, 'Shutoff')
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -222,7 +222,7 @@
|
|||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.checkColumnValue(6, 'Shutoff')
|
.checkColumnValue(6, 'Shutoff')
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -243,7 +243,7 @@
|
|||||||
const volumeJson = {
|
const volumeJson = {
|
||||||
name: volumeName,
|
name: volumeName,
|
||||||
};
|
};
|
||||||
cy.clickHeaderButton(1, 2000)
|
cy.clickHeaderActionButton(0, 2000)
|
||||||
.formAttachFile('content', contentFile)
|
.formAttachFile('content', contentFile)
|
||||||
.formAttachFile('params', paramFile)
|
.formAttachFile('params', paramFile)
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
@ -270,7 +270,7 @@
|
|||||||
### 表单上方按钮的操作
|
### 表单上方按钮的操作
|
||||||
|
|
||||||
表格上方的按钮一般包含:刷新、创建、批量操作按钮、配置表格列表项、下载
|
表格上方的按钮一般包含:刷新、创建、批量操作按钮、配置表格列表项、下载
|
||||||
- `clickHeaderButton`
|
- `clickHeaderActionButton`
|
||||||
- 点击表格上方的按钮,
|
- 点击表格上方的按钮,
|
||||||
- 参数`buttonIndex`,表格上方按钮的下标
|
- 参数`buttonIndex`,表格上方按钮的下标
|
||||||
- 参数`waitTime`,点击后的等待时间,默认为 2 秒
|
- 参数`waitTime`,点击后的等待时间,默认为 2 秒
|
||||||
@ -279,7 +279,7 @@
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
.wait(5000);
|
.wait(5000);
|
||||||
@ -288,7 +288,7 @@
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
- `clickHeaderButtonByTitle`
|
- `clickHeaderActionButtonByTitle`
|
||||||
- 通过名称点击表格上方的按钮,一般用于批量操作按钮的点击
|
- 通过名称点击表格上方的按钮,一般用于批量操作按钮的点击
|
||||||
- 参数`title`,表格上方按钮上的文字
|
- 参数`title`,表格上方按钮上的文字
|
||||||
- 参数`waitTime`,点击后的等待时间,默认为 2 秒
|
- 参数`waitTime`,点击后的等待时间,默认为 2 秒
|
||||||
@ -303,7 +303,7 @@
|
|||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.checkColumnValue(6, 'Shutoff')
|
.checkColumnValue(6, 'Shutoff')
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
@ -532,11 +532,11 @@
|
|||||||
.wait(10000);
|
.wait(10000);
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Start')
|
.clickHeaderActionButtonByTitle('Start')
|
||||||
.checkDisableAction(2000)
|
.checkDisableAction(2000)
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000)
|
.checkDisableAction(2000)
|
||||||
.clickHeaderButtonByTitle('Reboot')
|
.clickHeaderActionButtonByTitle('Reboot')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Update table header:
|
||||||
|
|
||||||
|
* Move all common table buttons to the right top of the table, such as refresh button, download button, custom button, auto-refresh button.
|
||||||
|
|
||||||
|
* Move the quick search of the MagicInput component from the behind the search input to the front.
|
@ -560,6 +560,7 @@ class MagicInput extends PureComponent {
|
|||||||
'magic-input-outer-wrapper'
|
'magic-input-outer-wrapper'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
{this.renderChecks()}
|
||||||
<Row
|
<Row
|
||||||
className={classnames(
|
className={classnames(
|
||||||
'magic-input-wrapper',
|
'magic-input-wrapper',
|
||||||
@ -593,7 +594,6 @@ class MagicInput extends PureComponent {
|
|||||||
</Col>
|
</Col>
|
||||||
{this.renderClose()}
|
{this.renderClose()}
|
||||||
</Row>
|
</Row>
|
||||||
{this.renderChecks()}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -166,7 +166,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.magic-input-checks {
|
.magic-input-checks {
|
||||||
min-width: 158px;
|
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
|
|
||||||
|
:global {
|
||||||
|
.ant-checkbox + span {
|
||||||
|
text-wrap: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -788,20 +788,29 @@ export class BaseTable extends React.Component {
|
|||||||
<div className={styles['table-header']} id="sl-table-header-search">
|
<div className={styles['table-header']} id="sl-table-header-search">
|
||||||
<div
|
<div
|
||||||
className={classnames(
|
className={classnames(
|
||||||
styles['table-header-btns'],
|
styles['table-header-action-btns'],
|
||||||
'table-header-btns'
|
'table-header-action-btns'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{this.renderRefresh()}
|
|
||||||
{this.renderActions()}
|
{this.renderActions()}
|
||||||
{this.renderBatchActions()}
|
{this.renderBatchActions()}
|
||||||
{this.renderCustomButton()}
|
|
||||||
{this.renderDownload()}
|
|
||||||
{this.renderRefreshAuto()}
|
|
||||||
</div>
|
</div>
|
||||||
{this.renderTimeFilter()}
|
{this.renderTimeFilter()}
|
||||||
{this.renderMiddleInHeader()}
|
{this.renderMiddleInHeader()}
|
||||||
{this.renderSearch()}
|
<div className={styles['table-header-right']}>
|
||||||
|
{this.renderSearch()}
|
||||||
|
<div
|
||||||
|
className={classnames(
|
||||||
|
styles['table-header-btns'],
|
||||||
|
'table-header-btns'
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
{this.renderRefresh()}
|
||||||
|
{this.renderDownload()}
|
||||||
|
{this.renderCustomButton()}
|
||||||
|
{this.renderRefreshAuto()}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,8 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-header-btns {
|
.table-header-btns,
|
||||||
|
.table-header-action-btns {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin-bottom: calc(@body-padding - 4px);
|
margin-bottom: calc(@body-padding - 4px);
|
||||||
@ -84,7 +85,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search-row {
|
.search-row {
|
||||||
float: right;
|
|
||||||
min-width: 350px;
|
min-width: 350px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,3 +92,23 @@
|
|||||||
width: 288px;
|
width: 288px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// .table-header-action-btns {
|
||||||
|
// flex-grow: 0;
|
||||||
|
// flex-shrink: 0;
|
||||||
|
// }
|
||||||
|
|
||||||
|
.table-header-right {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-header-btns {
|
||||||
|
margin-right: 0;
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
|
:global {
|
||||||
|
button:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -26,7 +26,7 @@ describe('The Aggregate Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create aggregate', () => {
|
it('successfully create aggregate', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
|
@ -58,7 +58,7 @@ describe('The Bare Metal Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formSelect('driver')
|
.formSelect('driver')
|
||||||
|
@ -31,7 +31,7 @@ describe('The Flavor Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
.formRadioChoose('architecture', 1)
|
.formRadioChoose('architecture', 1)
|
||||||
.formRadioChoose('category', 0)
|
.formRadioChoose('category', 0)
|
||||||
|
@ -52,7 +52,7 @@ describe('The Image Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.url()
|
.url()
|
||||||
.should('include', `${listUrl}/create`)
|
.should('include', `${listUrl}/create`)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
@ -74,7 +74,7 @@ describe('The Image Page', () => {
|
|||||||
it('successfully create shared image by admin', () => {
|
it('successfully create shared image by admin', () => {
|
||||||
cy.loginAdmin(imageListUrlAdmin)
|
cy.loginAdmin(imageListUrlAdmin)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formInput('name', sharedImage)
|
.formInput('name', sharedImage)
|
||||||
.formTableSelectBySearch('owner', projectName)
|
.formTableSelectBySearch('owner', projectName)
|
||||||
|
@ -39,7 +39,7 @@ describe('The Instance Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.url()
|
.url()
|
||||||
.should('include', `${listUrl}/create`)
|
.should('include', `${listUrl}/create`)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
@ -87,11 +87,11 @@ describe('The Instance Page', () => {
|
|||||||
.wait(10000);
|
.wait(10000);
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Start')
|
.clickHeaderActionButtonByTitle('Start')
|
||||||
.checkDisableAction(2000)
|
.checkDisableAction(2000)
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000)
|
.checkDisableAction(2000)
|
||||||
.clickHeaderButtonByTitle('Reboot')
|
.clickHeaderActionButtonByTitle('Reboot')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -114,7 +114,7 @@ describe('The Instance Page', () => {
|
|||||||
.waitStatusActive()
|
.waitStatusActive()
|
||||||
.checkColumnValue(6, 'Active')
|
.checkColumnValue(6, 'Active')
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Start')
|
.clickHeaderActionButtonByTitle('Start')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ onlyOn(ironicServiceEnabled, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(2)
|
cy.clickHeaderActionButton(2)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelect('flavor')
|
.formTableSelect('flavor')
|
||||||
.formRadioChooseByLabel('image', imageType)
|
.formRadioChooseByLabel('image', imageType)
|
||||||
@ -107,7 +107,7 @@ onlyOn(ironicServiceEnabled, () => {
|
|||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.checkColumnValue(6, 'Shutoff')
|
.checkColumnValue(6, 'Shutoff')
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderActionButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -117,7 +117,7 @@ onlyOn(ironicServiceEnabled, () => {
|
|||||||
.waitStatusActive()
|
.waitStatusActive()
|
||||||
.checkColumnValue(6, 'Active')
|
.checkColumnValue(6, 'Active')
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Start')
|
.clickHeaderActionButtonByTitle('Start')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -26,14 +26,14 @@ describe('The Keypair Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
.wait(5000);
|
.wait(5000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create by file', () => {
|
it('successfully create by file', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formRadioChoose('type', 1)
|
.formRadioChoose('type', 1)
|
||||||
.formInput('name', nameByFile)
|
.formInput('name', nameByFile)
|
||||||
.formAttachFile('public_key', filename)
|
.formAttachFile('public_key', filename)
|
||||||
|
@ -32,7 +32,7 @@ describe('The Server Group Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formSelect('policy')
|
.formSelect('policy')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -50,7 +50,7 @@ describe('The Server Group Page', () => {
|
|||||||
const password = 'passW0rd_1';
|
const password = 'passW0rd_1';
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.goToDetail()
|
.goToDetail()
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formTableSelect('flavor')
|
.formTableSelect('flavor')
|
||||||
.formRadioChooseByLabel('image', imageType)
|
.formRadioChooseByLabel('image', imageType)
|
||||||
.formTableSelectBySearch('image', imageName)
|
.formTableSelectBySearch('image', imageName)
|
||||||
|
@ -24,7 +24,7 @@ describe('The Metadata Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formAttachFile('metadata', filename)
|
.formAttachFile('metadata', filename)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
|
@ -119,7 +119,7 @@ describe('The System Info Page', () => {
|
|||||||
// .tableSearchText('l3')
|
// .tableSearchText('l3')
|
||||||
// .goToDetail(0)
|
// .goToDetail(0)
|
||||||
// .clickDetailTab('Router')
|
// .clickDetailTab('Router')
|
||||||
// .clickHeaderButton(1)
|
// .clickHeaderActionButton(0)
|
||||||
// .wait(10000)
|
// .wait(10000)
|
||||||
// .formTableSelectBySearch('router', routerName)
|
// .formTableSelectBySearch('router', routerName)
|
||||||
// .clickModalActionSubmitButton();
|
// .clickModalActionSubmitButton();
|
||||||
@ -147,7 +147,7 @@ describe('The System Info Page', () => {
|
|||||||
.tableSearchText('dhcp')
|
.tableSearchText('dhcp')
|
||||||
.goToDetail(0)
|
.goToDetail(0)
|
||||||
.clickDetailTab('Networks')
|
.clickDetailTab('Networks')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelectBySearch('network', networkName)
|
.formTableSelectBySearch('network', networkName)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
|
@ -43,7 +43,7 @@ onlyOn(heatServiceEnabled, () => {
|
|||||||
const volumeJson = {
|
const volumeJson = {
|
||||||
name: volumeName,
|
name: volumeName,
|
||||||
};
|
};
|
||||||
cy.clickHeaderButton(1, 2000)
|
cy.clickHeaderActionButton(0, 2000)
|
||||||
.formAttachFile('content', contentFile)
|
.formAttachFile('content', contentFile)
|
||||||
.formAttachFile('params', paramFile)
|
.formAttachFile('params', paramFile)
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
@ -105,7 +105,7 @@ onlyOn(heatServiceEnabled, () => {
|
|||||||
const volumeJson = {
|
const volumeJson = {
|
||||||
name: volumeNameAbandon,
|
name: volumeNameAbandon,
|
||||||
};
|
};
|
||||||
cy.clickHeaderButton(1, 2000)
|
cy.clickHeaderActionButton(0, 2000)
|
||||||
.formAttachFile('content', contentFile)
|
.formAttachFile('content', contentFile)
|
||||||
.formAttachFile('params', paramFile)
|
.formAttachFile('params', paramFile)
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
|
@ -32,7 +32,7 @@ describe('The Project Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
.waitTableLoading();
|
.waitTableLoading();
|
||||||
|
@ -30,7 +30,7 @@ describe('The User Group Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
|
@ -41,7 +41,7 @@ describe('The User Page', () => {
|
|||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
const creatUrl = `${listUrl}/create`;
|
const creatUrl = `${listUrl}/create`;
|
||||||
|
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.url()
|
.url()
|
||||||
.should('include', creatUrl)
|
.should('include', creatUrl)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
|
@ -38,7 +38,7 @@ onlyOn(manilaServiceEnabled, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', 'create')
|
.formText('description', 'create')
|
||||||
.formSelect('driver_handles_share_servers')
|
.formSelect('driver_handles_share_servers')
|
||||||
@ -60,7 +60,7 @@ onlyOn(manilaServiceEnabled, () => {
|
|||||||
.goToDetail()
|
.goToDetail()
|
||||||
.clickDetailTab('Extra Specs')
|
.clickDetailTab('Extra Specs')
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('keyName', extraKeyName)
|
.formInput('keyName', extraKeyName)
|
||||||
.formInput('value', 1000)
|
.formInput('value', 1000)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
|
@ -45,7 +45,7 @@ describe('The Floating IP Page', () => {
|
|||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.wait(2000);
|
cy.wait(2000);
|
||||||
cy.intercept('GET', '/networks').as('networks');
|
cy.intercept('GET', '/networks').as('networks');
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.wait('@networks')
|
.wait('@networks')
|
||||||
.formSelect('floating_network_id')
|
.formSelect('floating_network_id')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -54,7 +54,7 @@ describe('The Floating IP Page', () => {
|
|||||||
it('successfully batch create', () => {
|
it('successfully batch create', () => {
|
||||||
cy.wait(2000);
|
cy.wait(2000);
|
||||||
cy.intercept('GET', '/networks').as('networks');
|
cy.intercept('GET', '/networks').as('networks');
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.wait('@networks')
|
.wait('@networks')
|
||||||
.formSelect('floating_network_id')
|
.formSelect('floating_network_id')
|
||||||
.formCheckboxClick('batch_allocate')
|
.formCheckboxClick('batch_allocate')
|
||||||
|
@ -51,7 +51,7 @@ onlyOn(lbServiceEnabled, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create lb', () => {
|
it('successfully create lb', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', name)
|
.formText('description', name)
|
||||||
@ -117,7 +117,7 @@ onlyOn(lbServiceEnabled, () => {
|
|||||||
it('successfully create listener', () => {
|
it('successfully create listener', () => {
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.goToDetail(1, 2000)
|
.goToDetail(1, 2000)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', listener2)
|
.formInput('name', listener2)
|
||||||
.formText('description', listener2)
|
.formText('description', listener2)
|
||||||
.formSelect('protocol')
|
.formSelect('protocol')
|
||||||
@ -193,7 +193,7 @@ onlyOn(lbServiceEnabled, () => {
|
|||||||
.tableSearchText(listener)
|
.tableSearchText(listener)
|
||||||
.goToDetail(0, 2000)
|
.goToDetail(0, 2000)
|
||||||
.clickDetailTab('Members')
|
.clickDetailTab('Members')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formButtonClick('extMembers')
|
.formButtonClick('extMembers')
|
||||||
.get('.ant-form-item')
|
.get('.ant-form-item')
|
||||||
.eq(1)
|
.eq(1)
|
||||||
|
@ -35,7 +35,7 @@ describe('The Network Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create with subnet', () => {
|
it('successfully create with subnet', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', name)
|
.formText('description', name)
|
||||||
.formSelect('availableZone')
|
.formSelect('availableZone')
|
||||||
|
@ -48,7 +48,7 @@ describe('The Port Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', name)
|
.formText('description', name)
|
||||||
.formTableSelectBySearch('network_id', networkName, 5000)
|
.formTableSelectBySearch('network_id', networkName, 5000)
|
||||||
@ -75,7 +75,7 @@ describe('The Port Page', () => {
|
|||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.goToDetail()
|
.goToDetail()
|
||||||
.clickDetailTab('Allowed Address Pairs')
|
.clickDetailTab('Allowed Address Pairs')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formSelect('ip_version')
|
.formSelect('ip_version')
|
||||||
.formInput('ip_address', '10.10.10.1/24')
|
.formInput('ip_address', '10.10.10.1/24')
|
||||||
.formSelect('mac_address')
|
.formSelect('mac_address')
|
||||||
@ -158,7 +158,7 @@ describe('The Port Page', () => {
|
|||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.goToDetail()
|
.goToDetail()
|
||||||
.clickDetailTab('Fixed IPs')
|
.clickDetailTab('Fixed IPs')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formButtonClick('fixed_ips')
|
.formButtonClick('fixed_ips')
|
||||||
.formSelect('fixed_ips')
|
.formSelect('fixed_ips')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
|
@ -36,7 +36,7 @@ onlyOn(qosServiceEnabled, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', name)
|
.formText('description', name)
|
||||||
|
@ -30,7 +30,7 @@ describe('The Router Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1, 5000)
|
cy.clickHeaderActionButton(0, 5000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', name)
|
.formText('description', name)
|
||||||
.formTableSelect('hints')
|
.formTableSelect('hints')
|
||||||
|
@ -24,7 +24,7 @@ describe('The Security Group Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', name)
|
.formText('description', name)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -39,7 +39,7 @@ describe('The Security Group Page', () => {
|
|||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.goToDetail()
|
.goToDetail()
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formSelect('ethertype')
|
.formSelect('ethertype')
|
||||||
.formInput('sourcePort', 80)
|
.formInput('sourcePort', 80)
|
||||||
.formInput('remote_ip_prefix', '192.168.0.0/24')
|
.formInput('remote_ip_prefix', '192.168.0.0/24')
|
||||||
|
@ -51,7 +51,7 @@ onlyOn(vpnServiceEnabled, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create gateway', () => {
|
it('successfully create gateway', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', gateway)
|
.formInput('name', gateway)
|
||||||
.formText('description', gateway)
|
.formText('description', gateway)
|
||||||
.formTableSelectBySearch('router_id', routerName)
|
.formTableSelectBySearch('router_id', routerName)
|
||||||
@ -60,7 +60,7 @@ onlyOn(vpnServiceEnabled, () => {
|
|||||||
|
|
||||||
it('successfully create local endpoint', () => {
|
it('successfully create local endpoint', () => {
|
||||||
cy.clickTab('VPN EndPoint Groups', 'vpn_endpoint_groups')
|
cy.clickTab('VPN EndPoint Groups', 'vpn_endpoint_groups')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formInput('name', endpointLocal)
|
.formInput('name', endpointLocal)
|
||||||
.formText('description', endpointLocal)
|
.formText('description', endpointLocal)
|
||||||
@ -73,7 +73,7 @@ onlyOn(vpnServiceEnabled, () => {
|
|||||||
|
|
||||||
it('successfully create peer endpoint', () => {
|
it('successfully create peer endpoint', () => {
|
||||||
cy.clickTab('VPN EndPoint Groups', 'vpn_endpoint_groups')
|
cy.clickTab('VPN EndPoint Groups', 'vpn_endpoint_groups')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', endpointPeer)
|
.formInput('name', endpointPeer)
|
||||||
.formText('description', endpointPeer)
|
.formText('description', endpointPeer)
|
||||||
.formSelect('type', 'Peer')
|
.formSelect('type', 'Peer')
|
||||||
@ -84,7 +84,7 @@ onlyOn(vpnServiceEnabled, () => {
|
|||||||
|
|
||||||
it('successfully create ike policy', () => {
|
it('successfully create ike policy', () => {
|
||||||
cy.clickTab('IKE Policies', 'ike_policy')
|
cy.clickTab('IKE Policies', 'ike_policy')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', ikePolicy)
|
.formInput('name', ikePolicy)
|
||||||
.formText('description', ikePolicy)
|
.formText('description', ikePolicy)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -92,7 +92,7 @@ onlyOn(vpnServiceEnabled, () => {
|
|||||||
|
|
||||||
it('successfully create ipsec policy', () => {
|
it('successfully create ipsec policy', () => {
|
||||||
cy.clickTab('IPsec Policies', 'ipsec_policy')
|
cy.clickTab('IPsec Policies', 'ipsec_policy')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', ipsecPolicy)
|
.formInput('name', ipsecPolicy)
|
||||||
.formText('description', ipsecPolicy)
|
.formText('description', ipsecPolicy)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -100,7 +100,7 @@ onlyOn(vpnServiceEnabled, () => {
|
|||||||
|
|
||||||
it('successfully create ipsec site connection', () => {
|
it('successfully create ipsec site connection', () => {
|
||||||
cy.clickTab('IPsec Site Connections', 'ipsec_site_connections')
|
cy.clickTab('IPsec Site Connections', 'ipsec_site_connections')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formInput('name', ipsecSiteConnection)
|
.formInput('name', ipsecSiteConnection)
|
||||||
.formText('description', ipsecSiteConnection)
|
.formText('description', ipsecSiteConnection)
|
||||||
|
@ -44,7 +44,7 @@ onlyOn(backupServiceEnabled, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create full backup', () => {
|
it('successfully create full backup', () => {
|
||||||
cy.clickHeaderButton(1, 5000)
|
cy.clickHeaderActionButton(0, 5000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formTableSelectBySearch('volume', volumeName)
|
.formTableSelectBySearch('volume', volumeName)
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
@ -54,7 +54,7 @@ onlyOn(backupServiceEnabled, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create increment backup', () => {
|
it('successfully create increment backup', () => {
|
||||||
cy.clickHeaderButton(1, 5000)
|
cy.clickHeaderActionButton(0, 5000)
|
||||||
.formInput('name', nameInc)
|
.formInput('name', nameInc)
|
||||||
.formRadioChoose('incremental', 1)
|
.formRadioChoose('incremental', 1)
|
||||||
.formTableSelectBySearch('volume', volumeName)
|
.formTableSelectBySearch('volume', volumeName)
|
||||||
|
@ -23,7 +23,7 @@ describe('The Qos Specs Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formSelect('consumer')
|
.formSelect('consumer')
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
@ -39,7 +39,7 @@ describe('The Qos Specs Page', () => {
|
|||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.goToDetail()
|
.goToDetail()
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('value', 1000)
|
.formInput('value', 1000)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
|
@ -39,11 +39,11 @@ onlyOn(swiftEnabled, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create container', () => {
|
it('successfully create container', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
|
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name2)
|
.formInput('name', name2)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
@ -58,10 +58,10 @@ onlyOn(swiftEnabled, () => {
|
|||||||
|
|
||||||
it('successfully create folder', () => {
|
it('successfully create folder', () => {
|
||||||
cy.tableSearchText(name).goToContainerDetail();
|
cy.tableSearchText(name).goToContainerDetail();
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('folder_name', folderName)
|
.formInput('folder_name', folderName)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('folder_name', folderName2)
|
.formInput('folder_name', folderName2)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
@ -69,7 +69,7 @@ onlyOn(swiftEnabled, () => {
|
|||||||
it('successfully upload file in container', () => {
|
it('successfully upload file in container', () => {
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.goToContainerDetail()
|
.goToContainerDetail()
|
||||||
.clickHeaderButton(2)
|
.clickHeaderActionButton(2)
|
||||||
.formAttachFile('file', filename)
|
.formAttachFile('file', filename)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
|
@ -28,7 +28,7 @@ describe('The Volume Type Page', () => {
|
|||||||
|
|
||||||
it('successfully prepare resource', () => {
|
it('successfully prepare resource', () => {
|
||||||
cy.clickTab('QoS Specs')
|
cy.clickTab('QoS Specs')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', qosName)
|
.formInput('name', qosName)
|
||||||
.formSelect('consumer')
|
.formSelect('consumer')
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
@ -36,7 +36,7 @@ describe('The Volume Type Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', 'create')
|
.formText('description', 'create')
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
@ -53,7 +53,7 @@ describe('The Volume Type Page', () => {
|
|||||||
.goToDetail()
|
.goToDetail()
|
||||||
.clickDetailTab('Extra Specs')
|
.clickDetailTab('Extra Specs')
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('keyname', extraKeyName)
|
.formInput('keyname', extraKeyName)
|
||||||
.formInput('value', 1000)
|
.formInput('value', 1000)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
|
@ -48,7 +48,7 @@ describe('The Volume Page', () => {
|
|||||||
|
|
||||||
it('successfully prepare resource by admin', () => {
|
it('successfully prepare resource by admin', () => {
|
||||||
cy.loginAdmin(volumeTypeListUrl)
|
cy.loginAdmin(volumeTypeListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', volumeTypeName)
|
.formInput('name', volumeTypeName)
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
.waitTableLoading();
|
.waitTableLoading();
|
||||||
@ -61,7 +61,7 @@ describe('The Volume Page', () => {
|
|||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
const creatUrl = `${listUrl}/create`;
|
const creatUrl = `${listUrl}/create`;
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.url()
|
.url()
|
||||||
.should('include', creatUrl)
|
.should('include', creatUrl)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
|
@ -20,7 +20,7 @@ onlyOn(zunServiceEnabled, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.formAttachFile('template_file', filename)
|
.formAttachFile('template_file', filename)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
|
@ -20,7 +20,7 @@ onlyOn(zunServiceEnabled, () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderActionButton(0)
|
||||||
.url()
|
.url()
|
||||||
.should('include', `${listUrl}/create`)
|
.should('include', `${listUrl}/create`)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
|
@ -34,7 +34,7 @@ Cypress.Commands.add('createInstance', ({ name, networkName }) => {
|
|||||||
const imageName = Cypress.env('imageName');
|
const imageName = Cypress.env('imageName');
|
||||||
const imageType = Cypress.env('imageType');
|
const imageType = Cypress.env('imageType');
|
||||||
cy.visitPage(instanceListUrl)
|
cy.visitPage(instanceListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.wait(8000)
|
.wait(8000)
|
||||||
.formTableSelect('flavor')
|
.formTableSelect('flavor')
|
||||||
.formRadioChooseByLabel('image', imageType)
|
.formRadioChooseByLabel('image', imageType)
|
||||||
@ -64,7 +64,7 @@ Cypress.Commands.add('createInstance', ({ name, networkName }) => {
|
|||||||
Cypress.Commands.add('createNetwork', ({ name }) => {
|
Cypress.Commands.add('createNetwork', ({ name }) => {
|
||||||
const cidr = `10.10.${Cypress._.random(50, 100)}.0/24`;
|
const cidr = `10.10.${Cypress._.random(50, 100)}.0/24`;
|
||||||
cy.visitPage(networkListUrl)
|
cy.visitPage(networkListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formSelect('availableZone')
|
.formSelect('availableZone')
|
||||||
@ -77,7 +77,7 @@ Cypress.Commands.add('createNetwork', ({ name }) => {
|
|||||||
|
|
||||||
Cypress.Commands.add('createNetworkPolicy', ({ name }) => {
|
Cypress.Commands.add('createNetworkPolicy', ({ name }) => {
|
||||||
cy.visitPage(policyListUrl)
|
cy.visitPage(policyListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formText('description', name)
|
.formText('description', name)
|
||||||
// .formSelect('project_id', 'admin')
|
// .formSelect('project_id', 'admin')
|
||||||
@ -87,7 +87,7 @@ Cypress.Commands.add('createNetworkPolicy', ({ name }) => {
|
|||||||
|
|
||||||
Cypress.Commands.add('createRouter', ({ name, network }) => {
|
Cypress.Commands.add('createRouter', ({ name, network }) => {
|
||||||
cy.visitPage(routerListUrl)
|
cy.visitPage(routerListUrl)
|
||||||
.clickHeaderButton(1, 5000)
|
.clickHeaderActionButton(0, 5000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formCheckboxClick('openExternalNetwork')
|
.formCheckboxClick('openExternalNetwork')
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
@ -183,7 +183,7 @@ Cypress.Commands.add('createVolume', (name) => {
|
|||||||
|
|
||||||
Cypress.Commands.add('createSecurityGroup', ({ name }) => {
|
Cypress.Commands.add('createSecurityGroup', ({ name }) => {
|
||||||
cy.visitPage(securityGroupListUrl)
|
cy.visitPage(securityGroupListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
@ -192,7 +192,7 @@ Cypress.Commands.add('createFip', () => {
|
|||||||
cy.intercept('GET', '/networks').as('networks');
|
cy.intercept('GET', '/networks').as('networks');
|
||||||
cy.visitPage(fipListUrl)
|
cy.visitPage(fipListUrl)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.wait('@networks')
|
.wait('@networks')
|
||||||
.formSelect('floating_network_id')
|
.formSelect('floating_network_id')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -200,7 +200,7 @@ Cypress.Commands.add('createFip', () => {
|
|||||||
|
|
||||||
Cypress.Commands.add('createUserGroup', ({ name }) => {
|
Cypress.Commands.add('createUserGroup', ({ name }) => {
|
||||||
cy.visitPage(userGroupListUrl)
|
cy.visitPage(userGroupListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
@ -211,7 +211,7 @@ Cypress.Commands.add('createUser', ({ name }) => {
|
|||||||
const phone = '18500000000';
|
const phone = '18500000000';
|
||||||
const password = 'passW0rd_';
|
const password = 'passW0rd_';
|
||||||
cy.visitPage(userListUrl)
|
cy.visitPage(userListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formInput('email', email)
|
.formInput('email', email)
|
||||||
@ -227,7 +227,7 @@ Cypress.Commands.add('createUser', ({ name }) => {
|
|||||||
|
|
||||||
Cypress.Commands.add('createProject', ({ name }) => {
|
Cypress.Commands.add('createProject', ({ name }) => {
|
||||||
cy.visitPage(projectListUrl)
|
cy.visitPage(projectListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
@ -249,7 +249,7 @@ Cypress.Commands.add('createIronicFlavor', (name) => {
|
|||||||
cy.setAllFlavorType();
|
cy.setAllFlavorType();
|
||||||
cy.visitPage(flavorListUrl)
|
cy.visitPage(flavorListUrl)
|
||||||
.clickTab('Bare Metal', 'bare_metal')
|
.clickTab('Bare Metal', 'bare_metal')
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formRadioChoose('category', 0)
|
.formRadioChoose('category', 0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
@ -260,7 +260,7 @@ Cypress.Commands.add('createIronicFlavor', (name) => {
|
|||||||
Cypress.Commands.add('createIronicImage', ({ name }) => {
|
Cypress.Commands.add('createIronicImage', ({ name }) => {
|
||||||
const filename = 'cirros-0.4.0-x86_64-disk.qcow2';
|
const filename = 'cirros-0.4.0-x86_64-disk.qcow2';
|
||||||
cy.visitPage(imageListUrl)
|
cy.visitPage(imageListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderActionButton(0)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formAttachFile('file', filename)
|
.formAttachFile('file', filename)
|
||||||
.formSelect('disk_format', 'QCOW2 - QEMU Emulator')
|
.formSelect('disk_format', 'QCOW2 - QEMU Emulator')
|
||||||
|
@ -18,28 +18,45 @@ Cypress.Commands.add('waitTableLoading', () => {
|
|||||||
cy.get('.ant-spin-dot-spin', { timeout: 120000 }).should('not.exist');
|
cy.get('.ant-spin-dot-spin', { timeout: 120000 }).should('not.exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('clickHeaderButton', (buttonIndex, waitTime = 2000) => {
|
Cypress.Commands.add(
|
||||||
cy.get('.table-header-btns')
|
'clickHeaderTableButton',
|
||||||
.find('button')
|
(buttonIndex, waitTime = 2000) => {
|
||||||
.eq(buttonIndex)
|
cy.get('.table-header-btns')
|
||||||
.click({ force: true });
|
.find('button')
|
||||||
cy.wait(waitTime);
|
.eq(buttonIndex)
|
||||||
});
|
.click({ force: true });
|
||||||
|
cy.wait(waitTime);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
Cypress.Commands.add('clickHeaderButtonByTitle', (title, waitTime = 2000) => {
|
Cypress.Commands.add(
|
||||||
const realTitle = getTitle(title);
|
'clickHeaderActionButton',
|
||||||
cy.get('.table-header-btns')
|
(buttonIndex, waitTime = 2000) => {
|
||||||
.find('button')
|
cy.get('.table-header-action-btns')
|
||||||
.contains(realTitle)
|
.find('button')
|
||||||
.click({ force: true });
|
.eq(buttonIndex)
|
||||||
cy.wait(waitTime);
|
.click({ force: true });
|
||||||
});
|
cy.wait(waitTime);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
Cypress.Commands.add(
|
||||||
|
'clickHeaderActionButtonByTitle',
|
||||||
|
(title, waitTime = 2000) => {
|
||||||
|
const realTitle = getTitle(title);
|
||||||
|
cy.get('.table-header-action-btns')
|
||||||
|
.find('button')
|
||||||
|
.contains(realTitle)
|
||||||
|
.click({ force: true });
|
||||||
|
cy.wait(waitTime);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
Cypress.Commands.add(
|
Cypress.Commands.add(
|
||||||
'clickHeaderConfirmButtonByTitle',
|
'clickHeaderConfirmButtonByTitle',
|
||||||
(title, waitTime = 2000) => {
|
(title, waitTime = 2000) => {
|
||||||
const realTitle = getTitle(title);
|
const realTitle = getTitle(title);
|
||||||
cy.get('.table-header-btns')
|
cy.get('.table-header-action-btns')
|
||||||
.find('button')
|
.find('button')
|
||||||
.contains(realTitle)
|
.contains(realTitle)
|
||||||
.click({ force: true });
|
.click({ force: true });
|
||||||
@ -49,11 +66,11 @@ Cypress.Commands.add(
|
|||||||
);
|
);
|
||||||
|
|
||||||
Cypress.Commands.add(
|
Cypress.Commands.add(
|
||||||
'clickHeaderButtonInMoreByTitle',
|
'clickHeaderActionButtonInMoreByTitle',
|
||||||
(title, waitTime = 2000) => {
|
(title, waitTime = 2000) => {
|
||||||
const realTitle = getTitle(title);
|
const realTitle = getTitle(title);
|
||||||
const moreTitle = getTitle('More Actions');
|
const moreTitle = getTitle('More Actions');
|
||||||
cy.get('.table-header-btns')
|
cy.get('.table-action-header-btns')
|
||||||
.find('.ant-dropdown-trigger')
|
.find('.ant-dropdown-trigger')
|
||||||
.contains(moreTitle)
|
.contains(moreTitle)
|
||||||
.trigger('mouseover', { force: true });
|
.trigger('mouseover', { force: true });
|
||||||
@ -320,7 +337,7 @@ Cypress.Commands.add('waitStatusTextByFresh', (text) => {
|
|||||||
const noLengthCallback = () => {
|
const noLengthCallback = () => {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log('not contain', index);
|
console.log('not contain', index);
|
||||||
cy.freshTable();
|
cy.refreshTable();
|
||||||
index += 1;
|
index += 1;
|
||||||
cy.wait(5000);
|
cy.wait(5000);
|
||||||
};
|
};
|
||||||
@ -368,7 +385,7 @@ Cypress.Commands.add('waitStatusActiveByRefresh', () => {
|
|||||||
const noLengthCallback = () => {
|
const noLengthCallback = () => {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log('not active', index);
|
console.log('not active', index);
|
||||||
cy.freshTable();
|
cy.refreshTable();
|
||||||
index += 1;
|
index += 1;
|
||||||
cy.wait(5000);
|
cy.wait(5000);
|
||||||
cy.getStatusLength(
|
cy.getStatusLength(
|
||||||
@ -422,10 +439,10 @@ Cypress.Commands.add('waitStatusGreen', (index) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('freshTable', () => {
|
Cypress.Commands.add('refreshTable', () => {
|
||||||
// eslint-disable-next-line no-console
|
// eslint-disable-next-line no-console
|
||||||
console.log('fresh table');
|
console.log('fresh table');
|
||||||
cy.clickHeaderButton(0).waitTableLoading();
|
cy.clickHeaderTableButton(0).waitTableLoading();
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('collapseItemClick', (name) => {
|
Cypress.Commands.add('collapseItemClick', (name) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user