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-react": "^7.13.13",
"@cypress/code-coverage": "^3.9.5",
"@cypress/skip-test": "^2.6.1",
"autoprefixer": "^9.3.1",
"babel-eslint": "^9.0.0",
"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
imageDownloadUrl: http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img
imageCanChangePassword: false
extensions:
- cinder::buckup
- neutron::qos
- neutron::vpn
- neutron::port-forwarding
- octavia
- heat
- ironic
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
# 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
# network
- pages/network/router.spec.js
- pages/network/network.spec.js
- pages/network/virtual-adapter.spec.js
@ -34,6 +45,7 @@ testFiles:
- pages/network/vpn.spec.js
- pages/network/lb.spec.js
- pages/network/topology.spec.js
# compute
- pages/compute/image.spec.js
- pages/compute/flavor.spec.js
- pages/compute/server-group.spec.js
@ -44,8 +56,9 @@ testFiles:
- pages/compute/hypervisor.spec.js
- pages/compute/baremetal.spec.js
# - pages/management/recycle-bin.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

@ -12,189 +12,204 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { bareMetalListUrl } from '../../../support/constants';
describe('The Bare Metal Page', () => {
const listUrl = bareMetalListUrl;
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)}`;
const ironicServiceEnabled = (Cypress.env('extensions') || []).includes(
'ironic'
);
beforeEach(() => {
cy.loginAdmin(listUrl);
});
it('successfully create', () => {
cy.clickHeaderButton(1)
.wait(2000)
.formInput('name', name)
.formSelect('driver')
.clickStepActionNextButton()
.wait(2000)
.formSelect('driver_info_deploy_kernel')
.formSelect('driver_info_deploy_ramdisk')
.formInput('driver_info_ipmi_address', ip)
.formInput('driver_info_ipmi_username', username)
.formInput('driver_info_ipmi_password', password)
.clickStepActionNextButton()
.wait(2000)
.clickStepActionNextButton()
.waitFormLoading()
.url()
.should('include', listUrl)
.closeNotice();
});
it('successfully detail', () => {
cy.tableSimpleSearchText(nodeName)
.checkTableFirstRow(nodeName)
.goToDetail();
cy.checkDetailName(nodeName);
cy.clickDetailTab('Ports', 'ports').clickDetailTab(
'Port Groups',
'portGroups'
);
cy.goBackToList(listUrl);
});
it('successfully power on', () => {
cy.tableSimpleSearchText('power off')
.wait(2000)
.clickConfirmActionInMore('Power On')
.wait(10000)
.waitStatusActiveByRefresh();
});
it('successfully power off', () => {
cy.tableSimpleSearchText('power on')
.wait(2000)
.clickConfirmActionInMore('Power Off')
.wait(10000);
});
it('successfully auto inspect', () => {
cy.tableSimpleSearchText(nodeName).clickConfirmActionInMore('Auto Inspect');
});
it('successfully enter maintenace mode', () => {
cy.tableSimpleSearchText(nodeName)
.clickActionInMore('Enter Maintenance Mode')
.formText('reason', 'Enter Maintenance Mode')
.clickModalActionSubmitButton()
.wait(10000);
});
it('successfully leave maintenace mode', () => {
cy.tableSimpleSearchText(nodeName).clickConfirmActionInMore(
'Leave Maintenance Mode'
);
});
it('successfully set boot device', () => {
cy.tableSimpleSearchText(nodeName)
.clickActionInMore('Set Boot Device')
.wait(5000)
.formSelect('boot_device', 'pxe')
.clickModalActionSubmitButton();
});
it('successfully create port group', () => {
cy.tableSimpleSearchText(name)
.clickActionInMore('Create Port Group')
.formInput('name', portGroupName)
.formInput('address', macPortGroup)
.clickModalActionSubmitButton()
.wait(60000);
});
it('successfully create port', () => {
cy.tableSimpleSearchText(name)
.clickActionInMore('Create Port')
.wait(5000)
.formInput('address', macPort)
.clickModalActionSubmitButton()
.wait(60000);
});
it('successfully edit port', () => {
cy.tableSimpleSearchText(name)
.goToDetail()
.clickDetailTab('Ports')
.clickFirstActionButton()
.formInput('address', macPort2)
.clickModalActionSubmitButton()
.wait(60000);
});
it('successfully delete port', () => {
cy.tableSimpleSearchText(name)
.goToDetail()
.clickDetailTab('Ports')
.clickConfirmActionButton('Delete')
.wait(60000);
});
it('successfully edit port group', () => {
cy.tableSimpleSearchText(name)
.goToDetail()
.clickDetailTab('Port Groups')
.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();
onlyOn(!ironicServiceEnabled, () => {
describe('Skip The Bare Metal Page', () => {
it('successfully skip', () => {});
});
});
describe('The Bare Metal Page', () => {
onlyOn(ironicServiceEnabled, () => {
const listUrl = bareMetalListUrl;
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(() => {
cy.loginAdmin(listUrl);
});
it('successfully create', () => {
cy.clickHeaderButton(1)
.wait(2000)
.formInput('name', name)
.formSelect('driver')
.clickStepActionNextButton()
.wait(2000)
.formSelect('driver_info_deploy_kernel')
.formSelect('driver_info_deploy_ramdisk')
.formInput('driver_info_ipmi_address', ip)
.formInput('driver_info_ipmi_username', username)
.formInput('driver_info_ipmi_password', password)
.clickStepActionNextButton()
.wait(2000)
.clickStepActionNextButton()
.waitFormLoading()
.url()
.should('include', listUrl)
.closeNotice();
});
it('successfully detail', () => {
cy.tableSimpleSearchText(nodeName)
.checkTableFirstRow(nodeName)
.goToDetail();
cy.checkDetailName(nodeName);
cy.clickDetailTab('Ports', 'ports').clickDetailTab(
'Port Groups',
'portGroups'
);
cy.goBackToList(listUrl);
});
it('successfully power on', () => {
cy.tableSimpleSearchText('power off')
.wait(2000)
.clickConfirmActionInMore('Power On')
.wait(10000)
.waitStatusActiveByRefresh();
});
it('successfully power off', () => {
cy.tableSimpleSearchText('power on')
.wait(2000)
.clickConfirmActionInMore('Power Off')
.wait(10000);
});
it('successfully auto inspect', () => {
cy.tableSimpleSearchText(nodeName).clickConfirmActionInMore(
'Auto Inspect'
);
});
it('successfully enter maintenace mode', () => {
cy.tableSimpleSearchText(nodeName)
.clickActionInMore('Enter Maintenance Mode')
.formText('reason', 'Enter Maintenance Mode')
.clickModalActionSubmitButton()
.wait(10000);
});
it('successfully leave maintenace mode', () => {
cy.tableSimpleSearchText(nodeName).clickConfirmActionInMore(
'Leave Maintenance Mode'
);
});
it('successfully set boot device', () => {
cy.tableSimpleSearchText(nodeName)
.clickActionInMore('Set Boot Device')
.wait(5000)
.formSelect('boot_device', 'pxe')
.clickModalActionSubmitButton();
});
it('successfully create port group', () => {
cy.tableSimpleSearchText(name)
.clickActionInMore('Create Port Group')
.formInput('name', portGroupName)
.formInput('address', macPortGroup)
.clickModalActionSubmitButton()
.wait(60000);
});
it('successfully create port', () => {
cy.tableSimpleSearchText(name)
.clickActionInMore('Create Port')
.wait(5000)
.formInput('address', macPort)
.clickModalActionSubmitButton()
.wait(60000);
});
it('successfully edit port', () => {
cy.tableSimpleSearchText(name)
.goToDetail()
.clickDetailTab('Ports')
.clickFirstActionButton()
.formInput('address', macPort2)
.clickModalActionSubmitButton()
.wait(60000);
});
it('successfully delete port', () => {
cy.tableSimpleSearchText(name)
.goToDetail()
.clickDetailTab('Ports')
.clickConfirmActionButton('Delete')
.wait(60000);
});
it('successfully edit port group', () => {
cy.tableSimpleSearchText(name)
.goToDetail()
.clickDetailTab('Port Groups')
.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
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { instanceListUrl } from '../../../support/constants';
describe('The Ironic Page', () => {
const listUrl = instanceListUrl;
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');
const ironicServiceEnabled = (Cypress.env('extensions') || []).includes(
'ironic'
);
beforeEach(() => {
cy.login(listUrl);
});
it('successfully prepair resource by admin', () => {
cy.loginAdmin().createIronicFlavor(flavorName);
});
it('successfully prepair resource', () => {
cy.createNetwork({ name: networkName });
cy.createRouter({ name: routerName, network: networkName });
cy.createFip();
});
it('successfully create', () => {
cy.clickHeaderButton(2)
.wait(5000)
.formTableSelect('flavor')
.formRadioChooseByLabel('image', imageType)
.formTableSelectBySearch('image', imageName)
.clickStepActionNextButton()
.wait(5000)
.formTableSelectBySearch('networkSelect', networkName)
.formTableSelectBySearch('securityGroup', 'default')
.wait(2000)
.clickStepActionNextButton()
.formInput('name', name)
.formRadioChoose('loginType', 1)
.formInput('password', password)
.formInput('confirmPassword', password)
.wait(2000)
.clickStepActionNextButton()
.wait(2000)
.clickStepActionNextButton()
.waitFormLoading()
.url()
.should('include', listUrl)
.closeNotice()
.waitStatusActiveByRefresh();
});
it('successfully detail', () => {
cy.tableSearchText(name).checkTableFirstRow(name).goToDetail();
cy.checkDetailName(name);
cy.clickDetailTab('Interface', 'interface')
.clickDetailTab('Floating IPs', 'floatingIps')
.clickDetailTab('Security Group', 'securityGroup');
cy.goBackToList(listUrl);
});
it('successfully lock', () => {
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Lock', 'Instance Status')
.wait(10000);
});
it('successfully unlock', () => {
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Unlock', 'Instance Status')
.wait(10000);
});
it('successfully stop', () => {
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Stop', 'Instance Status')
.wait(10000)
.tableSearchText(name)
.checkColumnValue(6, 'Shutoff')
.selectFirst()
.clickHeaderButtonByTitle('Stop')
.checkDisableAction(2000);
});
it('successfully start', () => {
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Start', 'Instance Status')
.waitStatusActive()
.checkColumnValue(6, 'Active')
.selectFirst()
.clickHeaderButtonByTitle('Start')
.checkDisableAction(2000);
});
it('successfully reboot', () => {
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Reboot', 'Instance Status')
.tableSearchText(name)
.waitStatusActiveByRefresh();
});
it('successfully attach interface', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Attach Interface', 'Related Resources')
.wait(5000)
.formTableSelect('network')
.clickModalActionSubmitButton();
});
it('successfully detach interface', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Detach Interface', 'Related Resources')
.wait(5000)
.formTableSelect('interfaces')
.clickModalActionSubmitButton();
});
it('successfully associate floating IP', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Associate Floating IP', 'Related Resources')
.wait(5000)
.formTableSelect('fixed_ip')
.wait(5000)
.formTableSelect('fip')
.clickModalActionCancelButton();
});
it('successfully disassociate floating ip', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Disassociate Floating Ip', 'Related Resources')
.wait(5000)
.formSelect('address')
.clickModalActionCancelButton();
});
it('successfully manage security group with cancel', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Manage Security Group', 'Related Resources')
.wait(5000)
.formTableSelect('port')
.wait(5000)
.clickModalActionCancelButton();
});
it('successfully rebuild ironic', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Rebuild Instance', 'Configuration Update')
.wait(5000)
.formTableSelect('image')
.clickModalActionSubmitButton()
.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');
onlyOn(!ironicServiceEnabled, () => {
describe('Skip The Ironic Page', () => {
it('successfully skip', () => {});
});
});
onlyOn(ironicServiceEnabled, () => {
describe('The Ironic Page', () => {
const listUrl = instanceListUrl;
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(() => {
cy.login(listUrl);
});
it('successfully prepair resource by admin', () => {
cy.loginAdmin().createIronicFlavor(flavorName);
});
it('successfully prepair resource', () => {
cy.createNetwork({ name: networkName });
cy.createRouter({ name: routerName, network: networkName });
cy.createFip();
});
it('successfully create', () => {
cy.clickHeaderButton(2)
.wait(5000)
.formTableSelect('flavor')
.formRadioChooseByLabel('image', imageType)
.formTableSelectBySearch('image', imageName)
.clickStepActionNextButton()
.wait(5000)
.formTableSelectBySearch('networkSelect', networkName)
.formTableSelectBySearch('securityGroup', 'default')
.wait(2000)
.clickStepActionNextButton()
.formInput('name', name)
.formRadioChoose('loginType', 1)
.formInput('password', password)
.formInput('confirmPassword', password)
.wait(2000)
.clickStepActionNextButton()
.wait(2000)
.clickStepActionNextButton()
.waitFormLoading()
.url()
.should('include', listUrl)
.closeNotice()
.waitStatusActiveByRefresh();
});
it('successfully detail', () => {
cy.tableSearchText(name).checkTableFirstRow(name).goToDetail();
cy.checkDetailName(name);
cy.clickDetailTab('Interface', 'interface')
.clickDetailTab('Floating IPs', 'floatingIps')
.clickDetailTab('Security Group', 'securityGroup');
cy.goBackToList(listUrl);
});
it('successfully lock', () => {
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Lock', 'Instance Status')
.wait(10000);
});
it('successfully unlock', () => {
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Unlock', 'Instance Status')
.wait(10000);
});
it('successfully stop', () => {
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Stop', 'Instance Status')
.wait(10000)
.tableSearchText(name)
.checkColumnValue(6, 'Shutoff')
.selectFirst()
.clickHeaderButtonByTitle('Stop')
.checkDisableAction(2000);
});
it('successfully start', () => {
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Start', 'Instance Status')
.waitStatusActive()
.checkColumnValue(6, 'Active')
.selectFirst()
.clickHeaderButtonByTitle('Start')
.checkDisableAction(2000);
});
it('successfully reboot', () => {
cy.tableSearchText(name)
.clickConfirmActionInMoreSub('Reboot', 'Instance Status')
.tableSearchText(name)
.waitStatusActiveByRefresh();
});
it('successfully attach interface', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Attach Interface', 'Related Resources')
.wait(5000)
.formTableSelect('network')
.clickModalActionSubmitButton();
});
it('successfully detach interface', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Detach Interface', 'Related Resources')
.wait(5000)
.formTableSelect('interfaces')
.clickModalActionSubmitButton();
});
it('successfully associate floating IP', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Associate Floating IP', 'Related Resources')
.wait(5000)
.formTableSelect('fixed_ip')
.wait(5000)
.formTableSelect('fip')
.clickModalActionCancelButton();
});
it('successfully disassociate floating ip', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Disassociate Floating Ip', 'Related Resources')
.wait(5000)
.formSelect('address')
.clickModalActionCancelButton();
});
it('successfully manage security group with cancel', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Manage Security Group', 'Related Resources')
.wait(5000)
.formTableSelect('port')
.wait(5000)
.clickModalActionCancelButton();
});
it('successfully rebuild ironic', () => {
cy.tableSearchText(name)
.clickActionInMoreSub('Rebuild Instance', 'Configuration Update')
.wait(5000)
.formTableSelect('image')
.clickModalActionSubmitButton()
.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
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { infoListUrl } from '../../../support/constants';
describe('The System Info Page', () => {
@ -26,6 +27,8 @@ describe('The System Info Page', () => {
const routerName = `e2e-router-for-neutronAgent-${uuid}`;
const networkName = `e2e-network-for-neutronAgent-${uuid}`;
const heatServiceEnabled = (Cypress.env('extensions') || []).includes('heat');
beforeEach(() => {
cy.loginAdmin(listUrl);
});
@ -150,8 +153,10 @@ describe('The System Info Page', () => {
.clickModalActionSubmitButton();
});
it('successfully orchestration services', () => {
cy.clickTab(orchestrationServicesTab, 'heatService');
onlyOn(heatServiceEnabled, () => {
it('successfully orchestration services', () => {
cy.clickTab(orchestrationServicesTab, 'heatService');
});
});
it('successfully delete related resources', () => {

View File

@ -12,111 +12,122 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { stackListUrl } from '../../../support/constants';
describe('The Stack Page', () => {
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}`;
const heatServiceEnabled = (Cypress.env('extensions') || []).includes('heat');
beforeEach(() => {
cy.login(listUrl);
});
it('successfully create', () => {
const volumeJson = {
name: volumeName,
};
cy.clickHeaderButton(1, 2000)
.formAttachFile('content', contentFile)
.formAttachFile('params', paramFile)
.clickStepActionNextButton()
.wait(2000)
.formInput('name', name)
.formJsonInput('volume_name_spec', volumeJson)
.clickStepActionNextButton()
.waitFormLoading()
.wait(5000)
.tableSearchSelectText('Name', name)
.waitStatusActiveByRefresh();
});
it('successfully detail', () => {
cy.tableSearchSelectText('Name', name)
.checkTableFirstRow(name)
.goToDetail()
.checkDetailName(name);
cy.clickDetailTab('Stack Resources', 'resource')
.clickDetailTab('Stack Events', 'event')
.clickDetailTab('YAML File', 'template');
cy.goBackToList(listUrl);
});
it('successfully link resource', () => {
cy.tableSearchSelectText('Name', name)
.checkTableFirstRow(name)
.goToDetail()
.checkDetailName(name);
cy.clickDetailTab('Stack Resources').goToDetail();
});
it('successfully update template', () => {
const volumeJson = {
name: volumeNameUpdate,
};
cy.tableSearchSelectText('Name', name)
.clickActionInMore('Update Template')
.wait(2000)
.formAttachFile('content', contentFile)
.formAttachFile('params', paramFile)
.clickStepActionNextButton()
.wait(2000)
.formJsonInput('volume_name_spec', volumeJson)
.clickStepActionNextButton()
.waitFormLoading()
.wait(5000)
.tableSearchSelectText('Name', name)
.waitStatusActiveByRefresh();
});
it('successfully delete', () => {
cy.tableSearchSelectText('Name', name)
.clickConfirmActionInFirst()
.wait(10000);
});
it('successfully create for abandon', () => {
const volumeJson = {
name: volumeNameAbandon,
};
cy.clickHeaderButton(1, 2000)
.formAttachFile('content', contentFile)
.formAttachFile('params', paramFile)
.clickStepActionNextButton()
.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);
onlyOn(!heatServiceEnabled, () => {
describe('Skip The Stack Page', () => {
it('successfully skip', () => {});
});
});
onlyOn(heatServiceEnabled, () => {
describe('The Stack Page', () => {
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(() => {
cy.login(listUrl);
});
it('successfully create', () => {
const volumeJson = {
name: volumeName,
};
cy.clickHeaderButton(1, 2000)
.formAttachFile('content', contentFile)
.formAttachFile('params', paramFile)
.clickStepActionNextButton()
.wait(2000)
.formInput('name', name)
.formJsonInput('volume_name_spec', volumeJson)
.clickStepActionNextButton()
.waitFormLoading()
.wait(5000)
.tableSearchSelectText('Name', name)
.waitStatusActiveByRefresh();
});
it('successfully detail', () => {
cy.tableSearchSelectText('Name', name)
.checkTableFirstRow(name)
.goToDetail()
.checkDetailName(name);
cy.clickDetailTab('Stack Resources', 'resource')
.clickDetailTab('Stack Events', 'event')
.clickDetailTab('YAML File', 'template');
cy.goBackToList(listUrl);
});
it('successfully link resource', () => {
cy.tableSearchSelectText('Name', name)
.checkTableFirstRow(name)
.goToDetail()
.checkDetailName(name);
cy.clickDetailTab('Stack Resources').goToDetail();
});
it('successfully update template', () => {
const volumeJson = {
name: volumeNameUpdate,
};
cy.tableSearchSelectText('Name', name)
.clickActionInMore('Update Template')
.wait(2000)
.formAttachFile('content', contentFile)
.formAttachFile('params', paramFile)
.clickStepActionNextButton()
.wait(2000)
.formJsonInput('volume_name_spec', volumeJson)
.clickStepActionNextButton()
.waitFormLoading()
.wait(5000)
.tableSearchSelectText('Name', name)
.waitStatusActiveByRefresh();
});
it('successfully delete', () => {
cy.tableSearchSelectText('Name', name)
.clickConfirmActionInFirst()
.wait(10000);
});
it('successfully create for abandon', () => {
const volumeJson = {
name: volumeNameAbandon,
};
cy.clickHeaderButton(1, 2000)
.formAttachFile('content', contentFile)
.formAttachFile('params', paramFile)
.clickStepActionNextButton()
.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
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { fipListUrl, instanceListUrl } from '../../../support/constants';
describe('The Floating IP Page', () => {
@ -21,13 +22,18 @@ describe('The Floating IP Page', () => {
const networkName = `e2e-network-for-fip-${uuid}`;
const instanceName = `e2e-instance-for-fip-${uuid}`;
const routerName = `e2e-router-for-fip-${uuid}`;
const qosServiceEnabled = (Cypress.env('extensions') || []).includes(
'neutron::qos'
);
beforeEach(() => {
cy.login(listUrl);
});
it('successfully prepair resource by admin', () => {
cy.loginAdmin().wait(5000).createNetworkPolicy({ name: policyName });
onlyOn(qosServiceEnabled, () => {
it('successfully prepair resource by admin', () => {
cy.loginAdmin().wait(5000).createNetworkPolicy({ name: policyName });
});
});
it('successfully prepair resource', () => {
@ -84,14 +90,25 @@ describe('The Floating IP Page', () => {
.clickConfirmActionInMore('Disassociate');
});
it('successfully edit', () => {
cy.clickFirstActionButton()
.formText('description', 'description')
.formTabClick('qos_policy_id', 1)
.wait(5000)
.formTableSelectBySearch('qos_policy_id', policyName)
.clickModalActionSubmitButton()
.wait(2000);
onlyOn(!qosServiceEnabled, () => {
it('successfully edit with qos', () => {
cy.clickFirstActionButton()
.formText('description', 'description')
.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', () => {
@ -105,6 +122,8 @@ describe('The Floating IP Page', () => {
cy.deleteRouter(routerName, networkName);
cy.deleteAll('network', networkName);
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
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { lbListUrl } from '../../../support/constants';
describe('The LB Page', () => {
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 lbServiceEnabled = (Cypress.env('extensions') || []).includes('octavia');
const listener2 = `e2e-listener2-${uuid}`;
const pool2 = `e2e-pool2-${uuid}`;
const port = 55;
const port2 = 56;
const networkName = `e2e-network-for-lb-${uuid}`;
const routerName = `e2e-router-for-lb-${uuid}`;
beforeEach(() => {
cy.login(listUrl);
});
it('successfully prepair resource', () => {
cy.createNetwork({ name: networkName });
cy.createRouter({ name: routerName, network: networkName });
cy.createFip();
});
it('successfully create lb', () => {
cy.clickHeaderButton(1)
.wait(5000)
.formInput('name', name)
.formText('description', name)
.formTableSelectBySearch('vip_network_id', networkName)
.wait(5000)
.formButtonClick('vip_address')
.formSelect('vip_address')
.clickStepActionNextButton();
cy.formInput('listener_name', listener)
.formText('listener_description', listener)
.formSelect('listener_protocol')
.formInput('listener_protocol_port', port)
.clickStepActionNextButton();
cy.formInput('pool_name', pool)
.formText('pool_description', pool)
.formSelect('pool_lb_algorithm')
.formSelect('pool_protocol')
.clickStepActionNextButton();
cy.wait(5000).clickStepActionNextButton();
cy.formInput('health_name', health)
.formSelect('health_type')
.clickStepActionNextButton()
.waitFormLoading()
.url()
.should('include', listUrl)
.closeNotice()
.wait(5000)
.tableSearchText(name)
.waitStatusActiveByRefresh();
});
it('successfully detail', () => {
cy.tableSearchText(name).goToDetail(1, 2000).goBackToList(listUrl);
});
it('successfully edit', () => {
cy.tableSearchText(name)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton()
.waitStatusActiveByRefresh();
});
it('successfully associate fip', () => {
cy.tableSearchText(name)
.clickActionInMore('Associate Floating IP')
.formTableSelect('fixed_ip')
.formTableSelect('fip')
.clickModalActionSubmitButton()
.waitStatusActiveByRefresh();
});
it('successfully disassociate fip', () => {
cy.tableSearchText(name)
.clickConfirmActionInMore('Disassociate Floating IP')
.waitStatusActiveByRefresh();
});
it('successfully create listener', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.clickHeaderButton(1)
.formInput('name', listener2)
.formText('description', listener2)
.formSelect('protocol')
.formInput('protocol_port', port2)
.clickModalActionSubmitButton();
});
it('successfully edit listener', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully edit listener health monitor', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.clickActionInMore('Edit Health Monitor')
.formRadioChoose('admin_state_up', 1)
.clickModalActionSubmitButton()
.tableSearchText(listener)
.waitStatusActiveByRefresh();
});
it('successfully edit listener default pool', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.clickActionInMore('Edit Default Pool')
.formText('description', 'description')
.clickModalActionSubmitButton()
.tableSearchText(listener)
.waitStatusActiveByRefresh();
});
it('successfully delete listener default pool', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.clickConfirmActionInMore('Delete Default Pool')
.tableSearchText(listener)
.waitStatusActiveByRefresh();
});
it('successfully create listener default pool', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.clickActionInMore('Create Default Pool')
.formInput('name', pool2)
.formText('description', pool2)
.formSelect('lb_algorithm')
.formSelect('protocol')
.clickModalActionSubmitButton()
.tableSearchText(listener)
.waitStatusActiveByRefresh();
});
it('successfully listener detail', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.goToDetail(0, 2000)
.clickDetailTab('Member', 'members');
});
it('successfully create listener member', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.goToDetail(0, 2000)
.clickDetailTab('Member')
.clickHeaderButton(1)
.formButtonClick('extMembers')
.get('.ant-form-item')
.eq(1)
.find('.ant-input-number-input')
.first()
.type(port2)
.clickModalActionSubmitButton()
.waitStatusActiveByRefresh();
});
it('successfully edit listener member', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.goToDetail(0, 2000)
.clickDetailTab('Member')
.clickFirstActionButton()
.wait(2000)
.formInput('weight', 2)
.clickModalActionSubmitButton()
.waitStatusActiveByRefresh();
});
it('successfully delete listener member', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.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');
onlyOn(!lbServiceEnabled, () => {
describe('Skip The LB Page', () => {
it('successfully skip', () => {});
});
});
onlyOn(lbServiceEnabled, () => {
describe('The LB Page', () => {
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}`;
const pool2 = `e2e-pool2-${uuid}`;
const port = 55;
const port2 = 56;
const networkName = `e2e-network-for-lb-${uuid}`;
const routerName = `e2e-router-for-lb-${uuid}`;
beforeEach(() => {
cy.login(listUrl);
});
it('successfully prepair resource', () => {
cy.createNetwork({ name: networkName });
cy.createRouter({ name: routerName, network: networkName });
cy.createFip();
});
it('successfully create lb', () => {
cy.clickHeaderButton(1)
.wait(5000)
.formInput('name', name)
.formText('description', name)
.formTableSelectBySearch('vip_network_id', networkName)
.wait(5000)
.formButtonClick('vip_address')
.formSelect('vip_address')
.clickStepActionNextButton();
cy.formInput('listener_name', listener)
.formText('listener_description', listener)
.formSelect('listener_protocol')
.formInput('listener_protocol_port', port)
.clickStepActionNextButton();
cy.formInput('pool_name', pool)
.formText('pool_description', pool)
.formSelect('pool_lb_algorithm')
.formSelect('pool_protocol')
.clickStepActionNextButton();
cy.wait(5000).clickStepActionNextButton();
cy.formInput('health_name', health)
.formSelect('health_type')
.clickStepActionNextButton()
.waitFormLoading()
.url()
.should('include', listUrl)
.closeNotice()
.wait(5000)
.tableSearchText(name)
.waitStatusActiveByRefresh();
});
it('successfully detail', () => {
cy.tableSearchText(name).goToDetail(1, 2000).goBackToList(listUrl);
});
it('successfully edit', () => {
cy.tableSearchText(name)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton()
.waitStatusActiveByRefresh();
});
it('successfully associate fip', () => {
cy.tableSearchText(name)
.clickActionInMore('Associate Floating IP')
.formTableSelect('fixed_ip')
.formTableSelect('fip')
.clickModalActionSubmitButton()
.waitStatusActiveByRefresh();
});
it('successfully disassociate fip', () => {
cy.tableSearchText(name)
.clickConfirmActionInMore('Disassociate Floating IP')
.waitStatusActiveByRefresh();
});
it('successfully create listener', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.clickHeaderButton(1)
.formInput('name', listener2)
.formText('description', listener2)
.formSelect('protocol')
.formInput('protocol_port', port2)
.clickModalActionSubmitButton();
});
it('successfully edit listener', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully edit listener health monitor', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.clickActionInMore('Edit Health Monitor')
.formRadioChoose('admin_state_up', 1)
.clickModalActionSubmitButton()
.tableSearchText(listener)
.waitStatusActiveByRefresh();
});
it('successfully edit listener default pool', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.clickActionInMore('Edit Default Pool')
.formText('description', 'description')
.clickModalActionSubmitButton()
.tableSearchText(listener)
.waitStatusActiveByRefresh();
});
it('successfully delete listener default pool', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.clickConfirmActionInMore('Delete Default Pool')
.tableSearchText(listener)
.waitStatusActiveByRefresh();
});
it('successfully create listener default pool', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.clickActionInMore('Create Default Pool')
.formInput('name', pool2)
.formText('description', pool2)
.formSelect('lb_algorithm')
.formSelect('protocol')
.clickModalActionSubmitButton()
.tableSearchText(listener)
.waitStatusActiveByRefresh();
});
it('successfully listener detail', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.goToDetail(0, 2000)
.clickDetailTab('Member', 'members');
});
it('successfully create listener member', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.goToDetail(0, 2000)
.clickDetailTab('Member')
.clickHeaderButton(1)
.formButtonClick('extMembers')
.get('.ant-form-item')
.eq(1)
.find('.ant-input-number-input')
.first()
.type(port2)
.clickModalActionSubmitButton()
.waitStatusActiveByRefresh();
});
it('successfully edit listener member', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.goToDetail(0, 2000)
.clickDetailTab('Member')
.clickFirstActionButton()
.wait(2000)
.formInput('weight', 2)
.clickModalActionSubmitButton()
.waitStatusActiveByRefresh();
});
it('successfully delete listener member', () => {
cy.tableSearchText(name)
.goToDetail(1, 2000)
.tableSearchText(listener)
.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
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { policyListUrl } from '../../../support/constants';
describe('The Network Qos Policy Page', () => {
const listUrl = policyListUrl;
const name = `e2e-policy-${Cypress._.random(0, 1e6)}`;
const newname = `${name}-1`;
const qosServiceEnabled = (Cypress.env('extensions') || []).includes(
'neutron::qos'
);
beforeEach(() => {
cy.loginAdmin(listUrl);
});
it('successfully create', () => {
cy.clickHeaderButton(1)
.wait(2000)
.formInput('name', name)
.formText('description', name)
// .formSelect('project_id', 'admin')
.formSwitch('shared')
.clickModalActionSubmitButton();
});
it('successfully detail', () => {
cy.tableSearchText(name)
.checkTableFirstRow(name)
.goToDetail()
.checkDetailName(name);
cy.goBackToList(listUrl);
});
// egress
it('successfully create egress bandwidth limit rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Create Bandwidth Limit Rule')
.formSelect('direction', 'egress')
.clickModalActionSubmitButton();
});
it('successfully edit bandwidth egress limit rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Edit Bandwidth Egress Limit Rule')
.formInput('max_kbps', 2)
.clickModalActionSubmitButton();
});
it('successfully delete bandwidth egress limit rule', () => {
cy.tableSearchText(name).clickConfirmActionInMore(
'Delete Bandwidth Egress Rules'
);
});
it('successfully create bandwidth ingress limit rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Create Bandwidth Limit Rule')
.formSelect('direction', 'ingress')
.clickModalActionSubmitButton();
});
it('successfully edit bandwidth ingress limit rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Edit Bandwidth Ingress Limit Rule')
.formInput('max_kbps', 2)
.clickModalActionSubmitButton();
});
it('successfully delete bandwidth ingress limit rule', () => {
cy.tableSearchText(name).clickConfirmActionInMore(
'Delete Bandwidth Ingress Rules'
);
});
it('successfully create DSCP marking rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Create DSCP Marking Rule')
.clickModalActionSubmitButton();
});
it('successfully edit DSCP marking rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Edit DSCP Marking Rule')
.formSelect('dscp_mark', 8)
.clickModalActionSubmitButton();
});
it('successfully delete DSCP marking rule', () => {
cy.tableSearchText(name).clickConfirmActionInMore(
'Delete DSCP Marking Rules'
);
});
it('successfully edit', () => {
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();
onlyOn(!qosServiceEnabled, () => {
describe('Skip The Network Qos Policy Page', () => {
it('successfully skip', () => {});
});
});
onlyOn(qosServiceEnabled, () => {
describe('The Network Qos Policy Page', () => {
const listUrl = policyListUrl;
const name = `e2e-policy-${Cypress._.random(0, 1e6)}`;
const newname = `${name}-1`;
beforeEach(() => {
cy.loginAdmin(listUrl);
});
it('successfully create', () => {
cy.clickHeaderButton(1)
.wait(2000)
.formInput('name', name)
.formText('description', name)
// .formSelect('project_id', 'admin')
.formSwitch('shared')
.clickModalActionSubmitButton();
});
it('successfully detail', () => {
cy.tableSearchText(name)
.checkTableFirstRow(name)
.goToDetail()
.checkDetailName(name);
cy.goBackToList(listUrl);
});
// egress
it('successfully create egress bandwidth limit rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Create Bandwidth Limit Rule')
.formSelect('direction', 'egress')
.clickModalActionSubmitButton();
});
it('successfully edit bandwidth egress limit rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Edit Bandwidth Egress Limit Rule')
.formInput('max_kbps', 2)
.clickModalActionSubmitButton();
});
it('successfully delete bandwidth egress limit rule', () => {
cy.tableSearchText(name).clickConfirmActionInMore(
'Delete Bandwidth Egress Rules'
);
});
it('successfully create bandwidth ingress limit rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Create Bandwidth Limit Rule')
.formSelect('direction', 'ingress')
.clickModalActionSubmitButton();
});
it('successfully edit bandwidth ingress limit rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Edit Bandwidth Ingress Limit Rule')
.formInput('max_kbps', 2)
.clickModalActionSubmitButton();
});
it('successfully delete bandwidth ingress limit rule', () => {
cy.tableSearchText(name).clickConfirmActionInMore(
'Delete Bandwidth Ingress Rules'
);
});
it('successfully create DSCP marking rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Create DSCP Marking Rule')
.clickModalActionSubmitButton();
});
it('successfully edit DSCP marking rule', () => {
cy.tableSearchText(name)
.clickActionInMore('Edit DSCP Marking Rule')
.formSelect('dscp_mark', 8)
.clickModalActionSubmitButton();
});
it('successfully delete DSCP marking rule', () => {
cy.tableSearchText(name).clickConfirmActionInMore(
'Delete DSCP Marking Rules'
);
});
it('successfully edit', () => {
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
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { virtualAdapterListUrl } from '../../../support/constants';
describe('The Virtual Adapter Page', () => {
@ -24,13 +25,18 @@ describe('The Virtual Adapter Page', () => {
const networkName = `e2e-network-for-virtual-adapter-${uuid}`;
const instanceName = `e2e-instance-for-virtual-adapter-${uuid}`;
const routerName = `e2e-router-for-virtual-adapter-${uuid}`;
const qosServiceEnabled = (Cypress.env('extensions') || []).includes(
'neutron::qos'
);
beforeEach(() => {
cy.login(listUrl);
});
it('successfully prepair resource by admin', () => {
cy.loginAdmin().wait(5000).createNetworkPolicy({ name: policyName });
onlyOn(qosServiceEnabled, () => {
it('successfully prepair resource by admin', () => {
cy.loginAdmin().wait(5000).createNetworkPolicy({ name: policyName });
});
});
it('successfully prepair resource', () => {
@ -115,15 +121,17 @@ describe('The Virtual Adapter Page', () => {
cy.tableSearchText(name).clickConfirmActionInMore('Detach');
});
it('successfully modify qos', () => {
cy.tableSearchText(name)
.clickActionInMore('Modify QoS')
.wait(5000)
.formSwitch('enableQosPolicy')
.formTabClick('qos_policy_id', 1)
.wait(2000)
.formTableSelectBySearch('qos_policy_id', policyName)
.clickModalActionSubmitButton();
onlyOn(qosServiceEnabled, () => {
it('successfully modify qos', () => {
cy.tableSearchText(name)
.clickActionInMore('Modify QoS')
.wait(5000)
.formSwitch('enableQosPolicy')
.formTabClick('qos_policy_id', 1)
.wait(2000)
.formTableSelectBySearch('qos_policy_id', policyName)
.clickModalActionSubmitButton();
});
});
it('successfully manage security group', () => {
@ -180,6 +188,8 @@ describe('The Virtual Adapter Page', () => {
cy.deleteAll('network', networkName);
cy.deleteAll('fip');
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
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { vpnListUrl } from '../../../support/constants';
describe('The VPN Page', () => {
const listUrl = vpnListUrl;
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 vpnServiceEnabled = (Cypress.env('extensions') || []).includes(
'neutron::vpn'
);
const cidr = '192.168.0.0/24';
const networkName = `e2e-network-for-vpn-${uuid}`;
const routerName = `e2e-router-for-vpn-${uuid}`;
beforeEach(() => {
cy.login(listUrl);
});
it('successfully prepair resource', () => {
cy.createNetwork({ name: networkName });
cy.createRouter({ name: routerName, network: networkName });
});
it('successfully create gateway', () => {
cy.clickHeaderButton(1)
.formInput('name', gateway)
.formText('description', gateway)
.formTableSelectBySearch('router_id', routerName)
.clickModalActionSubmitButton();
});
it('successfully create local endpoint', () => {
cy.clickTab('VPN EndPoint Group', 'vpn_endpoint_groups')
.clickHeaderButton(1)
.wait(5000)
.formInput('name', endpointLocal)
.formText('description', endpointLocal)
.formSelect('type', 'Local')
.formTableSelectBySearch('router_id', routerName)
.wait(5000)
.formTableSelect('subnet_id')
.clickModalActionSubmitButton();
});
it('successfully create peer endpoint', () => {
cy.clickTab('VPN EndPoint Group', 'vpn_endpoint_groups')
.clickHeaderButton(1)
.formInput('name', endpointPeer)
.formText('description', endpointPeer)
.formSelect('type', 'Peer')
.wait(2000)
.formText('endpoints', cidr)
.clickModalActionSubmitButton();
});
it('successfully create ike policy', () => {
cy.clickTab('IKE Policy', 'ike_policy')
.clickHeaderButton(1)
.formInput('name', ikePolicy)
.formText('description', ikePolicy)
.clickModalActionSubmitButton();
});
it('successfully create ipsec policy', () => {
cy.clickTab('IPsec Policy', 'ipsec_policy')
.clickHeaderButton(1)
.formInput('name', ipsecPolicy)
.formText('description', ipsecPolicy)
.clickModalActionSubmitButton();
});
it('successfully create vpn tunnel', () => {
cy.clickTab('VPN Tunnel', 'ipsec_connections')
.clickHeaderButton(1)
.wait(5000)
.formInput('name', tunnel)
.formText('description', tunnel)
.formSelect('vpnservice_id', gateway)
.formSelect('ikepolicy_id', ikePolicy)
.formSelect('ipsecpolicy_id', ipsecPolicy)
.formSelect('local_ep_group_id', endpointLocal)
.wait(2000)
.formInput('peer_address', '192.168.1.1')
.formSelect('peer_ep_group_id', endpointPeer)
.formInput('password', 'passW0rd')
.formInput('confirmPassword', 'passW0rd')
.formButtonClick('more')
.clickModalActionSubmitButton();
});
it('successfully detail vpn tunnel', () => {
cy.clickTab('VPN Tunnel', 'ipsec_connections').tableSearchText(tunnel);
cy.goToDetail().wait(30000);
cy.goBackToList(listUrl);
});
it('successfully edit tunnel', () => {
cy.clickTab('VPN Tunnel')
.tableSearchText(tunnel)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully delete tunnel', () => {
cy.clickTab('VPN Tunnel')
.tableSearchText(tunnel)
.clickConfirmActionButton('Delete');
});
it('successfully edit ipsec policy', () => {
cy.clickTab('IPsec Policy')
.tableSearchText(ipsecPolicy)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully delete ipsec policy', () => {
cy.clickTab('IPsec Policy')
.tableSearchText(ipsecPolicy)
.clickConfirmActionButton('Delete');
});
it('successfully edit ike policy', () => {
cy.clickTab('IKE Policy')
.tableSearchText(ikePolicy)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully delete ike policy', () => {
cy.clickTab('IKE Policy')
.tableSearchText(ikePolicy)
.clickConfirmActionButton('Delete');
});
it('successfully edit endpoint', () => {
cy.clickTab('VPN EndPoint Group')
.tableSearchText(endpointLocal)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully delete endpoint', () => {
cy.clickTab('VPN EndPoint Group')
.tableSearchText(endpointLocal)
.clickConfirmActionButton('Delete')
.wait(5000)
.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);
onlyOn(!vpnServiceEnabled, () => {
describe('The VPN Page', () => {
it('successfully skip', () => {});
});
});
onlyOn(vpnServiceEnabled, () => {
describe('The VPN Page', () => {
const listUrl = vpnListUrl;
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';
const networkName = `e2e-network-for-vpn-${uuid}`;
const routerName = `e2e-router-for-vpn-${uuid}`;
beforeEach(() => {
cy.login(listUrl);
});
it('successfully prepair resource', () => {
cy.createNetwork({ name: networkName });
cy.createRouter({ name: routerName, network: networkName });
});
it('successfully create gateway', () => {
cy.clickHeaderButton(1)
.formInput('name', gateway)
.formText('description', gateway)
.formTableSelectBySearch('router_id', routerName)
.clickModalActionSubmitButton();
});
it('successfully create local endpoint', () => {
cy.clickTab('VPN EndPoint Group', 'vpn_endpoint_groups')
.clickHeaderButton(1)
.wait(5000)
.formInput('name', endpointLocal)
.formText('description', endpointLocal)
.formSelect('type', 'Local')
.formTableSelectBySearch('router_id', routerName)
.wait(5000)
.formTableSelect('subnet_id')
.clickModalActionSubmitButton();
});
it('successfully create peer endpoint', () => {
cy.clickTab('VPN EndPoint Group', 'vpn_endpoint_groups')
.clickHeaderButton(1)
.formInput('name', endpointPeer)
.formText('description', endpointPeer)
.formSelect('type', 'Peer')
.wait(2000)
.formText('endpoints', cidr)
.clickModalActionSubmitButton();
});
it('successfully create ike policy', () => {
cy.clickTab('IKE Policy', 'ike_policy')
.clickHeaderButton(1)
.formInput('name', ikePolicy)
.formText('description', ikePolicy)
.clickModalActionSubmitButton();
});
it('successfully create ipsec policy', () => {
cy.clickTab('IPsec Policy', 'ipsec_policy')
.clickHeaderButton(1)
.formInput('name', ipsecPolicy)
.formText('description', ipsecPolicy)
.clickModalActionSubmitButton();
});
it('successfully create vpn tunnel', () => {
cy.clickTab('VPN Tunnel', 'ipsec_connections')
.clickHeaderButton(1)
.wait(5000)
.formInput('name', tunnel)
.formText('description', tunnel)
.formSelect('vpnservice_id', gateway)
.formSelect('ikepolicy_id', ikePolicy)
.formSelect('ipsecpolicy_id', ipsecPolicy)
.formSelect('local_ep_group_id', endpointLocal)
.wait(2000)
.formInput('peer_address', '192.168.1.1')
.formSelect('peer_ep_group_id', endpointPeer)
.formInput('password', 'passW0rd')
.formInput('confirmPassword', 'passW0rd')
.formButtonClick('more')
.clickModalActionSubmitButton();
});
it('successfully detail vpn tunnel', () => {
cy.clickTab('VPN Tunnel', 'ipsec_connections').tableSearchText(tunnel);
cy.goToDetail().wait(30000);
cy.goBackToList(listUrl);
});
it('successfully edit tunnel', () => {
cy.clickTab('VPN Tunnel')
.tableSearchText(tunnel)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully delete tunnel', () => {
cy.clickTab('VPN Tunnel')
.tableSearchText(tunnel)
.clickConfirmActionButton('Delete');
});
it('successfully edit ipsec policy', () => {
cy.clickTab('IPsec Policy')
.tableSearchText(ipsecPolicy)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully delete ipsec policy', () => {
cy.clickTab('IPsec Policy')
.tableSearchText(ipsecPolicy)
.clickConfirmActionButton('Delete');
});
it('successfully edit ike policy', () => {
cy.clickTab('IKE Policy')
.tableSearchText(ikePolicy)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully delete ike policy', () => {
cy.clickTab('IKE Policy')
.tableSearchText(ikePolicy)
.clickConfirmActionButton('Delete');
});
it('successfully edit endpoint', () => {
cy.clickTab('VPN EndPoint Group')
.tableSearchText(endpointLocal)
.clickFirstActionButton()
.formText('description', 'description')
.clickModalActionSubmitButton();
});
it('successfully delete endpoint', () => {
cy.clickTab('VPN EndPoint Group')
.tableSearchText(endpointLocal)
.clickConfirmActionButton('Delete')
.wait(5000)
.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
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { backupListUrl, volumeListUrl } from '../../../support/constants';
describe('The Volume Backup Page', () => {
const listUrl = backupListUrl;
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`;
const backupServiceEnabled = (Cypress.env('extensions') || []).includes(
'cinder::buckup'
);
beforeEach(() => {
cy.login(listUrl);
});
it('successfully prepair resource', () => {
cy.createVolume(volumeName);
});
it('successfully create full bakcup', () => {
cy.clickHeaderButton(1, 5000)
.formInput('name', name)
.formTableSelectBySearch('volume', volumeName)
.clickModalActionSubmitButton()
.wait(5000)
.waitTableLoading();
cy.wait(30000);
});
it('successfully create increment bakcup', () => {
cy.clickHeaderButton(1, 5000)
.formInput('name', nameInc)
.formRadioChoose('incremental', 1)
.formTableSelectBySearch('volume', volumeName)
.clickModalActionSubmitButton()
.wait(5000)
.waitTableLoading();
});
it('successfully detail', () => {
cy.tableSearchText(name).goToDetail().checkDetailName(name);
cy.goBackToList(listUrl);
cy.visitPage(volumeListUrl)
.tableSearchText(volumeName)
.goToDetail()
.clickDetailTab('Backup', 'backup');
});
it('successfully restore by backup', () => {
cy.tableSearchText(name)
.clickActionInMore('Restore Backup')
.wait(5000)
.formTableSelect('backup')
.clickModalActionSubmitButton()
.wait(30000);
});
it('successfully create volume by backup', () => {
cy.tableSearchText(name)
.clickActionInMore('Create Volume')
.wait(5000)
.formInput('name', volumeNameByBackup)
.formSelect('volume_type')
.formSelect('availability_zone')
.clickModalActionSubmitButton();
});
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);
onlyOn(!backupServiceEnabled, () => {
describe('Skip The Volume Backup Page', () => {
it('successfully skip', () => {});
});
});
onlyOn(backupServiceEnabled, () => {
describe('The Volume Backup Page', () => {
const listUrl = backupListUrl;
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(() => {
cy.login(listUrl);
});
it('successfully prepair resource', () => {
cy.createVolume(volumeName);
});
it('successfully create full bakcup', () => {
cy.clickHeaderButton(1, 5000)
.formInput('name', name)
.formTableSelectBySearch('volume', volumeName)
.clickModalActionSubmitButton()
.wait(5000)
.waitTableLoading();
cy.tableSearchText(name).waitStatusTextByFresh('Available');
});
it('successfully create increment bakcup', () => {
cy.clickHeaderButton(1, 5000)
.formInput('name', nameInc)
.formRadioChoose('incremental', 1)
.formTableSelectBySearch('volume', volumeName)
.clickModalActionSubmitButton()
.wait(5000)
.waitTableLoading();
cy.tableSearchText(nameInc).waitStatusTextByFresh('Available');
});
it('successfully detail', () => {
cy.tableSearchText(name).goToDetail().checkDetailName(name);
cy.goBackToList(listUrl);
cy.visitPage(volumeListUrl)
.tableSearchText(volumeName)
.goToDetail()
.clickDetailTab('Backup', 'backup');
});
it('successfully restore by backup', () => {
cy.tableSearchText(name)
.clickActionInMore('Restore Backup')
.wait(5000)
.formTableSelect('backup')
.clickModalActionSubmitButton()
.wait(30000);
});
it('successfully create volume by backup', () => {
cy.tableSearchText(name)
.clickActionInMore('Create Volume')
.wait(5000)
.formInput('name', volumeNameByBackup)
.formSelect('volume_type')
.formSelect('availability_zone')
.clickModalActionSubmitButton();
});
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
// limitations under the License.
import { onlyOn } from '@cypress/skip-test';
import { volumeListUrl, volumeTypeListUrl } from '../../../support/constants';
describe('The Volume Page', () => {
@ -32,6 +33,10 @@ describe('The Volume Page', () => {
const networkName = `e2e-network-for-volume-${uuid}`;
const instanceName = `e2e-instance-for-volume-${uuid}`;
const backupServiceEnabled = (Cypress.env('extensions') || []).includes(
'cinder::buckup'
);
beforeEach(() => {
cy.login(listUrl);
});
@ -96,25 +101,27 @@ describe('The Volume Page', () => {
cy.deleteAll('volumeSnapshot', snapshotName);
});
it('successfully create backup', () => {
cy.tableSearchText(name)
.clickActionInMore('Create Backup')
.formInput('name', backupName)
.clickModalActionSubmitButton()
.tableSearchText(name)
.waitStatusActiveByRefresh();
});
onlyOn(backupServiceEnabled, () => {
it('successfully create backup', () => {
cy.tableSearchText(name)
.clickActionInMore('Create Backup')
.formInput('name', backupName)
.clickModalActionSubmitButton()
.tableSearchText(name)
.waitStatusActiveByRefresh();
});
it('successfully create backup inc', () => {
cy.tableSearchText(name)
.clickActionInMore('Create Backup')
.formInput('name', backupIncName)
.formRadioChoose('incremental', 1)
.clickModalActionSubmitButton()
.tableSearchText(name)
.waitStatusActive();
cy.deleteAll('backup', backupIncName);
cy.wait(5000).deleteAll('backup', backupName);
it('successfully create backup inc', () => {
cy.tableSearchText(name)
.clickActionInMore('Create Backup')
.formInput('name', backupIncName)
.formRadioChoose('incremental', 1)
.clickModalActionSubmitButton()
.tableSearchText(name)
.waitStatusActive();
cy.deleteAll('backup', backupIncName);
cy.wait(5000).deleteAll('backup', backupName);
});
});
it('successfully clone volume', () => {

View File

@ -1550,6 +1550,11 @@
tunnel-agent "^0.6.0"
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":
version "1.2.4"
resolved "https://registry.yarnpkg.com/@cypress/xvfb/-/xvfb-1.2.4.tgz#2daf42e8275b39f4aa53c14214e557bd14e7748a"