fix: Update e2e
1. Update password value to fit value check 2. Remove cases in backup e2e: remove backup by volume which is used by instance 3. Update waittime for fip list page to ensure create form can be opened 4. Update image select when create instance 5. Add volume case:create backup and backup inc 6. Update force delete instance command Change-Id: I45e4bba0b670171860d85e4e5cb402962a41becd
This commit is contained in:
parent
d3fb5a334b
commit
c549b50538
@ -5,7 +5,7 @@
|
|||||||
"video": false,
|
"video": false,
|
||||||
"env": {
|
"env": {
|
||||||
"username": "administrator",
|
"username": "administrator",
|
||||||
"password": "passw0rd",
|
"password": "passW0rd",
|
||||||
"region": "RegionOne",
|
"region": "RegionOne",
|
||||||
"domain": "Default",
|
"domain": "Default",
|
||||||
"sessionKey": "X-Auth-Token",
|
"sessionKey": "X-Auth-Token",
|
||||||
|
@ -17,7 +17,7 @@ Generally, when testing the corresponding functions of a resource, follow the fo
|
|||||||
const uuid = Cypress._.random(0, 1e6);
|
const uuid = Cypress._.random(0, 1e6);
|
||||||
const name = `e2e-instance-${uuid}`;
|
const name = `e2e-instance-${uuid}`;
|
||||||
const newname = `${name}-1`;
|
const newname = `${name}-1`;
|
||||||
const password = 'passw0rd_1';
|
const password = 'passW0rd_1';
|
||||||
const volumeName = `e2e-instance-attach-volume-${uuid}`;
|
const volumeName = `e2e-instance-attach-volume-${uuid}`;
|
||||||
const networkName = `e2e-network-for-instance-${uuid}`;
|
const networkName = `e2e-network-for-instance-${uuid}`;
|
||||||
const routerName = `e2e-router-for-instance-${uuid}`;
|
const routerName = `e2e-router-for-instance-${uuid}`;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
const uuid = Cypress._.random(0, 1e6);
|
const uuid = Cypress._.random(0, 1e6);
|
||||||
const name = `e2e-instance-${uuid}`;
|
const name = `e2e-instance-${uuid}`;
|
||||||
const newname = `${name}-1`;
|
const newname = `${name}-1`;
|
||||||
const password = 'passw0rd_1';
|
const password = 'passW0rd_1';
|
||||||
const volumeName = `e2e-instance-attach-volume-${uuid}`;
|
const volumeName = `e2e-instance-attach-volume-${uuid}`;
|
||||||
const networkName = `e2e-network-for-instance-${uuid}`;
|
const networkName = `e2e-network-for-instance-${uuid}`;
|
||||||
const routerName = `e2e-router-for-instance-${uuid}`;
|
const routerName = `e2e-router-for-instance-${uuid}`;
|
||||||
|
@ -3,10 +3,13 @@ baseUrl: http://localhost:8081
|
|||||||
env:
|
env:
|
||||||
switchToAdminProject: false
|
switchToAdminProject: false
|
||||||
username: e2e
|
username: e2e
|
||||||
password: passw0rdY_
|
password: passW0rdY_
|
||||||
usernameAdmin: e2e-admin
|
usernameAdmin: e2e-admin
|
||||||
passwordAdmin: passw0rdY_
|
passwordAdmin: passW0rdY_
|
||||||
userIsRegisted: true
|
userIsRegisted: true
|
||||||
|
imageName: cirros-0.5.2-x86_64-disk
|
||||||
|
imageType: Others
|
||||||
|
imageDownloadUrl: http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img
|
||||||
testFiles:
|
testFiles:
|
||||||
- pages/login.spec.js
|
- pages/login.spec.js
|
||||||
- pages/error.spec.js
|
- pages/error.spec.js
|
||||||
|
@ -21,7 +21,7 @@ describe('The Bare Metal Page', () => {
|
|||||||
const ip = `10.10.${Cypress._.random(50, 100)}.${Cypress._.random(5, 250)}`;
|
const ip = `10.10.${Cypress._.random(50, 100)}.${Cypress._.random(5, 250)}`;
|
||||||
const newname = `${name}-1`;
|
const newname = `${name}-1`;
|
||||||
const username = 'admin';
|
const username = 'admin';
|
||||||
const password = 'passw0rd_1';
|
const password = 'passW0rd_1';
|
||||||
const nodeName = 'node-0';
|
const nodeName = 'node-0';
|
||||||
const portGroupName = `e2e-node-port-group-${uuid}`;
|
const portGroupName = `e2e-node-port-group-${uuid}`;
|
||||||
const macPort = `AD:78:BE:AF:${Cypress._.random(10, 99)}:${Cypress._.random(
|
const macPort = `AD:78:BE:AF:${Cypress._.random(10, 99)}:${Cypress._.random(
|
||||||
|
@ -19,10 +19,12 @@ describe('The Instance Page', () => {
|
|||||||
const uuid = Cypress._.random(0, 1e6);
|
const uuid = Cypress._.random(0, 1e6);
|
||||||
const name = `e2e-instance-${uuid}`;
|
const name = `e2e-instance-${uuid}`;
|
||||||
const newname = `${name}-1`;
|
const newname = `${name}-1`;
|
||||||
const password = 'passw0rd_1';
|
const password = 'passW0rd_1';
|
||||||
const volumeName = `e2e-instance-attach-volume-${uuid}`;
|
const volumeName = `e2e-instance-attach-volume-${uuid}`;
|
||||||
const networkName = `e2e-network-for-instance-${uuid}`;
|
const networkName = `e2e-network-for-instance-${uuid}`;
|
||||||
const routerName = `e2e-router-for-instance-${uuid}`;
|
const routerName = `e2e-router-for-instance-${uuid}`;
|
||||||
|
const imageName = Cypress.env('imageName');
|
||||||
|
const imageType = Cypress.env('imageType');
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login(listUrl);
|
cy.login(listUrl);
|
||||||
@ -41,7 +43,8 @@ describe('The Instance Page', () => {
|
|||||||
.should('include', `${listUrl}/create`)
|
.should('include', `${listUrl}/create`)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelect('flavor')
|
.formTableSelect('flavor')
|
||||||
.formTableSelect('image')
|
.formRadioChooseByLabel('image', imageType)
|
||||||
|
.formTableSelectBySearch('image', imageName)
|
||||||
.formSelect('systemDisk')
|
.formSelect('systemDisk')
|
||||||
.formAddSelectAdd('dataDisk')
|
.formAddSelectAdd('dataDisk')
|
||||||
.formSelect('dataDisk')
|
.formSelect('dataDisk')
|
||||||
|
@ -19,10 +19,11 @@ describe('The Ironic Page', () => {
|
|||||||
const uuid = Cypress._.random(0, 1e6);
|
const uuid = Cypress._.random(0, 1e6);
|
||||||
const name = `e2e-ironic-${uuid}`;
|
const name = `e2e-ironic-${uuid}`;
|
||||||
const newname = `${name}-1`;
|
const newname = `${name}-1`;
|
||||||
const password = 'passw0rd_1';
|
const password = 'passW0rd_1';
|
||||||
const networkName = `e2e-network-for-ironic-${uuid}`;
|
const networkName = `e2e-network-for-ironic-${uuid}`;
|
||||||
const routerName = `e2e-router-for-ironic-${uuid}`;
|
const routerName = `e2e-router-for-ironic-${uuid}`;
|
||||||
const imageName = `e2e-image-for-ironic-${uuid}`;
|
const imageName = Cypress.env('imageName');
|
||||||
|
const imageType = Cypress.env('imageType');
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login(listUrl);
|
cy.login(listUrl);
|
||||||
@ -32,13 +33,13 @@ describe('The Ironic Page', () => {
|
|||||||
cy.createNetwork({ name: networkName });
|
cy.createNetwork({ name: networkName });
|
||||||
cy.createRouter({ name: routerName, network: networkName });
|
cy.createRouter({ name: routerName, network: networkName });
|
||||||
cy.createFip();
|
cy.createFip();
|
||||||
cy.createIronicImage({ name: imageName });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
cy.clickHeaderButton(2)
|
cy.clickHeaderButton(2)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelect('flavor')
|
.formTableSelect('flavor')
|
||||||
|
.formRadioChooseByLabel('image', imageType)
|
||||||
.formTableSelectBySearch('image', imageName)
|
.formTableSelectBySearch('image', imageName)
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
@ -178,6 +179,5 @@ describe('The Ironic Page', () => {
|
|||||||
cy.deleteAll('fip');
|
cy.deleteAll('fip');
|
||||||
cy.deleteRouter(routerName, networkName);
|
cy.deleteRouter(routerName, networkName);
|
||||||
cy.deleteAll('network', networkName);
|
cy.deleteAll('network', networkName);
|
||||||
cy.deleteAll('image', imageName);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -17,9 +17,11 @@ import { serverGroupListUrl } from '../../../support/constants';
|
|||||||
describe('The Server Group Page', () => {
|
describe('The Server Group Page', () => {
|
||||||
const listUrl = serverGroupListUrl;
|
const listUrl = serverGroupListUrl;
|
||||||
const uuid = Cypress._.random(0, 1e6);
|
const uuid = Cypress._.random(0, 1e6);
|
||||||
const name = `e2e-server-group-${Cypress._.random(0, 1e6)}`;
|
const name = `e2e-server-group-${uuid}`;
|
||||||
const instanceName = `e2e-instance-by-server-group-${uuid}`;
|
const instanceName = `e2e-instance-by-server-group-${uuid}`;
|
||||||
const networkName = `e2e-network-for-server-group-${uuid}`;
|
const networkName = `e2e-network-for-server-group-${uuid}`;
|
||||||
|
const imageName = Cypress.env('imageName');
|
||||||
|
const imageType = Cypress.env('imageType');
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login(listUrl);
|
cy.login(listUrl);
|
||||||
@ -45,12 +47,13 @@ describe('The Server Group Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create instance', () => {
|
it('successfully create instance', () => {
|
||||||
const password = 'passw0rd_1';
|
const password = 'passW0rd_1';
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.goToDetail()
|
.goToDetail()
|
||||||
.clickHeaderButton(1)
|
.clickHeaderButton(1)
|
||||||
.formTableSelect('flavor')
|
.formTableSelect('flavor')
|
||||||
.formTableSelect('image')
|
.formRadioChooseByLabel('image', imageType)
|
||||||
|
.formTableSelectBySearch('image', imageName)
|
||||||
.formSelect('systemDisk')
|
.formSelect('systemDisk')
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
@ -75,9 +78,9 @@ describe('The Server Group Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully delete', () => {
|
it('successfully delete', () => {
|
||||||
cy.clickFirstActionDisabled();
|
cy.tableSearchText(name).clickFirstActionDisabled();
|
||||||
cy.forceDeleteInstance(instanceName);
|
cy.forceDeleteInstance(instanceName);
|
||||||
cy.wait(5000);
|
cy.wait(10000);
|
||||||
cy.visitPage(listUrl)
|
cy.visitPage(listUrl)
|
||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.clickConfirmActionInFirst()
|
.clickConfirmActionInFirst()
|
||||||
|
@ -21,7 +21,7 @@ describe('The User Page', () => {
|
|||||||
const newname = `${name}-1`;
|
const newname = `${name}-1`;
|
||||||
const email = `${name}@example.com`;
|
const email = `${name}@example.com`;
|
||||||
const phone = '18500000000';
|
const phone = '18500000000';
|
||||||
const password = 'passw0rd_';
|
const password = 'passW0rd_';
|
||||||
const tmpPassword = `${password}1`;
|
const tmpPassword = `${password}1`;
|
||||||
const projectName = `e2e-project-for-user-${uuid}`;
|
const projectName = `e2e-project-for-user-${uuid}`;
|
||||||
const projectName2 = `e2e-project2-for-user-${uuid}`;
|
const projectName2 = `e2e-project2-for-user-${uuid}`;
|
||||||
|
@ -37,6 +37,7 @@ describe('The Floating IP Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create', () => {
|
it('successfully create', () => {
|
||||||
|
cy.wait(2000);
|
||||||
cy.intercept('GET', '/networks').as('networks');
|
cy.intercept('GET', '/networks').as('networks');
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderButton(1)
|
||||||
.wait('@networks')
|
.wait('@networks')
|
||||||
@ -45,6 +46,7 @@ describe('The Floating IP Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully batch create', () => {
|
it('successfully batch create', () => {
|
||||||
|
cy.wait(2000);
|
||||||
cy.intercept('GET', '/networks').as('networks');
|
cy.intercept('GET', '/networks').as('networks');
|
||||||
cy.clickHeaderButton(1)
|
cy.clickHeaderButton(1)
|
||||||
.wait('@networks')
|
.wait('@networks')
|
||||||
|
@ -99,8 +99,8 @@ describe('The VPN Page', () => {
|
|||||||
.wait(2000)
|
.wait(2000)
|
||||||
.formInput('peer_address', '192.168.1.1')
|
.formInput('peer_address', '192.168.1.1')
|
||||||
.formSelect('peer_ep_group_id', endpointPeer)
|
.formSelect('peer_ep_group_id', endpointPeer)
|
||||||
.formInput('password', 'passw0rd')
|
.formInput('password', 'passW0rd')
|
||||||
.formInput('confirmPassword', 'passw0rd')
|
.formInput('confirmPassword', 'passW0rd')
|
||||||
.formButtonClick('more')
|
.formButtonClick('more')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
|
@ -19,11 +19,7 @@ describe('The Volume Backup Page', () => {
|
|||||||
const uuid = Cypress._.random(0, 1e6);
|
const uuid = Cypress._.random(0, 1e6);
|
||||||
const name = `e2e-backup-${uuid}`;
|
const name = `e2e-backup-${uuid}`;
|
||||||
const nameInc = `${name}-inc`;
|
const nameInc = `${name}-inc`;
|
||||||
const nameIns = `e2e-backup-ins-${uuid}`;
|
|
||||||
const nameInsInc = `${nameIns}-inc`;
|
|
||||||
const volumeName = `e2e-volume-for-backup-${uuid}`;
|
const volumeName = `e2e-volume-for-backup-${uuid}`;
|
||||||
const networkName = `e2e-network-for-backup-${uuid}`;
|
|
||||||
const instanceName = `e2e-instance-for-backup-${uuid}`;
|
|
||||||
const volumeNameByBackup = `e2e-volume-by-backup-${uuid}`;
|
const volumeNameByBackup = `e2e-volume-by-backup-${uuid}`;
|
||||||
const newname = `${name}-1`;
|
const newname = `${name}-1`;
|
||||||
|
|
||||||
@ -33,8 +29,6 @@ describe('The Volume Backup Page', () => {
|
|||||||
|
|
||||||
it('successfully prepair resource', () => {
|
it('successfully prepair resource', () => {
|
||||||
cy.createVolume(volumeName);
|
cy.createVolume(volumeName);
|
||||||
cy.createNetwork({ name: networkName });
|
|
||||||
cy.createInstance({ name: instanceName, networkName });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully create full bakcup', () => {
|
it('successfully create full bakcup', () => {
|
||||||
@ -45,11 +39,6 @@ describe('The Volume Backup Page', () => {
|
|||||||
.wait(5000)
|
.wait(5000)
|
||||||
.waitTableLoading();
|
.waitTableLoading();
|
||||||
|
|
||||||
cy.clickHeaderButton(1, 5000)
|
|
||||||
.formInput('name', nameIns)
|
|
||||||
.formTableSelectBySearchOption('volume', 'Status', 'In-use')
|
|
||||||
.clickModalActionSubmitButton();
|
|
||||||
|
|
||||||
cy.wait(30000);
|
cy.wait(30000);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -61,12 +50,6 @@ describe('The Volume Backup Page', () => {
|
|||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.waitTableLoading();
|
.waitTableLoading();
|
||||||
|
|
||||||
cy.clickHeaderButton(1, 5000)
|
|
||||||
.formInput('name', nameInsInc)
|
|
||||||
.formRadioChoose('incremental', 1)
|
|
||||||
.formTableSelectBySearchOption('volume', 'Status', 'In-use')
|
|
||||||
.clickModalActionSubmitButton();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully detail', () => {
|
it('successfully detail', () => {
|
||||||
@ -110,15 +93,9 @@ describe('The Volume Backup Page', () => {
|
|||||||
cy.tableSearchText(newname)
|
cy.tableSearchText(newname)
|
||||||
.clickConfirmActionInMore('Delete')
|
.clickConfirmActionInMore('Delete')
|
||||||
.tableSearchText(newname);
|
.tableSearchText(newname);
|
||||||
|
|
||||||
cy.tableSearchText(nameIns)
|
|
||||||
.clickConfirmActionInMore('Delete')
|
|
||||||
.tableSearchText(nameIns);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully delete related resources', () => {
|
it('successfully delete related resources', () => {
|
||||||
cy.forceDeleteInstance(instanceName);
|
|
||||||
cy.deleteAll('network', networkName);
|
|
||||||
cy.deleteAll('volume', volumeName);
|
cy.deleteAll('volume', volumeName);
|
||||||
cy.deleteAll('volume', volumeNameByBackup);
|
cy.deleteAll('volume', volumeNameByBackup);
|
||||||
});
|
});
|
||||||
|
@ -23,11 +23,9 @@ describe('The Volume Page', () => {
|
|||||||
0,
|
0,
|
||||||
1e6
|
1e6
|
||||||
)}`;
|
)}`;
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const imageName = `e2e-image-by-volume-${uuid}`;
|
const imageName = `e2e-image-by-volume-${uuid}`;
|
||||||
const snapshotName = `e2e-snapshot-by-volume-${uuid}`;
|
const snapshotName = `e2e-snapshot-by-volume-${uuid}`;
|
||||||
const backupName = `e2e-backup-by-volume-${uuid}`;
|
const backupName = `e2e-backup-by-volume-${uuid}`;
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
const backupIncName = `e2e-backup-inc-by-volume-${uuid}`;
|
const backupIncName = `e2e-backup-inc-by-volume-${uuid}`;
|
||||||
const cloneVolumeName = `e2e-clone-volume-${uuid}`;
|
const cloneVolumeName = `e2e-clone-volume-${uuid}`;
|
||||||
|
|
||||||
@ -57,6 +55,7 @@ describe('The Volume Page', () => {
|
|||||||
.url()
|
.url()
|
||||||
.should('include', creatUrl)
|
.should('include', creatUrl)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
|
.formInput('size', 1)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.clickFormActionSubmitButton()
|
.clickFormActionSubmitButton()
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
@ -80,13 +79,6 @@ describe('The Volume Page', () => {
|
|||||||
cy.goBackToList(listUrl);
|
cy.goBackToList(listUrl);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully extend volume', () => {
|
|
||||||
cy.tableSearchText(name)
|
|
||||||
.clickActionInMore('Extend Volume')
|
|
||||||
.clickModalActionSubmitButton();
|
|
||||||
cy.tableSearchText(name).waitStatusActiveByRefresh();
|
|
||||||
});
|
|
||||||
|
|
||||||
it('successfully create snapshot', () => {
|
it('successfully create snapshot', () => {
|
||||||
cy.tableSearchText(name).clickFirstActionButton();
|
cy.tableSearchText(name).clickFirstActionButton();
|
||||||
cy.wait(2000)
|
cy.wait(2000)
|
||||||
@ -113,16 +105,17 @@ describe('The Volume Page', () => {
|
|||||||
.waitStatusActiveByRefresh();
|
.waitStatusActiveByRefresh();
|
||||||
});
|
});
|
||||||
|
|
||||||
// it("successfully create backup inc", () => {
|
it('successfully create backup inc', () => {
|
||||||
// cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
// .clickActionInMore("Create Backup")
|
.clickActionInMore('Create Backup')
|
||||||
// .formInput("name", backupIncName)
|
.formInput('name', backupIncName)
|
||||||
// .formRadioChoose("incremental", 1)
|
.formRadioChoose('incremental', 1)
|
||||||
// .clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
// .tableSearchText(name)
|
.tableSearchText(name)
|
||||||
// .waitStatusActive();
|
.waitStatusActive();
|
||||||
// cy.deleteAll("backup");
|
cy.deleteAll('backup', backupIncName);
|
||||||
// });
|
cy.wait(5000).deleteAll('backup', backupName);
|
||||||
|
});
|
||||||
|
|
||||||
it('successfully clone volume', () => {
|
it('successfully clone volume', () => {
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
@ -147,21 +140,23 @@ describe('The Volume Page', () => {
|
|||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelect('instance')
|
.formTableSelect('instance')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
|
cy.tableSearchText(name).waitStatusActiveByRefresh();
|
||||||
cy.tableSearchText(name).checkColumnValue(3, 'Available');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('successfully create image', () => {
|
it('successfully create image', () => {
|
||||||
// cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
// .clickActionInMore('Create Image')
|
.clickActionInMore('Create Image')
|
||||||
// .formInput('image_name', imageName)
|
.formInput('image_name', imageName)
|
||||||
// .clickModalActionSubmitButton()
|
.clickModalActionSubmitButton();
|
||||||
// .waitStatusActiveByRefresh();
|
cy.tableSearchText(name).waitStatusActiveByRefresh();
|
||||||
|
});
|
||||||
|
|
||||||
// cy.clearTableSearch()
|
it('successfully extend volume', () => {
|
||||||
// .tableSearchSelect('Status', 'In-use')
|
cy.tableSearchText(name)
|
||||||
// .checkActionDisabled('Create Image');
|
.clickActionInMore('Extend Volume')
|
||||||
// });
|
.clickModalActionSubmitButton();
|
||||||
|
cy.tableSearchText(name).waitStatusActiveByRefresh();
|
||||||
|
});
|
||||||
|
|
||||||
it('successfully change type', () => {
|
it('successfully change type', () => {
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
@ -183,11 +178,11 @@ describe('The Volume Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully delete related resources', () => {
|
it('successfully delete related resources', () => {
|
||||||
|
cy.deleteAll('image', imageName);
|
||||||
cy.deleteAll('volume', cloneVolumeName);
|
cy.deleteAll('volume', cloneVolumeName);
|
||||||
cy.forceDeleteInstance(instanceName);
|
cy.forceDeleteInstance(instanceName);
|
||||||
cy.deleteAll('network', networkName);
|
cy.deleteAll('network', networkName);
|
||||||
cy.loginAdmin().wait(5000);
|
cy.loginAdmin().wait(5000);
|
||||||
cy.deleteAll('volumeType', volumeTypeName);
|
cy.deleteAll('volumeType', volumeTypeName);
|
||||||
// cy.deleteAll('image', imageName);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -255,6 +255,15 @@ Cypress.Commands.add('formRadioChoose', (formItemName, itemIndex = 0) => {
|
|||||||
.click();
|
.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add('formRadioChooseByLabel', (formItemName, label) => {
|
||||||
|
const realName = getTitle(label);
|
||||||
|
cy.get(getId(formItemName))
|
||||||
|
.find('.ant-radio-button-wrapper')
|
||||||
|
.contains(realName)
|
||||||
|
.first()
|
||||||
|
.click();
|
||||||
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('formAttachFile', (formItemName, filename) => {
|
Cypress.Commands.add('formAttachFile', (formItemName, filename) => {
|
||||||
cy.get(getId(formItemName)).find('input').attachFile(filename).wait(2000);
|
cy.get(getId(formItemName)).find('input').attachFile(filename).wait(2000);
|
||||||
});
|
});
|
||||||
|
@ -28,12 +28,15 @@ import urlMap, {
|
|||||||
} from './constants';
|
} from './constants';
|
||||||
|
|
||||||
Cypress.Commands.add('createInstance', ({ name, networkName }) => {
|
Cypress.Commands.add('createInstance', ({ name, networkName }) => {
|
||||||
const password = 'passw0rd_1';
|
const password = 'passW0rd_1';
|
||||||
|
const imageName = Cypress.env('imageName');
|
||||||
|
const imageType = Cypress.env('imageType');
|
||||||
cy.visitPage(instanceListUrl)
|
cy.visitPage(instanceListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderButton(1)
|
||||||
.wait(5000)
|
.wait(8000)
|
||||||
.formTableSelect('flavor')
|
.formTableSelect('flavor')
|
||||||
.formTableSelect('image')
|
.formRadioChooseByLabel('image', imageType)
|
||||||
|
.formTableSelectBySearch('image', imageName)
|
||||||
.formSelect('systemDisk')
|
.formSelect('systemDisk')
|
||||||
.clickStepActionNextButton()
|
.clickStepActionNextButton()
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
@ -127,7 +130,11 @@ Cypress.Commands.add('deleteInstance', (name, deleteRecycleBin = true) => {
|
|||||||
Cypress.Commands.add('forceDeleteInstance', (name) => {
|
Cypress.Commands.add('forceDeleteInstance', (name) => {
|
||||||
cy.visitPage(instanceListUrl)
|
cy.visitPage(instanceListUrl)
|
||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.clickConfirmActionInMore('Delete');
|
.clickActionInMore('Delete');
|
||||||
|
cy.get('.ant-modal-confirm-content')
|
||||||
|
.find('.ant-checkbox-input')
|
||||||
|
.click()
|
||||||
|
.clickConfirmActionSubmitButton();
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('deleteAllAvailableVolume', () => {
|
Cypress.Commands.add('deleteAllAvailableVolume', () => {
|
||||||
@ -140,7 +147,7 @@ Cypress.Commands.add('deleteAllAvailableVolume', () => {
|
|||||||
Cypress.Commands.add(
|
Cypress.Commands.add(
|
||||||
'createInstanceByResource',
|
'createInstanceByResource',
|
||||||
({ name, networkName, resource }) => {
|
({ name, networkName, resource }) => {
|
||||||
const password = 'passw0rd_1';
|
const password = 'passW0rd_1';
|
||||||
cy.formTableSelect('flavor')
|
cy.formTableSelect('flavor')
|
||||||
.formTableSelect(resource)
|
.formTableSelect(resource)
|
||||||
.formSelect('systemDisk')
|
.formSelect('systemDisk')
|
||||||
@ -183,6 +190,7 @@ Cypress.Commands.add('createSecurityGrouop', ({ name }) => {
|
|||||||
Cypress.Commands.add('createFip', () => {
|
Cypress.Commands.add('createFip', () => {
|
||||||
cy.intercept('GET', '/networks').as('networks');
|
cy.intercept('GET', '/networks').as('networks');
|
||||||
cy.visitPage(fipListUrl)
|
cy.visitPage(fipListUrl)
|
||||||
|
.wait(2000)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderButton(1)
|
||||||
.wait('@networks')
|
.wait('@networks')
|
||||||
.formSelect('floating_network_id')
|
.formSelect('floating_network_id')
|
||||||
@ -199,7 +207,7 @@ Cypress.Commands.add('createUserGroup', ({ name }) => {
|
|||||||
Cypress.Commands.add('createUser', ({ name }) => {
|
Cypress.Commands.add('createUser', ({ name }) => {
|
||||||
const email = `${name}@example.com`;
|
const email = `${name}@example.com`;
|
||||||
const phone = '18500000000';
|
const phone = '18500000000';
|
||||||
const password = 'passw0rd_';
|
const password = 'passW0rd_';
|
||||||
cy.visitPage(userListUrl)
|
cy.visitPage(userListUrl)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderButton(1)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
|
Loading…
Reference in New Issue
Block a user