test: Update e2e test according to service enabled

1. Add extenstions in config.yaml to support skip e2e case when service is disabled
2. Support compute, storage, network, other(identity, heat, configuration) config files to runthe corresponding cases

Change-Id: I310f4481d083319221045708cf5b311d51802b8c
This commit is contained in:
Jingwei.Zhang 2021-09-30 12:34:48 +08:00
parent 7f273e41c1
commit 69bae6f166
18 changed files with 1323 additions and 1062 deletions

View File

@ -97,6 +97,7 @@
"@babel/preset-env": "^7.14.2", "@babel/preset-env": "^7.14.2",
"@babel/preset-react": "^7.13.13", "@babel/preset-react": "^7.13.13",
"@cypress/code-coverage": "^3.9.5", "@cypress/code-coverage": "^3.9.5",
"@cypress/skip-test": "^2.6.1",
"autoprefixer": "^9.3.1", "autoprefixer": "^9.3.1",
"babel-eslint": "^9.0.0", "babel-eslint": "^9.0.0",
"babel-jest": "^26.6.3", "babel-jest": "^26.6.3",

View File

@ -0,0 +1,27 @@
# For the use case configuration under the compute menu
covarage: true
baseUrl: http://localhost:8081
env:
switchToAdminProject: false
username: e2e
password: passW0rdY_
usernameAdmin: e2e-admin
passwordAdmin: passW0rdY_
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
imageCanChangePassword: false
extensions:
- ironic
testFiles:
# compute
- pages/compute/image.spec.js
- pages/compute/flavor.spec.js
- pages/compute/server-group.spec.js
- pages/compute/keypair.spec.js
- pages/compute/instance.spec.js
- pages/compute/ironic.spec.js
- pages/compute/aggregate.spec.js
- pages/compute/hypervisor.spec.js
- pages/compute/baremetal.spec.js

View File

@ -0,0 +1,30 @@
# For the use case configuration under the network menu
covarage: true
baseUrl: http://localhost:8081
env:
switchToAdminProject: false
username: e2e
password: passW0rdY_
usernameAdmin: e2e-admin
passwordAdmin: passW0rdY_
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
imageCanChangePassword: false
extensions:
- neutron::qos
- neutron::vpn
- neutron::port-forwarding
- octavia
testFiles:
# network
- pages/network/router.spec.js
- pages/network/network.spec.js
- pages/network/virtual-adapter.spec.js
- pages/network/qos-policy.spec.js
- pages/network/floatingip.spec.js
- pages/network/security-group.spec.js
- pages/network/vpn.spec.js
- pages/network/lb.spec.js
- pages/network/topology.spec.js

View File

@ -0,0 +1,31 @@
# For the use case configuration under the identity, configuration, heat menu
covarage: true
baseUrl: http://localhost:8081
env:
switchToAdminProject: false
username: e2e
password: passW0rdY_
usernameAdmin: e2e-admin
passwordAdmin: passW0rdY_
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
imageCanChangePassword: false
extensions:
- heat
testFiles:
- pages/login.spec.js
- pages/error.spec.js
# identity
- pages/identity/role.spec.js
- pages/identity/domain.spec.js
- pages/identity/user.spec.js
- pages/identity/project.spec.js
- pages/identity/user-group.spec.js
# configuration
- pages/configuration/metadata.spec.js
- pages/configuration/system.spec.js
- pages/configuration/setting.spec.js
# heat
- pages/heat/stack.spec.js

View File

@ -0,0 +1,24 @@
# For the use case configuration under the storage menu
covarage: true
baseUrl: http://localhost:8081
env:
switchToAdminProject: false
username: e2e
password: passW0rdY_
usernameAdmin: e2e-admin
passwordAdmin: passW0rdY_
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
imageCanChangePassword: false
extensions:
- cinder::buckup
testFiles:
# storage
- pages/storage/qos.spec.js
- pages/storage/volume-type.spec.js
- pages/storage/volume.spec.js
- pages/storage/backup.spec.js
- pages/storage/snapshot.spec.js
- pages/storage/storage.spec.js

View File

@ -11,20 +11,31 @@ env:
imageType: Others imageType: Others
imageDownloadUrl: http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img imageDownloadUrl: http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img
imageCanChangePassword: false imageCanChangePassword: false
extensions:
- cinder::buckup
- neutron::qos
- neutron::vpn
- neutron::port-forwarding
- octavia
- heat
- ironic
testFiles: testFiles:
- pages/login.spec.js - pages/login.spec.js
- pages/error.spec.js - pages/error.spec.js
# identity
- pages/identity/role.spec.js - pages/identity/role.spec.js
- pages/identity/domain.spec.js - pages/identity/domain.spec.js
- pages/identity/user.spec.js - pages/identity/user.spec.js
- pages/identity/project.spec.js - pages/identity/project.spec.js
- pages/identity/user-group.spec.js - pages/identity/user-group.spec.js
# storage
- pages/storage/qos.spec.js - pages/storage/qos.spec.js
- pages/storage/volume-type.spec.js - pages/storage/volume-type.spec.js
- pages/storage/volume.spec.js - pages/storage/volume.spec.js
- pages/storage/backup.spec.js - pages/storage/backup.spec.js
- pages/storage/snapshot.spec.js - pages/storage/snapshot.spec.js
- pages/storage/storage.spec.js - pages/storage/storage.spec.js
# network
- pages/network/router.spec.js - pages/network/router.spec.js
- pages/network/network.spec.js - pages/network/network.spec.js
- pages/network/virtual-adapter.spec.js - pages/network/virtual-adapter.spec.js
@ -34,6 +45,7 @@ testFiles:
- pages/network/vpn.spec.js - pages/network/vpn.spec.js
- pages/network/lb.spec.js - pages/network/lb.spec.js
- pages/network/topology.spec.js - pages/network/topology.spec.js
# compute
- pages/compute/image.spec.js - pages/compute/image.spec.js
- pages/compute/flavor.spec.js - pages/compute/flavor.spec.js
- pages/compute/server-group.spec.js - pages/compute/server-group.spec.js
@ -44,8 +56,9 @@ testFiles:
- pages/compute/hypervisor.spec.js - pages/compute/hypervisor.spec.js
- pages/compute/baremetal.spec.js - pages/compute/baremetal.spec.js
# - pages/management/recycle-bin.spec.js # - pages/management/recycle-bin.spec.js
# configuration
- pages/configuration/metadata.spec.js - pages/configuration/metadata.spec.js
- pages/configuration/system.spec.js - pages/configuration/system.spec.js
- pages/configuration/setting.spec.js - pages/configuration/setting.spec.js
# heat
- pages/heat/stack.spec.js - pages/heat/stack.spec.js

View File

