test: Fix e2e case
1. Fix flavor case: require flavor types 2. Fix keypaire case: delete keypair created by file 3. Fix security group case: fix delete 4. Fix instance case: fix delete volume twice, wait longer for attaching volume 5. Fix virtual adapter case: fix disassociate floating IP in detail page 6. Fix fip case: remove edit case until front-end fix fip edit with qos service enabled 7. Fix volume case: wait longer for delete instance 8. Fix image case: fix disk format select value when create image 9. Fix server group case: wait longer after delete instance when delete server group 10. Update image config: support image file when download failed to run image case successfully Change-Id: I8321f31086ad660d1fe950bedf144af7f008f6b1
This commit is contained in:
parent
74ee3ec2aa
commit
b3d0e1f83f
@ -9,6 +9,7 @@ env:
|
|||||||
userIsRegisted: true
|
userIsRegisted: true
|
||||||
imageName: cirros-0.5.2-x86_64-disk
|
imageName: cirros-0.5.2-x86_64-disk
|
||||||
imageType: Others
|
imageType: Others
|
||||||
|
imageFile: null
|
||||||
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:
|
extensions:
|
||||||
|
@ -22,6 +22,10 @@ describe('The Flavor Page', () => {
|
|||||||
cy.loginAdmin(listUrl);
|
cy.loginAdmin(listUrl);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('successfully prepair flavor types', () => {
|
||||||
|
cy.setAllFlavorType();
|
||||||
|
});
|
||||||
|
|
||||||
it('successfully list', () => {
|
it('successfully list', () => {
|
||||||
cy.clickTab('Custom', 'custom')
|
cy.clickTab('Custom', 'custom')
|
||||||
.clickTab('Heterogeneous Computing', 'heterogeneous_computing')
|
.clickTab('Heterogeneous Computing', 'heterogeneous_computing')
|
||||||
|
@ -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 {
|
import {
|
||||||
imageListUrl,
|
imageListUrl,
|
||||||
volumeListUrl,
|
volumeListUrl,
|
||||||
@ -24,16 +25,20 @@ describe('The Image Page', () => {
|
|||||||
const name = `e2e-image-${uuid}`;
|
const name = `e2e-image-${uuid}`;
|
||||||
const sharedImage = `e2e-image-shared-${uuid}`;
|
const sharedImage = `e2e-image-shared-${uuid}`;
|
||||||
const newname = `${name}-1`;
|
const newname = `${name}-1`;
|
||||||
const filename = `cirros-disk-${uuid}.qcow2`;
|
|
||||||
const volumeName = `e2e-volume-by-image-${uuid}`;
|
const volumeName = `e2e-volume-by-image-${uuid}`;
|
||||||
const downloadUrl = Cypress.env('imageDownloadUrl');
|
const downloadUrl = Cypress.env('imageDownloadUrl');
|
||||||
|
const imageFile = Cypress.env('imageFile');
|
||||||
|
const filename = imageFile || `cirros-disk-${uuid}.qcow2`;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login(listUrl);
|
cy.login(listUrl);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully download image', () => {
|
onlyOn(!imageFile, () => {
|
||||||
cy.downloadFile(downloadUrl, 'test/e2e/fixtures', filename);
|
it('successfully download image', () => {
|
||||||
|
cy.downloadFile(downloadUrl, 'test/e2e/fixtures', filename);
|
||||||
|
cy.wait(120000);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully list', () => {
|
it('successfully list', () => {
|
||||||
@ -46,9 +51,9 @@ describe('The Image Page', () => {
|
|||||||
.should('include', `${listUrl}/create`)
|
.should('include', `${listUrl}/create`)
|
||||||
.formInput('name', name)
|
.formInput('name', name)
|
||||||
.formAttachFile('file', filename)
|
.formAttachFile('file', filename)
|
||||||
.formSelect('disk_format', 'QCOW2 - QEMU Emulator')
|
.formSelect('disk_format', 'QCOW2 - QEMU image format')
|
||||||
.formSelect('os_distro', 'Others')
|
.formSelect('os_distro', 'Others')
|
||||||
.formInput('os_version', 'cirros-0.4.0-x86_64')
|
.formInput('os_version', 'cirros')
|
||||||
.formInput('os_admin_user', 'root')
|
.formInput('os_admin_user', 'root')
|
||||||
.formSelect('usage_type', 'Common Server')
|
.formSelect('usage_type', 'Common Server')
|
||||||
.formText('description', name)
|
.formText('description', name)
|
||||||
@ -68,9 +73,9 @@ describe('The Image Page', () => {
|
|||||||
.formInput('name', sharedImage)
|
.formInput('name', sharedImage)
|
||||||
.formTableSelectBySearch('owner', 'e2e')
|
.formTableSelectBySearch('owner', 'e2e')
|
||||||
.formAttachFile('file', filename)
|
.formAttachFile('file', filename)
|
||||||
.formSelect('disk_format', 'QCOW2 - QEMU Emulator')
|
.formSelect('disk_format', 'QCOW2 - QEMU image format')
|
||||||
.formSelect('os_distro', 'Others')
|
.formSelect('os_distro', 'Others')
|
||||||
.formInput('os_version', 'cirros-0.4.0-x86_64')
|
.formInput('os_version', 'cirros')
|
||||||
.formInput('os_admin_user', 'root')
|
.formInput('os_admin_user', 'root')
|
||||||
.formSelect('usage_type', 'Common Server')
|
.formSelect('usage_type', 'Common Server')
|
||||||
.formText('description', sharedImage)
|
.formText('description', sharedImage)
|
||||||
|
@ -198,7 +198,7 @@ describe('The Instance Page', () => {
|
|||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelectBySearch('volume', volumeName)
|
.formTableSelectBySearch('volume', volumeName)
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton()
|
||||||
.wait(5000);
|
.wait(30000);
|
||||||
|
|
||||||
// check attach successful
|
// check attach successful
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
@ -214,9 +214,6 @@ describe('The Instance Page', () => {
|
|||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelectBySearch('volumes', volumeName)
|
.formTableSelectBySearch('volumes', volumeName)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
|
|
||||||
// delete volume
|
|
||||||
cy.deleteAll('volume', volumeName);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully associate floating IP', () => {
|
it('successfully associate floating IP', () => {
|
||||||
@ -296,6 +293,5 @@ describe('The Instance Page', () => {
|
|||||||
cy.deleteRouter(routerName, networkName);
|
cy.deleteRouter(routerName, networkName);
|
||||||
cy.deleteAll('network', networkName);
|
cy.deleteAll('network', networkName);
|
||||||
cy.deleteAll('volume', volumeName);
|
cy.deleteAll('volume', volumeName);
|
||||||
cy.deleteAllAvailableVolume();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -52,5 +52,8 @@ describe('The Keypair Page', () => {
|
|||||||
|
|
||||||
it('successfully delete', () => {
|
it('successfully delete', () => {
|
||||||
cy.tableSearchText(name).clickConfirmActionInFirst().checkEmptyTable();
|
cy.tableSearchText(name).clickConfirmActionInFirst().checkEmptyTable();
|
||||||
|
cy.tableSearchText(nameByFile)
|
||||||
|
.clickConfirmActionInFirst()
|
||||||
|
.checkEmptyTable();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -80,7 +80,7 @@ describe('The Server Group Page', () => {
|
|||||||
it('successfully delete', () => {
|
it('successfully delete', () => {
|
||||||
cy.tableSearchText(name).clickFirstActionDisabled();
|
cy.tableSearchText(name).clickFirstActionDisabled();
|
||||||
cy.forceDeleteInstance(instanceName);
|
cy.forceDeleteInstance(instanceName);
|
||||||
cy.wait(10000);
|
cy.wait(60000);
|
||||||
cy.visitPage(listUrl)
|
cy.visitPage(listUrl)
|
||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.clickConfirmActionInFirst()
|
.clickConfirmActionInFirst()
|
||||||
|
@ -90,17 +90,17 @@ describe('The Floating IP Page', () => {
|
|||||||
.clickConfirmActionInMore('Disassociate');
|
.clickConfirmActionInMore('Disassociate');
|
||||||
});
|
});
|
||||||
|
|
||||||
onlyOn(!qosServiceEnabled, () => {
|
// onlyOn(!qosServiceEnabled, () => {
|
||||||
it('successfully edit with qos', () => {
|
// it('successfully edit', () => {
|
||||||
cy.clickFirstActionButton()
|
// cy.clickFirstActionButton()
|
||||||
.formText('description', 'description')
|
// .formText('description', 'description')
|
||||||
.clickModalActionSubmitButton()
|
// .clickModalActionSubmitButton()
|
||||||
.wait(2000);
|
// .wait(2000);
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
onlyOn(qosServiceEnabled, () => {
|
onlyOn(qosServiceEnabled, () => {
|
||||||
it('successfully edit with qos', () => {
|
it('successfully edit', () => {
|
||||||
cy.clickFirstActionButton()
|
cy.clickFirstActionButton()
|
||||||
.formText('description', 'description')
|
.formText('description', 'description')
|
||||||
.formTabClick('qos_policy_id', 1)
|
.formTabClick('qos_policy_id', 1)
|
||||||
|
@ -40,6 +40,7 @@ describe('The Security Group Page', () => {
|
|||||||
.goToDetail()
|
.goToDetail()
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.clickHeaderButton(1)
|
.clickHeaderButton(1)
|
||||||
|
.formSelect('ethertype')
|
||||||
.formInput('sourcePort', 80)
|
.formInput('sourcePort', 80)
|
||||||
.formInput('remote_ip_prefix', '192.168.0.0/24')
|
.formInput('remote_ip_prefix', '192.168.0.0/24')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
@ -58,6 +59,6 @@ describe('The Security Group Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully delete', () => {
|
it('successfully delete', () => {
|
||||||
cy.tableSearchText(newname).clickConfirmActionButton('Delete');
|
cy.tableSearchText(newname).clickConfirmActionInMore('Delete');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -98,12 +98,14 @@ describe('The Virtual Adapter Page', () => {
|
|||||||
.formTableSelect('fixed_ip')
|
.formTableSelect('fixed_ip')
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelect('fip')
|
.formTableSelect('fip')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton()
|
||||||
|
.wait(10000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully disassociate floating IP', () => {
|
it('successfully disassociate floating IP', () => {
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
.clickActionInMore('Disassociate Floating IP')
|
.goToDetail()
|
||||||
|
.clickDetailActionInMore('Disassociate Floating IP')
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelect('floating_ip')
|
.formTableSelect('floating_ip')
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
|
@ -187,7 +187,7 @@ describe('The Volume Page', () => {
|
|||||||
it('successfully delete related resources', () => {
|
it('successfully delete related resources', () => {
|
||||||
cy.deleteAll('image', imageName);
|
cy.deleteAll('image', imageName);
|
||||||
cy.deleteAll('volume', cloneVolumeName);
|
cy.deleteAll('volume', cloneVolumeName);
|
||||||
cy.forceDeleteInstance(instanceName);
|
cy.forceDeleteInstance(instanceName).wait(30000);
|
||||||
cy.deleteAll('network', networkName);
|
cy.deleteAll('network', networkName);
|
||||||
cy.loginAdmin().wait(5000);
|
cy.loginAdmin().wait(5000);
|
||||||
cy.deleteAll('volumeType', volumeTypeName);
|
cy.deleteAll('volumeType', volumeTypeName);
|
||||||
|
@ -230,7 +230,7 @@ Cypress.Commands.add('createProject', ({ name }) => {
|
|||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
});
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('createIronicFlavor', (name) => {
|
Cypress.Commands.add('setAllFlavorType', () => {
|
||||||
const filename = 'flavor-family.json';
|
const filename = 'flavor-family.json';
|
||||||
const settingName = 'flavor_families';
|
const settingName = 'flavor_families';
|
||||||
cy.fixture(filename).then((data) => {
|
cy.fixture(filename).then((data) => {
|
||||||
@ -240,18 +240,21 @@ Cypress.Commands.add('createIronicFlavor', (name) => {
|
|||||||
.formJsonInput('value', data)
|
.formJsonInput('value', data)
|
||||||
.wait(2000)
|
.wait(2000)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
|
|
||||||
cy.visitPage(flavorListUrl)
|
|
||||||
.clickTab('Bare Metal', 'bare_metal')
|
|
||||||
.clickHeaderButton(1)
|
|
||||||
.formRadioChoose('category', 0)
|
|
||||||
.formInput('name', name)
|
|
||||||
.clickStepActionNextButton()
|
|
||||||
.wait(2000)
|
|
||||||
.clickStepActionNextButton();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Cypress.Commands.add('createIronicFlavor', (name) => {
|
||||||
|
cy.setAllFlavorType();
|
||||||
|
cy.visitPage(flavorListUrl)
|
||||||
|
.clickTab('Bare Metal', 'bare_metal')
|
||||||
|
.clickHeaderButton(1)
|
||||||
|
.formRadioChoose('category', 0)
|
||||||
|
.formInput('name', name)
|
||||||
|
.clickStepActionNextButton()
|
||||||
|
.wait(2000)
|
||||||
|
.clickStepActionNextButton();
|
||||||
|
});
|
||||||
|
|
||||||
Cypress.Commands.add('createIronicImage', ({ name }) => {
|
Cypress.Commands.add('createIronicImage', ({ name }) => {
|
||||||
const filename = 'cirros-0.4.0-x86_64-disk.qcow2';
|
const filename = 'cirros-0.4.0-x86_64-disk.qcow2';
|
||||||
cy.visitPage(imageListUrl)
|
cy.visitPage(imageListUrl)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user