@ -12,189 +12,204 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { bareMetalListUrl } from '../../../support/constants'; import { bareMetalListUrl } from '../../../support/constants';
describe('The Bare Metal Page', () => { const ironicServiceEnabled = (Cypress.env('extensions') || []).includes(
const listUrl = bareMetalListUrl; 'ironic'
const uuid = Cypress._.random(0, 1e6); );
const name = `e2e-node-${uuid}`;
const ip = `10.10.${Cypress._.random(50, 100)}.${Cypress._.random(5, 250)}`;
const newname = `${name}-1`;
const username = 'admin';
const password = 'passW0rd_1';
const nodeName = 'node-0';
const portGroupName = `e2e-node-port-group-${uuid}`;
const macPort = `AD:78:BE:AF:${Cypress._.random(10, 99)}:${Cypress._.random(
10,
99
)}`;
const macPortGroup = `B1:F1:2D:A8:${Cypress._.random(
10,
99
)}:${Cypress._.random(10, 99)}`;
const macPort2 = `AD:78:BE:AF:${Cypress._.random(10, 99)}:${Cypress._.random(
10,
99
)}`;
const macPortGroup2 = `B1:F1:2D:A8:${Cypress._.random(
10,
99
)}:${Cypress._.random(10, 99)}`;
beforeEach(() => { onlyOn(!ironicServiceEnabled, () => {
cy.loginAdmin(listUrl); describe('Skip The Bare Metal Page', () => {
}); it('successfully skip', () => {});
});
it('successfully create', () => { });
cy.clickHeaderButton(1)
.wait(2000) describe('The Bare Metal Page', () => {
.formInput('name', name) onlyOn(ironicServiceEnabled, () => {
.formSelect('driver') const listUrl = bareMetalListUrl;
.clickStepActionNextButton() const uuid = Cypress._.random(0, 1e6);
.wait(2000) const name = `e2e-node-${uuid}`;
.formSelect('driver_info_deploy_kernel') const ip = `10.10.${Cypress._.random(50, 100)}.${Cypress._.random(5, 250)}`;
.formSelect('driver_info_deploy_ramdisk') const newname = `${name}-1`;
.formInput('driver_info_ipmi_address', ip) const username = 'admin';
.formInput('driver_info_ipmi_username', username) const password = 'passW0rd_1';
.formInput('driver_info_ipmi_password', password) const nodeName = 'node-0';
.clickStepActionNextButton() const portGroupName = `e2e-node-port-group-${uuid}`;
.wait(2000) const macPort = `AD:78:BE:AF:${Cypress._.random(10, 99)}:${Cypress._.random(
.clickStepActionNextButton() 10,
.waitFormLoading() 99
.url() )}`;
.should('include', listUrl) const macPortGroup = `B1:F1:2D:A8:${Cypress._.random(
.closeNotice(); 10,
}); 99
)}:${Cypress._.random(10, 99)}`;
it('successfully detail', () => { const macPort2 = `AD:78:BE:AF:${Cypress._.random(
cy.tableSimpleSearchText(nodeName) 10,
.checkTableFirstRow(nodeName) 99
.goToDetail(); )}:${Cypress._.random(10, 99)}`;
cy.checkDetailName(nodeName); const macPortGroup2 = `B1:F1:2D:A8:${Cypress._.random(
cy.clickDetailTab('Ports', 'ports').clickDetailTab( 10,
'Port Groups', 99
'portGroups' )}:${Cypress._.random(10, 99)}`;
);
cy.goBackToList(listUrl); beforeEach(() => {
}); cy.loginAdmin(listUrl);
});
it('successfully power on', () => {
cy.tableSimpleSearchText('power off') it('successfully create', () => {
.wait(2000) cy.clickHeaderButton(1)
.clickConfirmActionInMore('Power On') .wait(2000)
.wait(10000) .formInput('name', name)
.waitStatusActiveByRefresh(); .formSelect('driver')
}); .clickStepActionNextButton()
.wait(2000)
it('successfully power off', () => { .formSelect('driver_info_deploy_kernel')
cy.tableSimpleSearchText('power on') .formSelect('driver_info_deploy_ramdisk')
.wait(2000) .formInput('driver_info_ipmi_address', ip)
.clickConfirmActionInMore('Power Off') .formInput('driver_info_ipmi_username', username)
.wait(10000); .formInput('driver_info_ipmi_password', password)
}); .clickStepActionNextButton()
.wait(2000)
it('successfully auto inspect', () => { .clickStepActionNextButton()
cy.tableSimpleSearchText(nodeName).clickConfirmActionInMore('Auto Inspect'); .waitFormLoading()
}); .url()
.should('include', listUrl)
it('successfully enter maintenace mode', () => { .closeNotice();
cy.tableSimpleSearchText(nodeName) });
.clickActionInMore('Enter Maintenance Mode')
.formText('reason', 'Enter Maintenance Mode') it('successfully detail', () => {
.clickModalActionSubmitButton() cy.tableSimpleSearchText(nodeName)
.wait(10000); .checkTableFirstRow(nodeName)
}); .goToDetail();
cy.checkDetailName(nodeName);
it('successfully leave maintenace mode', () => { cy.clickDetailTab('Ports', 'ports').clickDetailTab(
cy.tableSimpleSearchText(nodeName).clickConfirmActionInMore( 'Port Groups',
'Leave Maintenance Mode' 'portGroups'
); );
}); cy.goBackToList(listUrl);
});
it('successfully set boot device', () => {
cy.tableSimpleSearchText(nodeName) it('successfully power on', () => {
.clickActionInMore('Set Boot Device') cy.tableSimpleSearchText('power off')
.wait(5000) .wait(2000)
.formSelect('boot_device', 'pxe') .clickConfirmActionInMore('Power On')
.clickModalActionSubmitButton(); .wait(10000)
}); .waitStatusActiveByRefresh();
});
it('successfully create port group', () => {
cy.tableSimpleSearchText(name) it('successfully power off', () => {
.clickActionInMore('Create Port Group') cy.tableSimpleSearchText('power on')
.formInput('name', portGroupName) .wait(2000)
.formInput('address', macPortGroup) .clickConfirmActionInMore('Power Off')
.clickModalActionSubmitButton() .wait(10000);
.wait(60000); });
});
it('successfully auto inspect', () => {
it('successfully create port', () => { cy.tableSimpleSearchText(nodeName).clickConfirmActionInMore(
cy.tableSimpleSearchText(name) 'Auto Inspect'
.clickActionInMore('Create Port') );
.wait(5000) });
.formInput('address', macPort)
.clickModalActionSubmitButton() it('successfully enter maintenace mode', () => {
.wait(60000); cy.tableSimpleSearchText(nodeName)
}); .clickActionInMore('Enter Maintenance Mode')
.formText('reason', 'Enter Maintenance Mode')
it('successfully edit port', () => { .clickModalActionSubmitButton()
cy.tableSimpleSearchText(name) .wait(10000);
.goToDetail() });
.clickDetailTab('Ports')
.clickFirstActionButton() it('successfully leave maintenace mode', () => {
.formInput('address', macPort2) cy.tableSimpleSearchText(nodeName).clickConfirmActionInMore(
.clickModalActionSubmitButton() 'Leave Maintenance Mode'
.wait(60000); );
}); });
it('successfully delete port', () => { it('successfully set boot device', () => {
cy.tableSimpleSearchText(name) cy.tableSimpleSearchText(nodeName)
.goToDetail() .clickActionInMore('Set Boot Device')
.clickDetailTab('Ports') .wait(5000)
.clickConfirmActionButton('Delete') .formSelect('boot_device', 'pxe')
.wait(60000); .clickModalActionSubmitButton();
}); });
it('successfully edit port group', () => { it('successfully create port group', () => {
cy.tableSimpleSearchText(name) cy.tableSimpleSearchText(name)
.goToDetail() .clickActionInMore('Create Port Group')
.clickDetailTab('Port Groups') .formInput('name', portGroupName)
.clickFirstActionButton() .formInput('address', macPortGroup)
.formInput('address', macPortGroup2) .clickModalActionSubmitButton()
.clickModalActionSubmitButton() .wait(60000);
.wait(60000); });
});
it('successfully create port', () => {
it('successfully delete port group', () => { cy.tableSimpleSearchText(name)
cy.tableSimpleSearchText(name) .clickActionInMore('Create Port')
.goToDetail() .wait(5000)
.clickDetailTab('Port Groups') .formInput('address', macPort)
.clickConfirmActionButton('Delete') .clickModalActionSubmitButton()
.wait(60000); .wait(60000);
}); });
it('successfully edit', () => { it('successfully edit port', () => {
cy.tableSimpleSearchText(name) cy.tableSimpleSearchText(name)
.clickActionInMore('Edit') .goToDetail()
.wait(2000) .clickDetailTab('Ports')
.formInput('name', newname) .clickFirstActionButton()
.clickStepActionNextButton() .formInput('address', macPort2)
.wait(2000) .clickModalActionSubmitButton()
.clickStepActionNextButton() .wait(60000);
.wait(2000) });
.clickStepActionNextButton()
.waitFormLoading() it('successfully delete port', () => {
.wait(60000); cy.tableSimpleSearchText(name)
}); .goToDetail()
.clickDetailTab('Ports')
it('successfully delete', () => { .clickConfirmActionButton('Delete')
cy.tableSimpleSearchText(newname).clickConfirmActionInMore('Delete'); .wait(60000);
}); });
it('successfully manage state', () => { it('successfully edit port group', () => {
cy.tableSimpleSearchText(nodeName) cy.tableSimpleSearchText(name)
.clickFirstActionButton() .goToDetail()
.formSelect('target') .clickDetailTab('Port Groups')
.clickModalActionSubmitButton(); .clickFirstActionButton()
.formInput('address', macPortGroup2)
.clickModalActionSubmitButton()
.wait(60000);
});
it('successfully delete port group', () => {
cy.tableSimpleSearchText(name)
.goToDetail()
.clickDetailTab('Port Groups')
.clickConfirmActionButton('Delete')
.wait(60000);
});
it('successfully edit', () => {
cy.tableSimpleSearchText(name)
.clickActionInMore('Edit')
.wait(2000)
.formInput('name', newname)
.clickStepActionNextButton()
.wait(2000)
.clickStepActionNextButton()
.wait(2000)
.clickStepActionNextButton()
.waitFormLoading()
.wait(60000);
});
it('successfully delete', () => {
cy.tableSimpleSearchText(newname).clickConfirmActionInMore('Delete');
});
it('successfully manage state', () => {
cy.tableSimpleSearchText(nodeName)
.clickFirstActionButton()
.formSelect('target')
.clickModalActionSubmitButton();
});
}); });
}); });

View File

@ -12,178 +12,191 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { instanceListUrl } from '../../../support/constants'; import { instanceListUrl } from '../../../support/constants';
describe('The Ironic Page', () => { const ironicServiceEnabled = (Cypress.env('extensions') || []).includes(
const listUrl = instanceListUrl; 'ironic'
const uuid = Cypress._.random(0, 1e6); );
const name = `e2e-ironic-${uuid}`;
const newname = `${name}-1`;
const password = 'passW0rd_1';
const flavorName = `e2e-flavor-for-ironic-${uuid}`;
const networkName = `e2e-network-for-ironic-${uuid}`;
const routerName = `e2e-router-for-ironic-${uuid}`;
const imageName = Cypress.env('imageName');
const imageType = Cypress.env('imageType');
beforeEach(() => { onlyOn(!ironicServiceEnabled, () => {
cy.login(listUrl); describe('Skip The Ironic Page', () => {
}); it('successfully skip', () => {});
});
it('successfully prepair resource by admin', () => { });
cy.loginAdmin().createIronicFlavor(flavorName);
}); onlyOn(ironicServiceEnabled, () => {
describe('The Ironic Page', () => {
it('successfully prepair resource', () => { const listUrl = instanceListUrl;
cy.createNetwork({ name: networkName }); const uuid = Cypress._.random(0, 1e6);
cy.createRouter({ name: routerName, network: networkName }); const name = `e2e-ironic-${uuid}`;
cy.createFip(); const newname = `${name}-1`;
}); const password = 'passW0rd_1';
const flavorName = `e2e-flavor-for-ironic-${uuid}`;
it('successfully create', () => { const networkName = `e2e-network-for-ironic-${uuid}`;
cy.clickHeaderButton(2) const routerName = `e2e-router-for-ironic-${uuid}`;
.wait(5000) const imageName = Cypress.env('imageName');
.formTableSelect('flavor') const imageType = Cypress.env('imageType');
.formRadioChooseByLabel('image', imageType)
.formTableSelectBySearch('image', imageName) beforeEach(() => {
.clickStepActionNextButton() cy.login(listUrl);
.wait(5000) });
.formTableSelectBySearch('networkSelect', networkName)
.formTableSelectBySearch('securityGroup', 'default') it('successfully prepair resource by admin', () => {
.wait(2000) cy.loginAdmin().createIronicFlavor(flavorName);
.clickStepActionNextButton() });
.formInput('name', name)
.formRadioChoose('loginType', 1) it('successfully prepair resource', () => {
.formInput('password', password) cy.createNetwork({ name: networkName });
.formInput('confirmPassword', password) cy.createRouter({ name: routerName, network: networkName });
.wait(2000) cy.createFip();
.clickStepActionNextButton() });
.wait(2000)
.clickStepActionNextButton() it('successfully create', () => {
.waitFormLoading() cy.clickHeaderButton(2)
.url() .wait(5000)
.should('include', listUrl) .formTableSelect('flavor')
.closeNotice() .formRadioChooseByLabel('image', imageType)
.waitStatusActiveByRefresh(); .formTableSelectBySearch('image', imageName)
}); .clickStepActionNextButton()
.wait(5000)
it('successfully detail', () => { .formTableSelectBySearch('networkSelect', networkName)
cy.tableSearchText(name).checkTableFirstRow(name).goToDetail(); .formTableSelectBySearch('securityGroup', 'default')
cy.checkDetailName(name); .wait(2000)
cy.clickDetailTab('Interface', 'interface') .clickStepActionNextButton()
.clickDetailTab('Floating IPs', 'floatingIps') .formInput('name', name)
.clickDetailTab('Security Group', 'securityGroup'); .formRadioChoose('loginType', 1)
cy.goBackToList(listUrl); .formInput('password', password)
}); .formInput('confirmPassword', password)
.wait(2000)
it('successfully lock', () => { .clickStepActionNextButton()
cy.tableSearchText(name) .wait(2000)
.clickConfirmActionInMoreSub('Lock', 'Instance Status') .clickStepActionNextButton()
.wait(10000); .waitFormLoading()
}); .url()
.should('include', listUrl)
it('successfully unlock', () => { .closeNotice()
cy.tableSearchText(name) .waitStatusActiveByRefresh();
.clickConfirmActionInMoreSub('Unlock', 'Instance Status') });
.wait(10000);
}); it('successfully detail', () => {
cy.tableSearchText(name).checkTableFirstRow(name).goToDetail();
it('successfully stop', () => { cy.checkDetailName(name);
cy.tableSearchText(name) cy.clickDetailTab('Interface', 'interface')
.clickConfirmActionInMoreSub('Stop', 'Instance Status') .clickDetailTab('Floating IPs', 'floatingIps')
.wait(10000) .clickDetailTab('Security Group', 'securityGroup');
.tableSearchText(name) cy.goBackToList(listUrl);
.checkColumnValue(6, 'Shutoff') });
.selectFirst()
.clickHeaderButtonByTitle('Stop') it('successfully lock', () => {
.checkDisableAction(2000); cy.tableSearchText(name)
}); .clickConfirmActionInMoreSub('Lock', 'Instance Status')
.wait(10000);
it('successfully start', () => { });
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Start', 'Instance Status') it('successfully unlock', () => {
.waitStatusActive() cy.tableSearchText(name)
.checkColumnValue(6, 'Active') .clickConfirmActionInMoreSub('Unlock', 'Instance Status')
.selectFirst() .wait(10000);
.clickHeaderButtonByTitle('Start') });
.checkDisableAction(2000);
}); it('successfully stop', () => {
cy.tableSearchText(name)
it('successfully reboot', () => { .clickConfirmActionInMoreSub('Stop', 'Instance Status')
cy.tableSearchText(name) .wait(10000)
.clickConfirmActionInMoreSub('Reboot', 'Instance Status') .tableSearchText(name)
.tableSearchText(name) .checkColumnValue(6, 'Shutoff')
.waitStatusActiveByRefresh(); .selectFirst()
}); .clickHeaderButtonByTitle('Stop')
.checkDisableAction(2000);
it('successfully attach interface', () => { });
cy.tableSearchText(name)
.clickActionInMoreSub('Attach Interface', 'Related Resources') it('successfully start', () => {
.wait(5000) cy.tableSearchText(name)
.formTableSelect('network') .clickConfirmActionInMoreSub('Start', 'Instance Status')
.clickModalActionSubmitButton(); .waitStatusActive()
}); .checkColumnValue(6, 'Active')
.selectFirst()
it('successfully detach interface', () => { .clickHeaderButtonByTitle('Start')
cy.tableSearchText(name) .checkDisableAction(2000);
.clickActionInMoreSub('Detach Interface', 'Related Resources') });
.wait(5000)
.formTableSelect('interfaces') it('successfully reboot', () => {
.clickModalActionSubmitButton(); cy.tableSearchText(name)
}); .clickConfirmActionInMoreSub('Reboot', 'Instance Status')
.tableSearchText(name)
it('successfully associate floating IP', () => { .waitStatusActiveByRefresh();
cy.tableSearchText(name) });
.clickActionInMoreSub('Associate Floating IP', 'Related Resources')
.wait(5000) it('successfully attach interface', () => {
.formTableSelect('fixed_ip') cy.tableSearchText(name)
.wait(5000) .clickActionInMoreSub('Attach Interface', 'Related Resources')
.formTableSelect('fip') .wait(5000)
.clickModalActionCancelButton(); .formTableSelect('network')
}); .clickModalActionSubmitButton();
});
it('successfully disassociate floating ip', () => {
cy.tableSearchText(name) it('successfully detach interface', () => {
.clickActionInMoreSub('Disassociate Floating Ip', 'Related Resources') cy.tableSearchText(name)
.wait(5000) .clickActionInMoreSub('Detach Interface', 'Related Resources')
.formSelect('address') .wait(5000)
.clickModalActionCancelButton(); .formTableSelect('interfaces')
}); .clickModalActionSubmitButton();
});
it('successfully manage security group with cancel', () => {
cy.tableSearchText(name) it('successfully associate floating IP', () => {
.clickActionInMoreSub('Manage Security Group', 'Related Resources') cy.tableSearchText(name)
.wait(5000) .clickActionInMoreSub('Associate Floating IP', 'Related Resources')
.formTableSelect('port') .wait(5000)
.wait(5000) .formTableSelect('fixed_ip')
.clickModalActionCancelButton(); .wait(5000)
}); .formTableSelect('fip')
.clickModalActionCancelButton();
it('successfully rebuild ironic', () => { });
cy.tableSearchText(name)
.clickActionInMoreSub('Rebuild Instance', 'Configuration Update') it('successfully disassociate floating ip', () => {
.wait(5000) cy.tableSearchText(name)
.formTableSelect('image') .clickActionInMoreSub('Disassociate Floating Ip', 'Related Resources')
.clickModalActionSubmitButton() .wait(5000)
.waitStatusActiveByRefresh(); .formSelect('address')
}); .clickModalActionCancelButton();
});
it('successfully edit', () => {
cy.tableSearchText(name) it('successfully manage security group with cancel', () => {
.clickActionInMore('Edit') cy.tableSearchText(name)
.formInput('name', newname) .clickActionInMoreSub('Manage Security Group', 'Related Resources')
.clickModalActionSubmitButton() .wait(5000)
.wait(2000); .formTableSelect('port')
}); .wait(5000)
.clickModalActionCancelButton();
it('successfully delete', () => { });
cy.tableSearchText(name).clickConfirmActionInMore('Delete');
}); it('successfully rebuild ironic', () => {
cy.tableSearchText(name)
it('successfully delete related resources', () => { .clickActionInMoreSub('Rebuild Instance', 'Configuration Update')
cy.deleteAll('fip'); .wait(5000)
cy.deleteRouter(routerName, networkName); .formTableSelect('image')
cy.deleteAll('network', networkName); .clickModalActionSubmitButton()
cy.loginAdmin().deleteAll('flavor', flavorName, 'Bare Metal'); .waitStatusActiveByRefresh();
});
it('successfully edit', () => {
cy.tableSearchText(name)
.clickActionInMore('Edit')
.formInput('name', newname)
.clickModalActionSubmitButton()
.wait(2000);
});
it('successfully delete', () => {
cy.tableSearchText(name).clickConfirmActionInMore('Delete');
});
it('successfully delete related resources', () => {
cy.deleteAll('fip');
cy.deleteRouter(routerName, networkName);
cy.deleteAll('network', networkName);
cy.loginAdmin().deleteAll('flavor', flavorName, 'Bare Metal');
});
}); });
}); });

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { infoListUrl } from '../../../support/constants'; import { infoListUrl } from '../../../support/constants';
describe('The System Info Page', () => { describe('The System Info Page', () => {
@ -26,6 +27,8 @@ describe('The System Info Page', () => {
const routerName = `e2e-router-for-neutronAgent-${uuid}`; const routerName = `e2e-router-for-neutronAgent-${uuid}`;
const networkName = `e2e-network-for-neutronAgent-${uuid}`; const networkName = `e2e-network-for-neutronAgent-${uuid}`;
const heatServiceEnabled = (Cypress.env('extensions') || []).includes('heat');
beforeEach(() => { beforeEach(() => {
cy.loginAdmin(listUrl); cy.loginAdmin(listUrl);
}); });
@ -150,8 +153,10 @@ describe('The System Info Page', () => {
.clickModalActionSubmitButton(); .clickModalActionSubmitButton();
}); });
it('successfully orchestration services', () => { onlyOn(heatServiceEnabled, () => {
cy.clickTab(orchestrationServicesTab, 'heatService'); it('successfully orchestration services', () => {
cy.clickTab(orchestrationServicesTab, 'heatService');
});
}); });
it('successfully delete related resources', () => { it('successfully delete related resources', () => {

View File

@ -12,111 +12,122 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { stackListUrl } from '../../../support/constants'; import { stackListUrl } from '../../../support/constants';
describe('The Stack Page', () => { const heatServiceEnabled = (Cypress.env('extensions') || []).includes('heat');
const listUrl = stackListUrl;
const uuid = Cypress._.random(0, 1e6);
const name = `e2e-stack-${uuid}`;
const nameAbandon = `e2e-stack-abandon-${uuid}`;
const contentFile = 'stack-content.yaml';
const paramFile = 'stack-params.yaml';
const volumeName = `e2e-volume-for-stack-${uuid}`;
const volumeNameUpdate = `e2e-volume-for-stack-update-${uuid}`;
const volumeNameAbandon = `e2e-volume-for-stack-abandon-${uuid}`;
beforeEach(() => { onlyOn(!heatServiceEnabled, () => {
cy.login(listUrl); describe('Skip The Stack Page', () => {
}); it('successfully skip', () => {});
});
it('successfully create', () => { });
const volumeJson = {
name: volumeName, onlyOn(heatServiceEnabled, () => {
}; describe('The Stack Page', () => {
cy.clickHeaderButton(1, 2000) const listUrl = stackListUrl;
.formAttachFile('content', contentFile) const uuid = Cypress._.random(0, 1e6);
.formAttachFile('params', paramFile) const name = `e2e-stack-${uuid}`;
.clickStepActionNextButton() const nameAbandon = `e2e-stack-abandon-${uuid}`;
.wait(2000) const contentFile = 'stack-content.yaml';
.formInput('name', name) const paramFile = 'stack-params.yaml';
.formJsonInput('volume_name_spec', volumeJson) const volumeName = `e2e-volume-for-stack-${uuid}`;
.clickStepActionNextButton() const volumeNameUpdate = `e2e-volume-for-stack-update-${uuid}`;
.waitFormLoading() const volumeNameAbandon = `e2e-volume-for-stack-abandon-${uuid}`;
.wait(5000)
.tableSearchSelectText('Name', name) beforeEach(() => {
.waitStatusActiveByRefresh(); cy.login(listUrl);
}); });
it('successfully detail', () => { it('successfully create', () => {
cy.tableSearchSelectText('Name', name) const volumeJson = {
.checkTableFirstRow(name) name: volumeName,
.goToDetail() };
.checkDetailName(name); cy.clickHeaderButton(1, 2000)
cy.clickDetailTab('Stack Resources', 'resource') .formAttachFile('content', contentFile)
.clickDetailTab('Stack Events', 'event') .formAttachFile('params', paramFile)
.clickDetailTab('YAML File', 'template'); .clickStepActionNextButton()
cy.goBackToList(listUrl); .wait(2000)
}); .formInput('name', name)
.formJsonInput('volume_name_spec', volumeJson)
it('successfully link resource', () => { .clickStepActionNextButton()
cy.tableSearchSelectText('Name', name) .waitFormLoading()
.checkTableFirstRow(name) .wait(5000)
.goToDetail() .tableSearchSelectText('Name', name)
.checkDetailName(name); .waitStatusActiveByRefresh();
cy.clickDetailTab('Stack Resources').goToDetail(); });
});
it('successfully detail', () => {
it('successfully update template', () => { cy.tableSearchSelectText('Name', name)
const volumeJson = { .checkTableFirstRow(name)
name: volumeNameUpdate, .goToDetail()
}; .checkDetailName(name);
cy.tableSearchSelectText('Name', name) cy.clickDetailTab('Stack Resources', 'resource')
.clickActionInMore('Update Template') .clickDetailTab('Stack Events', 'event')
.wait(2000) .clickDetailTab('YAML File', 'template');
.formAttachFile('content', contentFile) cy.goBackToList(listUrl);
.formAttachFile('params', paramFile) });
.clickStepActionNextButton()
.wait(2000) it('successfully link resource', () => {
.formJsonInput('volume_name_spec', volumeJson) cy.tableSearchSelectText('Name', name)
.clickStepActionNextButton() .checkTableFirstRow(name)
.waitFormLoading() .goToDetail()
.wait(5000) .checkDetailName(name);
.tableSearchSelectText('Name', name) cy.clickDetailTab('Stack Resources').goToDetail();
.waitStatusActiveByRefresh(); });
});
it('successfully update template', () => {
it('successfully delete', () => { const volumeJson = {
cy.tableSearchSelectText('Name', name) name: volumeNameUpdate,
.clickConfirmActionInFirst() };
.wait(10000); cy.tableSearchSelectText('Name', name)
}); .clickActionInMore('Update Template')
.wait(2000)
it('successfully create for abandon', () => { .formAttachFile('content', contentFile)
const volumeJson = { .formAttachFile('params', paramFile)
name: volumeNameAbandon, .clickStepActionNextButton()
}; .wait(2000)
cy.clickHeaderButton(1, 2000) .formJsonInput('volume_name_spec', volumeJson)
.formAttachFile('content', contentFile) .clickStepActionNextButton()
.formAttachFile('params', paramFile) .waitFormLoading()
.clickStepActionNextButton() .wait(5000)
.wait(2000) .tableSearchSelectText('Name', name)
.formInput('name', nameAbandon) .waitStatusActiveByRefresh();
.wait(2000) });
.formJsonInput('volume_name_spec', volumeJson)
.clickStepActionNextButton() it('successfully delete', () => {
.waitFormLoading() cy.tableSearchSelectText('Name', name)
.wait(5000) .clickConfirmActionInFirst()
.tableSearchSelectText('Name', nameAbandon) .wait(10000);
.waitStatusActiveByRefresh(); });
});
it('successfully create for abandon', () => {
it('successfully abandon stack', () => { const volumeJson = {
cy.tableSearchSelectText('Name', nameAbandon).clickConfirmActionInMore( name: volumeNameAbandon,
'Abandon Stack' };
); cy.clickHeaderButton(1, 2000)
}); .formAttachFile('content', contentFile)
.formAttachFile('params', paramFile)
it('successfully delete resource', () => { .clickStepActionNextButton()
cy.deleteAll('volume', volumeNameAbandon); .wait(2000)
.formInput('name', nameAbandon)
.wait(2000)
.formJsonInput('volume_name_spec', volumeJson)
.clickStepActionNextButton()
.waitFormLoading()
.wait(5000)
.tableSearchSelectText('Name', nameAbandon)
.waitStatusActiveByRefresh();
});
it('successfully abandon stack', () => {
cy.tableSearchSelectText('Name', nameAbandon).clickConfirmActionInMore(
'Abandon Stack'
);
});
it('successfully delete resource', () => {
cy.deleteAll('volume', volumeNameAbandon);
});
}); });
}); });

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { fipListUrl, instanceListUrl } from '../../../support/constants'; import { fipListUrl, instanceListUrl } from '../../../support/constants';
describe('The Floating IP Page', () => { describe('The Floating IP Page', () => {
@ -21,13 +22,18 @@ describe('The Floating IP Page', () => {
const networkName = `e2e-network-for-fip-${uuid}`; const networkName = `e2e-network-for-fip-${uuid}`;
const instanceName = `e2e-instance-for-fip-${uuid}`; const instanceName = `e2e-instance-for-fip-${uuid}`;
const routerName = `e2e-router-for-fip-${uuid}`; const routerName = `e2e-router-for-fip-${uuid}`;
const qosServiceEnabled = (Cypress.env('extensions') || []).includes(
'neutron::qos'
);
beforeEach(() => { beforeEach(() => {
cy.login(listUrl); cy.login(listUrl);
}); });
it('successfully prepair resource by admin', () => { onlyOn(qosServiceEnabled, () => {
cy.loginAdmin().wait(5000).createNetworkPolicy({ name: policyName }); it('successfully prepair resource by admin', () => {
cy.loginAdmin().wait(5000).createNetworkPolicy({ name: policyName });
});
}); });
it('successfully prepair resource', () => { it('successfully prepair resource', () => {
@ -84,14 +90,25 @@ describe('The Floating IP Page', () => {
.clickConfirmActionInMore('Disassociate'); .clickConfirmActionInMore('Disassociate');
}); });
it('successfully edit', () => { onlyOn(!qosServiceEnabled, () => {
cy.clickFirstActionButton() it('successfully edit with qos', () => {
.formText('description', 'description') cy.clickFirstActionButton()
.formTabClick('qos_policy_id', 1) .formText('description', 'description')
.wait(5000) .clickModalActionSubmitButton()
.formTableSelectBySearch('qos_policy_id', policyName) .wait(2000);
.clickModalActionSubmitButton() });
.wait(2000); });
onlyOn(qosServiceEnabled, () => {
it('successfully edit with qos', () => {
cy.clickFirstActionButton()
.formText('description', 'description')
.formTabClick('qos_policy_id', 1)
.wait(5000)
.formTableSelectBySearch('qos_policy_id', policyName)
.clickModalActionSubmitButton()
.wait(2000);
});
}); });
it('successfully delete', () => { it('successfully delete', () => {
@ -105,6 +122,8 @@ describe('The Floating IP Page', () => {
cy.deleteRouter(routerName, networkName); cy.deleteRouter(routerName, networkName);
cy.deleteAll('network', networkName); cy.deleteAll('network', networkName);
cy.loginAdmin().wait(5000); cy.loginAdmin().wait(5000);
cy.deleteAll('networkQosPolicy', policyName); onlyOn(qosServiceEnabled, () => {
cy.deleteAll('networkQosPolicy', policyName);
});
}); });
}); });

View File

@ -12,220 +12,231 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { lbListUrl } from '../../../support/constants'; import { lbListUrl } from '../../../support/constants';
describe('The LB Page', () => { const lbServiceEnabled = (Cypress.env('extensions') || []).includes('octavia');
const listUrl = lbListUrl;
const uuid = Cypress._.random(0, 1e6);
const name = `e2e-lb-${uuid}`;
const listener = `e2e-listener-${uuid}`;
const pool = `e2e-pool-${uuid}`;
const health = `e2e-health-${uuid}`;
const listener2 = `e2e-listener2-${uuid}`; onlyOn(!lbServiceEnabled, () => {
const pool2 = `e2e-pool2-${uuid}`; describe('Skip The LB Page', () => {
it('successfully skip', () => {});
const port = 55; });
const port2 = 56; });
const networkName = `e2e-network-for-lb-${uuid}`;
const routerName = `e2e-router-for-lb-${uuid}`; onlyOn(lbServiceEnabled, () => {
describe('The LB Page', () => {
beforeEach(() => { const listUrl = lbListUrl;
cy.login(listUrl); const uuid = Cypress._.random(0, 1e6);
}); const name = `e2e-lb-${uuid}`;
const listener = `e2e-listener-${uuid}`;
it('successfully prepair resource', () => { const pool = `e2e-pool-${uuid}`;
cy.createNetwork({ name: networkName }); const health = `e2e-health-${uuid}`;
cy.createRouter({ name: routerName, network: networkName });
cy.createFip(); const listener2 = `e2e-listener2-${uuid}`;
}); const pool2 = `e2e-pool2-${uuid}`;
it('successfully create lb', () => { const port = 55;
cy.clickHeaderButton(1) const port2 = 56;
.wait(5000) const networkName = `e2e-network-for-lb-${uuid}`;
.formInput('name', name) const routerName = `e2e-router-for-lb-${uuid}`;
.formText('description', name)
.formTableSelectBySearch('vip_network_id', networkName) beforeEach(() => {
.wait(5000) cy.login(listUrl);
.formButtonClick('vip_address') });
.formSelect('vip_address')
.clickStepActionNextButton(); it('successfully prepair resource', () => {
cy.createNetwork({ name: networkName });
cy.formInput('listener_name', listener) cy.createRouter({ name: routerName, network: networkName });
.formText('listener_description', listener) cy.createFip();
.formSelect('listener_protocol') });
.formInput('listener_protocol_port', port)
.clickStepActionNextButton(); it('successfully create lb', () => {
cy.clickHeaderButton(1)
cy.formInput('pool_name', pool) .wait(5000)
.formText('pool_description', pool) .formInput('name', name)
.formSelect('pool_lb_algorithm') .formText('description', name)
.formSelect('pool_protocol') .formTableSelectBySearch('vip_network_id', networkName)
.clickStepActionNextButton(); .wait(5000)
.formButtonClick('vip_address')
cy.wait(5000).clickStepActionNextButton(); .formSelect('vip_address')
.clickStepActionNextButton();
cy.formInput('health_name', health)
.formSelect('health_type') cy.formInput('listener_name', listener)
.clickStepActionNextButton() .formText('listener_description', listener)
.waitFormLoading() .formSelect('listener_protocol')
.url() .formInput('listener_protocol_port', port)
.should('include', listUrl) .clickStepActionNextButton();
.closeNotice()
.wait(5000) cy.formInput('pool_name', pool)
.tableSearchText(name) .formText('pool_description', pool)
.waitStatusActiveByRefresh(); .formSelect('pool_lb_algorithm')
}); .formSelect('pool_protocol')
.clickStepActionNextButton();
it('successfully detail', () => {
cy.tableSearchText(name).goToDetail(1, 2000).goBackToList(listUrl); cy.wait(5000).clickStepActionNextButton();
});
cy.formInput('health_name', health)
it('successfully edit', () => { .formSelect('health_type')
cy.tableSearchText(name) .clickStepActionNextButton()
.clickFirstActionButton() .waitFormLoading()
.formText('description', 'description') .url()
.clickModalActionSubmitButton() .should('include', listUrl)
.waitStatusActiveByRefresh(); .closeNotice()
}); .wait(5000)
.tableSearchText(name)
it('successfully associate fip', () => { .waitStatusActiveByRefresh();
cy.tableSearchText(name) });
.clickActionInMore('Associate Floating IP')
.formTableSelect('fixed_ip') it('successfully detail', () => {
.formTableSelect('fip') cy.tableSearchText(name).goToDetail(1, 2000).goBackToList(listUrl);
.clickModalActionSubmitButton() });
.waitStatusActiveByRefresh();
}); it('successfully edit', () => {
cy.tableSearchText(name)
it('successfully disassociate fip', () => { .clickFirstActionButton()
cy.tableSearchText(name) .formText('description', 'description')
.clickConfirmActionInMore('Disassociate Floating IP') .clickModalActionSubmitButton()
.waitStatusActiveByRefresh(); .waitStatusActiveByRefresh();
}); });
it('successfully create listener', () => { it('successfully associate fip', () => {
cy.tableSearchText(name) cy.tableSearchText(name)
.goToDetail(1, 2000) .clickActionInMore('Associate Floating IP')
.clickHeaderButton(1) .formTableSelect('fixed_ip')
.formInput('name', listener2) .formTableSelect('fip')
.formText('description', listener2) .clickModalActionSubmitButton()
.formSelect('protocol') .waitStatusActiveByRefresh();
.formInput('protocol_port', port2) });
.clickModalActionSubmitButton();
}); it('successfully disassociate fip', () => {
cy.tableSearchText(name)
it('successfully edit listener', () => { .clickConfirmActionInMore('Disassociate Floating IP')
cy.tableSearchText(name) .waitStatusActiveByRefresh();
.goToDetail(1, 2000) });
.tableSearchText(listener)
.clickFirstActionButton() it('successfully create listener', () => {
.formText('description', 'description') cy.tableSearchText(name)
.clickModalActionSubmitButton(); .goToDetail(1, 2000)
}); .clickHeaderButton(1)
.formInput('name', listener2)
it('successfully edit listener health monitor', () => { .formText('description', listener2)
cy.tableSearchText(name) .formSelect('protocol')
.goToDetail(1, 2000) .formInput('protocol_port', port2)
.tableSearchText(listener) .clickModalActionSubmitButton();
.clickActionInMore('Edit Health Monitor') });
.formRadioChoose('admin_state_up', 1)
.clickModalActionSubmitButton() it('successfully edit listener', () => {
.tableSearchText(listener) cy.tableSearchText(name)
.waitStatusActiveByRefresh(); .goToDetail(1, 2000)
}); .tableSearchText(listener)
.clickFirstActionButton()
it('successfully edit listener default pool', () => { .formText('description', 'description')
cy.tableSearchText(name) .clickModalActionSubmitButton();
.goToDetail(1, 2000) });
.tableSearchText(listener)
.clickActionInMore('Edit Default Pool') it('successfully edit listener health monitor', () => {
.formText('description', 'description') cy.tableSearchText(name)
.clickModalActionSubmitButton() .goToDetail(1, 2000)
.tableSearchText(listener) .tableSearchText(listener)
.waitStatusActiveByRefresh(); .clickActionInMore('Edit Health Monitor')
}); .formRadioChoose('admin_state_up', 1)
.clickModalActionSubmitButton()
it('successfully delete listener default pool', () => { .tableSearchText(listener)
cy.tableSearchText(name) .waitStatusActiveByRefresh();
.goToDetail(1, 2000) });
.tableSearchText(listener)
.clickConfirmActionInMore('Delete Default Pool') it('successfully edit listener default pool', () => {
.tableSearchText(listener) cy.tableSearchText(name)
.waitStatusActiveByRefresh(); .goToDetail(1, 2000)
}); .tableSearchText(listener)
.clickActionInMore('Edit Default Pool')
it('successfully create listener default pool', () => { .formText('description', 'description')
cy.tableSearchText(name) .clickModalActionSubmitButton()
.goToDetail(1, 2000) .tableSearchText(listener)
.tableSearchText(listener) .waitStatusActiveByRefresh();
.clickActionInMore('Create Default Pool') });
.formInput('name', pool2)
.formText('description', pool2) it('successfully delete listener default pool', () => {
.formSelect('lb_algorithm') cy.tableSearchText(name)
.formSelect('protocol') .goToDetail(1, 2000)
.clickModalActionSubmitButton() .tableSearchText(listener)
.tableSearchText(listener) .clickConfirmActionInMore('Delete Default Pool')
.waitStatusActiveByRefresh(); .tableSearchText(listener)
}); .waitStatusActiveByRefresh();
});
it('successfully listener detail', () => {
cy.tableSearchText(name) it('successfully create listener default pool', () => {
.goToDetail(1, 2000) cy.tableSearchText(name)
.tableSearchText(listener) .goToDetail(1, 2000)
.goToDetail(0, 2000) .tableSearchText(listener)
.clickDetailTab('Member', 'members'); .clickActionInMore('Create Default Pool')
}); .formInput('name', pool2)
.formText('description', pool2)
it('successfully create listener member', () => { .formSelect('lb_algorithm')
cy.tableSearchText(name) .formSelect('protocol')
.goToDetail(1, 2000) .clickModalActionSubmitButton()
.tableSearchText(listener) .tableSearchText(listener)
.goToDetail(0, 2000) .waitStatusActiveByRefresh();
.clickDetailTab('Member') });
.clickHeaderButton(1)
.formButtonClick('extMembers') it('successfully listener detail', () => {
.get('.ant-form-item') cy.tableSearchText(name)
.eq(1) .goToDetail(1, 2000)
.find('.ant-input-number-input') .tableSearchText(listener)
.first() .goToDetail(0, 2000)
.type(port2) .clickDetailTab('Member', 'members');
.clickModalActionSubmitButton() });
.waitStatusActiveByRefresh();
}); it('successfully create listener member', () => {
cy.tableSearchText(name)
it('successfully edit listener member', () => { .goToDetail(1, 2000)
cy.tableSearchText(name) .tableSearchText(listener)
.goToDetail(1, 2000) .goToDetail(0, 2000)
.tableSearchText(listener) .clickDetailTab('Member')
.goToDetail(0, 2000) .clickHeaderButton(1)
.clickDetailTab('Member') .formButtonClick('extMembers')
.clickFirstActionButton() .get('.ant-form-item')
.wait(2000) .eq(1)
.formInput('weight', 2) .find('.ant-input-number-input')
.clickModalActionSubmitButton() .first()
.waitStatusActiveByRefresh(); .type(port2)
}); .clickModalActionSubmitButton()
.waitStatusActiveByRefresh();
it('successfully delete listener member', () => { });
cy.tableSearchText(name)
.goToDetail(1, 2000) it('successfully edit listener member', () => {
.tableSearchText(listener) cy.tableSearchText(name)
.goToDetail(0, 2000) .goToDetail(1, 2000)
.clickDetailTab('Member') .tableSearchText(listener)
.clickConfirmActionButton('Delete') .goToDetail(0, 2000)
.goBackToList() .clickDetailTab('Member')
.tableSearchText(listener) .clickFirstActionButton()
.waitStatusActiveByRefresh(); .wait(2000)
}); .formInput('weight', 2)
.clickModalActionSubmitButton()
it('successfully delete', () => { .waitStatusActiveByRefresh();
cy.tableSearchText(name).clickConfirmActionInMore('Delete'); });
});
it('successfully delete listener member', () => {
it('successfully delete related resources', () => { cy.tableSearchText(name)
cy.deleteRouter(routerName, networkName); .goToDetail(1, 2000)
cy.deleteAll('network', networkName); .tableSearchText(listener)
cy.deleteAll('fip'); .goToDetail(0, 2000)
.clickDetailTab('Member')
.clickConfirmActionButton('Delete')
.goBackToList()
.tableSearchText(listener)
.waitStatusActiveByRefresh();
});
it('successfully delete', () => {
cy.tableSearchText(name).clickConfirmActionInMore('Delete');
});
it('successfully delete related resources', () => {
cy.deleteRouter(routerName, networkName);
cy.deleteAll('network', networkName);
cy.deleteAll('fip');
});
}); });
}); });

View File

@ -12,108 +12,121 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { policyListUrl } from '../../../support/constants'; import { policyListUrl } from '../../../support/constants';
describe('The Network Qos Policy Page', () => { const qosServiceEnabled = (Cypress.env('extensions') || []).includes(
const listUrl = policyListUrl; 'neutron::qos'
const name = `e2e-policy-${Cypress._.random(0, 1e6)}`; );
const newname = `${name}-1`;
beforeEach(() => { onlyOn(!qosServiceEnabled, () => {
cy.loginAdmin(listUrl); describe('Skip The Network Qos Policy Page', () => {
}); it('successfully skip', () => {});
});
it('successfully create', () => { });
cy.clickHeaderButton(1)
.wait(2000) onlyOn(qosServiceEnabled, () => {
.formInput('name', name) describe('The Network Qos Policy Page', () => {
.formText('description', name) const listUrl = policyListUrl;
// .formSelect('project_id', 'admin') const name = `e2e-policy-${Cypress._.random(0, 1e6)}`;
.formSwitch('shared') const newname = `${name}-1`;
.clickModalActionSubmitButton();
}); beforeEach(() => {
cy.loginAdmin(listUrl);
it('successfully detail', () => { });
cy.tableSearchText(name)
.checkTableFirstRow(name) it('successfully create', () => {
.goToDetail() cy.clickHeaderButton(1)
.checkDetailName(name); .wait(2000)
cy.goBackToList(listUrl); .formInput('name', name)
}); .formText('description', name)
// .formSelect('project_id', 'admin')
// egress .formSwitch('shared')
it('successfully create egress bandwidth limit rule', () => { .clickModalActionSubmitButton();
cy.tableSearchText(name) });
.clickActionInMore('Create Bandwidth Limit Rule')
.formSelect('direction', 'egress') it('successfully detail', () => {
.clickModalActionSubmitButton(); cy.tableSearchText(name)
}); .checkTableFirstRow(name)
.goToDetail()
it('successfully edit bandwidth egress limit rule', () => { .checkDetailName(name);
cy.tableSearchText(name) cy.goBackToList(listUrl);
.clickActionInMore('Edit Bandwidth Egress Limit Rule') });
.formInput('max_kbps', 2)
.clickModalActionSubmitButton(); // egress
}); it('successfully create egress bandwidth limit rule', () => {
cy.tableSearchText(name)
it('successfully delete bandwidth egress limit rule', () => { .clickActionInMore('Create Bandwidth Limit Rule')
cy.tableSearchText(name).clickConfirmActionInMore( .formSelect('direction', 'egress')
'Delete Bandwidth Egress Rules' .clickModalActionSubmitButton();
); });
});
it('successfully edit bandwidth egress limit rule', () => {
it('successfully create bandwidth ingress limit rule', () => { cy.tableSearchText(name)
cy.tableSearchText(name) .clickActionInMore('Edit Bandwidth Egress Limit Rule')
.clickActionInMore('Create Bandwidth Limit Rule') .formInput('max_kbps', 2)
.formSelect('direction', 'ingress') .clickModalActionSubmitButton();
.clickModalActionSubmitButton(); });
});
it('successfully delete bandwidth egress limit rule', () => {
it('successfully edit bandwidth ingress limit rule', () => { cy.tableSearchText(name).clickConfirmActionInMore(
cy.tableSearchText(name) 'Delete Bandwidth Egress Rules'
.clickActionInMore('Edit Bandwidth Ingress Limit Rule') );
.formInput('max_kbps', 2) });
.clickModalActionSubmitButton();
}); it('successfully create bandwidth ingress limit rule', () => {
cy.tableSearchText(name)
it('successfully delete bandwidth ingress limit rule', () => { .clickActionInMore('Create Bandwidth Limit Rule')
cy.tableSearchText(name).clickConfirmActionInMore( .formSelect('direction', 'ingress')
'Delete Bandwidth Ingress Rules' .clickModalActionSubmitButton();
); });
});
it('successfully edit bandwidth ingress limit rule', () => {
it('successfully create DSCP marking rule', () => { cy.tableSearchText(name)
cy.tableSearchText(name) .clickActionInMore('Edit Bandwidth Ingress Limit Rule')
.clickActionInMore('Create DSCP Marking Rule') .formInput('max_kbps', 2)
.clickModalActionSubmitButton(); .clickModalActionSubmitButton();
}); });
it('successfully edit DSCP marking rule', () => { it('successfully delete bandwidth ingress limit rule', () => {
cy.tableSearchText(name) cy.tableSearchText(name).clickConfirmActionInMore(
.clickActionInMore('Edit DSCP Marking Rule') 'Delete Bandwidth Ingress Rules'
.formSelect('dscp_mark', 8) );
.clickModalActionSubmitButton(); });
});
it('successfully create DSCP marking rule', () => {
it('successfully delete DSCP marking rule', () => { cy.tableSearchText(name)
cy.tableSearchText(name).clickConfirmActionInMore( .clickActionInMore('Create DSCP Marking Rule')
'Delete DSCP Marking Rules' .clickModalActionSubmitButton();
); });
});
it('successfully edit DSCP marking rule', () => {
it('successfully edit', () => { cy.tableSearchText(name)
cy.tableSearchText(name) .clickActionInMore('Edit DSCP Marking Rule')
.clickFirstActionButton() .formSelect('dscp_mark', 8)
.formInput('name', newname) .clickModalActionSubmitButton();
.formText('description', newname) });
.clickModalActionSubmitButton()
.wait(2000); it('successfully delete DSCP marking rule', () => {
}); cy.tableSearchText(name).clickConfirmActionInMore(
'Delete DSCP Marking Rules'
it('successfully delete', () => { );
cy.tableSearchText(newname) });
.checkTableFirstRow(newname)
.clickConfirmActionInMore('Delete'); it('successfully edit', () => {
cy.tableSearchText(newname).checkEmptyTable(); cy.tableSearchText(name)
.clickFirstActionButton()
.formInput('name', newname)
.formText('description', newname)
.clickModalActionSubmitButton()
.wait(2000);
});
it('successfully delete', () => {
cy.tableSearchText(newname)
.checkTableFirstRow(newname)
.clickConfirmActionInMore('Delete');
cy.tableSearchText(newname).checkEmptyTable();
});
}); });
}); });

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { virtualAdapterListUrl } from '../../../support/constants'; import { virtualAdapterListUrl } from '../../../support/constants';
describe('The Virtual Adapter Page', () => { describe('The Virtual Adapter Page', () => {
@ -24,13 +25,18 @@ describe('The Virtual Adapter Page', () => {
const networkName = `e2e-network-for-virtual-adapter-${uuid}`; const networkName = `e2e-network-for-virtual-adapter-${uuid}`;
const instanceName = `e2e-instance-for-virtual-adapter-${uuid}`; const instanceName = `e2e-instance-for-virtual-adapter-${uuid}`;
const routerName = `e2e-router-for-virtual-adapter-${uuid}`; const routerName = `e2e-router-for-virtual-adapter-${uuid}`;
const qosServiceEnabled = (Cypress.env('extensions') || []).includes(
'neutron::qos'
);
beforeEach(() => { beforeEach(() => {
cy.login(listUrl); cy.login(listUrl);
}); });
it('successfully prepair resource by admin', () => { onlyOn(qosServiceEnabled, () => {
cy.loginAdmin().wait(5000).createNetworkPolicy({ name: policyName }); it('successfully prepair resource by admin', () => {
cy.loginAdmin().wait(5000).createNetworkPolicy({ name: policyName });
});
}); });
it('successfully prepair resource', () => { it('successfully prepair resource', () => {
@ -115,15 +121,17 @@ describe('The Virtual Adapter Page', () => {
cy.tableSearchText(name).clickConfirmActionInMore('Detach'); cy.tableSearchText(name).clickConfirmActionInMore('Detach');
}); });
it('successfully modify qos', () => { onlyOn(qosServiceEnabled, () => {
cy.tableSearchText(name) it('successfully modify qos', () => {
.clickActionInMore('Modify QoS') cy.tableSearchText(name)
.wait(5000) .clickActionInMore('Modify QoS')
.formSwitch('enableQosPolicy') .wait(5000)
.formTabClick('qos_policy_id', 1) .formSwitch('enableQosPolicy')
.wait(2000) .formTabClick('qos_policy_id', 1)
.formTableSelectBySearch('qos_policy_id', policyName) .wait(2000)
.clickModalActionSubmitButton(); .formTableSelectBySearch('qos_policy_id', policyName)
.clickModalActionSubmitButton();
});
}); });
it('successfully manage security group', () => { it('successfully manage security group', () => {
@ -180,6 +188,8 @@ describe('The Virtual Adapter Page', () => {
cy.deleteAll('network', networkName); cy.deleteAll('network', networkName);
cy.deleteAll('fip'); cy.deleteAll('fip');
cy.loginAdmin().wait(5000); cy.loginAdmin().wait(5000);
cy.deleteAll('networkQosPolicy', policyName); onlyOn(qosServiceEnabled, () => {
cy.deleteAll('networkQosPolicy', policyName);
});
}); });
}); });

View File

@ -12,177 +12,190 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { vpnListUrl } from '../../../support/constants'; import { vpnListUrl } from '../../../support/constants';
describe('The VPN Page', () => { const vpnServiceEnabled = (Cypress.env('extensions') || []).includes(
const listUrl = vpnListUrl; 'neutron::vpn'
const uuid = Cypress._.random(0, 1e6); );
const gateway = `e2e-gateway-${uuid}`;
const endpointLocal = `e2e-endpoint-local-${uuid}`;
const endpointPeer = `e2e-endpoint-peer-${uuid}`;
const ikePolicy = `e2e-ike-policy-${uuid}`;
const ipsecPolicy = `e2e-ipsec-policy-${uuid}`;
const tunnel = `e2e-tunnel-${uuid}`;
const cidr = '192.168.0.0/24'; onlyOn(!vpnServiceEnabled, () => {
describe('The VPN Page', () => {
const networkName = `e2e-network-for-vpn-${uuid}`; it('successfully skip', () => {});
const routerName = `e2e-router-for-vpn-${uuid}`; });
});
beforeEach(() => {
cy.login(listUrl); onlyOn(vpnServiceEnabled, () => {
}); describe('The VPN Page', () => {
const listUrl = vpnListUrl;
it('successfully prepair resource', () => { const uuid = Cypress._.random(0, 1e6);
cy.createNetwork({ name: networkName }); const gateway = `e2e-gateway-${uuid}`;
cy.createRouter({ name: routerName, network: networkName }); const endpointLocal = `e2e-endpoint-local-${uuid}`;
}); const endpointPeer = `e2e-endpoint-peer-${uuid}`;
const ikePolicy = `e2e-ike-policy-${uuid}`;
it('successfully create gateway', () => { const ipsecPolicy = `e2e-ipsec-policy-${uuid}`;
cy.clickHeaderButton(1) const tunnel = `e2e-tunnel-${uuid}`;
.formInput('name', gateway)
.formText('description', gateway) const cidr = '192.168.0.0/24';
.formTableSelectBySearch('router_id', routerName)
.clickModalActionSubmitButton(); const networkName = `e2e-network-for-vpn-${uuid}`;
}); const routerName = `e2e-router-for-vpn-${uuid}`;
it('successfully create local endpoint', () => { beforeEach(() => {
cy.clickTab('VPN EndPoint Group', 'vpn_endpoint_groups') cy.login(listUrl);
.clickHeaderButton(1) });
.wait(5000)
.formInput('name', endpointLocal) it('successfully prepair resource', () => {
.formText('description', endpointLocal) cy.createNetwork({ name: networkName });
.formSelect('type', 'Local') cy.createRouter({ name: routerName, network: networkName });
.formTableSelectBySearch('router_id', routerName) });
.wait(5000)
.formTableSelect('subnet_id') it('successfully create gateway', () => {
.clickModalActionSubmitButton(); cy.clickHeaderButton(1)
}); .formInput('name', gateway)
.formText('description', gateway)
it('successfully create peer endpoint', () => { .formTableSelectBySearch('router_id', routerName)
cy.clickTab('VPN EndPoint Group', 'vpn_endpoint_groups') .clickModalActionSubmitButton();
.clickHeaderButton(1) });
.formInput('name', endpointPeer)
.formText('description', endpointPeer) it('successfully create local endpoint', () => {
.formSelect('type', 'Peer') cy.clickTab('VPN EndPoint Group', 'vpn_endpoint_groups')
.wait(2000) .clickHeaderButton(1)
.formText('endpoints', cidr) .wait(5000)
.clickModalActionSubmitButton(); .formInput('name', endpointLocal)
}); .formText('description', endpointLocal)
.formSelect('type', 'Local')
it('successfully create ike policy', () => { .formTableSelectBySearch('router_id', routerName)
cy.clickTab('IKE Policy', 'ike_policy') .wait(5000)
.clickHeaderButton(1) .formTableSelect('subnet_id')
.formInput('name', ikePolicy) .clickModalActionSubmitButton();
.formText('description', ikePolicy) });
.clickModalActionSubmitButton();
}); it('successfully create peer endpoint', () => {
cy.clickTab('VPN EndPoint Group', 'vpn_endpoint_groups')
it('successfully create ipsec policy', () => { .clickHeaderButton(1)
cy.clickTab('IPsec Policy', 'ipsec_policy') .formInput('name', endpointPeer)
.clickHeaderButton(1) .formText('description', endpointPeer)
.formInput('name', ipsecPolicy) .formSelect('type', 'Peer')
.formText('description', ipsecPolicy) .wait(2000)
.clickModalActionSubmitButton(); .formText('endpoints', cidr)
}); .clickModalActionSubmitButton();
});
it('successfully create vpn tunnel', () => {
cy.clickTab('VPN Tunnel', 'ipsec_connections') it('successfully create ike policy', () => {
.clickHeaderButton(1) cy.clickTab('IKE Policy', 'ike_policy')
.wait(5000) .clickHeaderButton(1)
.formInput('name', tunnel) .formInput('name', ikePolicy)
.formText('description', tunnel) .formText('description', ikePolicy)
.formSelect('vpnservice_id', gateway) .clickModalActionSubmitButton();
.formSelect('ikepolicy_id', ikePolicy) });
.formSelect('ipsecpolicy_id', ipsecPolicy)
.formSelect('local_ep_group_id', endpointLocal) it('successfully create ipsec policy', () => {
.wait(2000) cy.clickTab('IPsec Policy', 'ipsec_policy')
.formInput('peer_address', '192.168.1.1') .clickHeaderButton(1)
.formSelect('peer_ep_group_id', endpointPeer) .formInput('name', ipsecPolicy)
.formInput('password', 'passW0rd') .formText('description', ipsecPolicy)
.formInput('confirmPassword', 'passW0rd') .clickModalActionSubmitButton();
.formButtonClick('more') });
.clickModalActionSubmitButton();
}); it('successfully create vpn tunnel', () => {
cy.clickTab('VPN Tunnel', 'ipsec_connections')
it('successfully detail vpn tunnel', () => { .clickHeaderButton(1)
cy.clickTab('VPN Tunnel', 'ipsec_connections').tableSearchText(tunnel); .wait(5000)
cy.goToDetail().wait(30000); .formInput('name', tunnel)
cy.goBackToList(listUrl); .formText('description', tunnel)
}); .formSelect('vpnservice_id', gateway)
.formSelect('ikepolicy_id', ikePolicy)
it('successfully edit tunnel', () => { .formSelect('ipsecpolicy_id', ipsecPolicy)
cy.clickTab('VPN Tunnel') .formSelect('local_ep_group_id', endpointLocal)
.tableSearchText(tunnel) .wait(2000)
.clickFirstActionButton() .formInput('peer_address', '192.168.1.1')
.formText('description', 'description') .formSelect('peer_ep_group_id', endpointPeer)
.clickModalActionSubmitButton(); .formInput('password', 'passW0rd')
}); .formInput('confirmPassword', 'passW0rd')
.formButtonClick('more')
it('successfully delete tunnel', () => { .clickModalActionSubmitButton();
cy.clickTab('VPN Tunnel') });
.tableSearchText(tunnel)
.clickConfirmActionButton('Delete'); it('successfully detail vpn tunnel', () => {
}); cy.clickTab('VPN Tunnel', 'ipsec_connections').tableSearchText(tunnel);
cy.goToDetail().wait(30000);
it('successfully edit ipsec policy', () => { cy.goBackToList(listUrl);
cy.clickTab('IPsec Policy') });
.tableSearchText(ipsecPolicy)
.clickFirstActionButton() it('successfully edit tunnel', () => {
.formText('description', 'description') cy.clickTab('VPN Tunnel')
.clickModalActionSubmitButton(); .tableSearchText(tunnel)
}); .clickFirstActionButton()
.formText('description', 'description')
it('successfully delete ipsec policy', () => { .clickModalActionSubmitButton();
cy.clickTab('IPsec Policy') });
.tableSearchText(ipsecPolicy)
.clickConfirmActionButton('Delete'); it('successfully delete tunnel', () => {
}); cy.clickTab('VPN Tunnel')
.tableSearchText(tunnel)
it('successfully edit ike policy', () => { .clickConfirmActionButton('Delete');
cy.clickTab('IKE Policy') });
.tableSearchText(ikePolicy)
.clickFirstActionButton() it('successfully edit ipsec policy', () => {
.formText('description', 'description') cy.clickTab('IPsec Policy')
.clickModalActionSubmitButton(); .tableSearchText(ipsecPolicy)
}); .clickFirstActionButton()
.formText('description', 'description')
it('successfully delete ike policy', () => { .clickModalActionSubmitButton();
cy.clickTab('IKE Policy') });
.tableSearchText(ikePolicy)
.clickConfirmActionButton('Delete'); it('successfully delete ipsec policy', () => {
}); cy.clickTab('IPsec Policy')
.tableSearchText(ipsecPolicy)
it('successfully edit endpoint', () => { .clickConfirmActionButton('Delete');
cy.clickTab('VPN EndPoint Group') });
.tableSearchText(endpointLocal)
.clickFirstActionButton() it('successfully edit ike policy', () => {
.formText('description', 'description') cy.clickTab('IKE Policy')
.clickModalActionSubmitButton(); .tableSearchText(ikePolicy)
}); .clickFirstActionButton()
.formText('description', 'description')
it('successfully delete endpoint', () => { .clickModalActionSubmitButton();
cy.clickTab('VPN EndPoint Group') });
.tableSearchText(endpointLocal)
.clickConfirmActionButton('Delete') it('successfully delete ike policy', () => {
.wait(5000) cy.clickTab('IKE Policy')
.tableSearchText(endpointPeer) .tableSearchText(ikePolicy)
.clickConfirmActionButton('Delete'); .clickConfirmActionButton('Delete');
}); });
it('successfully edit gateway', () => { it('successfully edit endpoint', () => {
cy.tableSearchText(gateway) cy.clickTab('VPN EndPoint Group')
.clickFirstActionButton() .tableSearchText(endpointLocal)
.formText('description', 'description') .clickFirstActionButton()
.clickModalActionSubmitButton(); .formText('description', 'description')
}); .clickModalActionSubmitButton();
});
it('successfully delete gateway', () => {
cy.tableSearchText(gateway).clickConfirmActionButton('Delete'); it('successfully delete endpoint', () => {
}); cy.clickTab('VPN EndPoint Group')
.tableSearchText(endpointLocal)
it('successfully delete related resources', () => { .clickConfirmActionButton('Delete')
cy.deleteRouter(routerName, networkName); .wait(5000)
cy.deleteAll('network', networkName); .tableSearchText(endpointPeer)
.clickConfirmActionButton('Delete');
});
it('successfully edit gateway', () => {
cy.tableSearchText(gateway)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully delete gateway', () => {
cy.tableSearchText(gateway).clickConfirmActionButton('Delete');
});
it('successfully delete related resources', () => {
cy.deleteRouter(routerName, networkName);
cy.deleteAll('network', networkName);
});
}); });
}); });

View File

@ -12,91 +12,104 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { backupListUrl, volumeListUrl } from '../../../support/constants'; import { backupListUrl, volumeListUrl } from '../../../support/constants';
describe('The Volume Backup Page', () => { const backupServiceEnabled = (Cypress.env('extensions') || []).includes(
const listUrl = backupListUrl; 'cinder::buckup'
const uuid = Cypress._.random(0, 1e6); );
const name = `e2e-backup-${uuid}`;
const nameInc = `${name}-inc`;
const volumeName = `e2e-volume-for-backup-${uuid}`;
const volumeNameByBackup = `e2e-volume-by-backup-${uuid}`;
const newname = `${name}-1`;
beforeEach(() => { onlyOn(!backupServiceEnabled, () => {
cy.login(listUrl); describe('Skip The Volume Backup Page', () => {
}); it('successfully skip', () => {});
});
it('successfully prepair resource', () => { });
cy.createVolume(volumeName);
}); onlyOn(backupServiceEnabled, () => {
describe('The Volume Backup Page', () => {
it('successfully create full bakcup', () => { const listUrl = backupListUrl;
cy.clickHeaderButton(1, 5000) const uuid = Cypress._.random(0, 1e6);
.formInput('name', name) const name = `e2e-backup-${uuid}`;
.formTableSelectBySearch('volume', volumeName) const nameInc = `${name}-inc`;
.clickModalActionSubmitButton() const volumeName = `e2e-volume-for-backup-${uuid}`;
.wait(5000) const volumeNameByBackup = `e2e-volume-by-backup-${uuid}`;
.waitTableLoading(); const newname = `${name}-1`;
cy.wait(30000); beforeEach(() => {
}); cy.login(listUrl);
});
it('successfully create increment bakcup', () => {
cy.clickHeaderButton(1, 5000) it('successfully prepair resource', () => {
.formInput('name', nameInc) cy.createVolume(volumeName);
.formRadioChoose('incremental', 1) });
.formTableSelectBySearch('volume', volumeName)
.clickModalActionSubmitButton() it('successfully create full bakcup', () => {
.wait(5000) cy.clickHeaderButton(1, 5000)
.waitTableLoading(); .formInput('name', name)
}); .formTableSelectBySearch('volume', volumeName)
.clickModalActionSubmitButton()
it('successfully detail', () => { .wait(5000)
cy.tableSearchText(name).goToDetail().checkDetailName(name); .waitTableLoading();
cy.goBackToList(listUrl); cy.tableSearchText(name).waitStatusTextByFresh('Available');
});
cy.visitPage(volumeListUrl)
.tableSearchText(volumeName) it('successfully create increment bakcup', () => {
.goToDetail() cy.clickHeaderButton(1, 5000)
.clickDetailTab('Backup', 'backup'); .formInput('name', nameInc)
}); .formRadioChoose('incremental', 1)
.formTableSelectBySearch('volume', volumeName)
it('successfully restore by backup', () => { .clickModalActionSubmitButton()
cy.tableSearchText(name) .wait(5000)
.clickActionInMore('Restore Backup') .waitTableLoading();
.wait(5000) cy.tableSearchText(nameInc).waitStatusTextByFresh('Available');
.formTableSelect('backup') });
.clickModalActionSubmitButton()
.wait(30000); it('successfully detail', () => {
}); cy.tableSearchText(name).goToDetail().checkDetailName(name);
cy.goBackToList(listUrl);
it('successfully create volume by backup', () => {
cy.tableSearchText(name) cy.visitPage(volumeListUrl)
.clickActionInMore('Create Volume') .tableSearchText(volumeName)
.wait(5000) .goToDetail()
.formInput('name', volumeNameByBackup) .clickDetailTab('Backup', 'backup');
.formSelect('volume_type') });
.formSelect('availability_zone')
.clickModalActionSubmitButton(); it('successfully restore by backup', () => {
}); cy.tableSearchText(name)
.clickActionInMore('Restore Backup')
it('successfully edit', () => { .wait(5000)
cy.tableSearchText(name) .formTableSelect('backup')
.clickFirstActionButton() .clickModalActionSubmitButton()
.formInput('name', newname) .wait(30000);
.clickModalActionSubmitButton() });
.wait(2000);
}); it('successfully create volume by backup', () => {
cy.tableSearchText(name)
it('successfully delete', () => { .clickActionInMore('Create Volume')
cy.tableSearchText(newname) .wait(5000)
.clickConfirmActionInMore('Delete') .formInput('name', volumeNameByBackup)
.tableSearchText(newname); .formSelect('volume_type')
}); .formSelect('availability_zone')
.clickModalActionSubmitButton();
it('successfully delete related resources', () => { });
cy.deleteAll('volume', volumeName);
cy.deleteAll('volume', volumeNameByBackup); it('successfully edit', () => {
cy.tableSearchText(name)
.clickFirstActionButton()
.formInput('name', newname)
.clickModalActionSubmitButton()
.wait(2000);
});
it('successfully delete', () => {
cy.tableSearchText(newname)
.clickConfirmActionInMore('Delete')
.tableSearchText(newname);
});
it('successfully delete related resources', () => {
cy.deleteAll('volume', volumeName);
cy.deleteAll('volume', volumeNameByBackup);
});
}); });
}); });

View File

@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { volumeListUrl, volumeTypeListUrl } from '../../../support/constants'; import { volumeListUrl, volumeTypeListUrl } from '../../../support/constants';
describe('The Volume Page', () => { describe('The Volume Page', () => {
@ -32,6 +33,10 @@ describe('The Volume Page', () => {
const networkName = `e2e-network-for-volume-${uuid}`; const networkName = `e2e-network-for-volume-${uuid}`;
const instanceName = `e2e-instance-for-volume-${uuid}`; const instanceName = `e2e-instance-for-volume-${uuid}`;
const backupServiceEnabled = (Cypress.env('extensions') || []).includes(
'cinder::buckup'
);
beforeEach(() => { beforeEach(() => {
cy.login(listUrl); cy.login(listUrl);
}); });
@ -96,25 +101,27 @@ describe('The Volume Page', () => {
cy.deleteAll('volumeSnapshot', snapshotName); cy.deleteAll('volumeSnapshot', snapshotName);
}); });
it('successfully create backup', () => { onlyOn(backupServiceEnabled, () => {
cy.tableSearchText(name) it('successfully create backup', () => {
.clickActionInMore('Create Backup') cy.tableSearchText(name)
.formInput('name', backupName) .clickActionInMore('Create Backup')
.clickModalActionSubmitButton() .formInput('name', backupName)
.tableSearchText(name) .clickModalActionSubmitButton()
.waitStatusActiveByRefresh(); .tableSearchText(name)
}); .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', backupIncName); cy.deleteAll('backup', backupIncName);
cy.wait(5000).deleteAll('backup', backupName); cy.wait(5000).deleteAll('backup', backupName);
});
}); });
it('successfully clone volume', () => { it('successfully clone volume', () => {

View File

@ -1550,6 +1550,11 @@
tunnel-agent "^0.6.0" tunnel-agent "^0.6.0"
uuid "^3.3.2" uuid "^3.3.2"
"@cypress/skip-test@^2.6.1":
version "2.6.1"
resolved "https://registry.yarnpkg.com/@cypress/skip-test/-/skip-test-2.6.1.tgz#44a4bc4c2b2e369a7661177c9b38e50d417a36ea"
integrity sha512-X+ibefBiuOmC5gKG91wRIT0/OqXeETYvu7zXktjZ3yLeO186Y8ia0K7/gQUpAwuUi28DuqMd1+7tBQVtPkzbPA==
"@cypress/xvfb@^1.2.4": "@cypress/xvfb@^1.2.4":
version "1.2.4" version "1.2.4"
resolved "https://registry.yarnpkg.com/@cypress/xvfb/-/xvfb-1.2.4.tgz#2daf42e8275b39f4aa53c14214e557bd14e7748a" resolved "https://registry.yarnpkg.com/@cypress/xvfb/-/xvfb-1.2.4.tgz#2daf42e8275b39f4aa53c14214e557bd14e7748a"