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
|
||||
imageName: cirros-0.5.2-x86_64-disk
|
||||
imageType: Others
|
||||
imageFile: null
|
||||
imageDownloadUrl: http://download.cirros-cloud.net/0.5.1/cirros-0.5.1-x86_64-disk.img
|
||||
imageCanChangePassword: false
|
||||
extensions:
|
||||
|
@ -22,6 +22,10 @@ describe('The Flavor Page', () => {
|
||||
cy.loginAdmin(listUrl);
|
||||
});
|
||||
|
||||
it('successfully prepair flavor types', () => {
|
||||
cy.setAllFlavorType();
|
||||
});
|
||||
|
||||
it('successfully list', () => {
|
||||
cy.clickTab('Custom', 'custom')
|
||||
.clickTab('Heterogeneous Computing', 'heterogeneous_computing')
|
||||
|
@ -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 {
|
||||
imageListUrl,
|
||||
volumeListUrl,
|
||||
@ -24,16 +25,20 @@ describe('The Image Page', () => {
|
||||
const name = `e2e-image-${uuid}`;
|
||||
const sharedImage = `e2e-image-shared-${uuid}`;
|
||||
const newname = `${name}-1`;
|
||||
const filename = `cirros-disk-${uuid}.qcow2`;
|
||||
const volumeName = `e2e-volume-by-image-${uuid}`;
|
||||
const downloadUrl = Cypress.env('imageDownloadUrl');
|
||||
const imageFile = Cypress.env('imageFile');
|
||||
const filename = imageFile || `cirros-disk-${uuid}.qcow2`;
|
||||
|
||||
beforeEach(() => {
|
||||
cy.login(listUrl);
|
||||
});
|
||||
|
||||
it('successfully download image', () => {
|
||||
cy.downloadFile(downloadUrl, 'test/e2e/fixtures', filename);
|
||||
onlyOn(!imageFile, () => {
|
||||
it('successfully download image', () => {
|
||||
cy.downloadFile(downloadUrl, 'test/e2e/fixtures', filename);
|
||||
cy.wait(120000);
|
||||
});
|
||||
});
|
||||
|
||||
it('successfully list', () => {
|
||||
@ -46,9 +51,9 @@ describe('The Image Page', () => {
|
||||
.should('include', `${listUrl}/create`)
|
||||
.formInput('name', name)
|
||||
.formAttachFile('file', filename)
|
||||
.formSelect('disk_format', 'QCOW2 - QEMU Emulator')
|
||||
.formSelect('disk_format', 'QCOW2 - QEMU image format')
|
||||
.formSelect('os_distro', 'Others')
|
||||
.formInput('os_version', 'cirros-0.4.0-x86_64')
|
||||
.formInput('os_version', 'cirros')
|
||||
.formInput('os_admin_user', 'root')
|
||||
.formSelect('usage_type', 'Common Server')
|
||||
.formText('description', name)
|
||||
@ -68,9 +73,9 @@ describe('The Image Page', () => {
|
||||
.formInput('name', sharedImage)
|
||||
.formTableSelectBySearch('owner', 'e2e')
|
||||
.formAttachFile('file', filename)
|
||||
.formSelect('disk_format', 'QCOW2 - QEMU Emulator')
|
||||
.formSelect('disk_format', 'QCOW2 - QEMU image format')
|
||||
.formSelect('os_distro', 'Others')
|
||||
.formInput('os_version', 'cirros-0.4.0-x86_64')
|
||||
.formInput('os_version', 'cirros')
|
||||
.formInput('os_admin_user', 'root')
|
||||
.formSelect('usage_type', 'Common Server')
|
||||
.formText('description', sharedImage)
|
||||
|
@ -198,7 +198,7 @@ describe('The Instance Page', () => {
|
||||
.wait(5000)
|
||||
.formTableSelectBySearch('volume', volumeName)
|
||||
.clickModalActionSubmitButton()
|
||||
.wait(5000);
|
||||
.wait(30000);
|
||||
|
||||
// check attach successful
|
||||
cy.tableSearchText(name)
|
||||
@ -214,9 +214,6 @@ describe('The Instance Page', () => {
|
||||
.wait(5000)
|
||||
.formTableSelectBySearch('volumes', volumeName)
|
||||
.clickModalActionSubmitButton();
|
||||
|
||||
// delete volume
|
||||
cy.deleteAll('volume', volumeName);
|
||||
});
|
||||
|
||||
it('successfully associate floating IP', () => {
|
||||
@ -296,6 +293,5 @@ describe('The Instance Page', () => {
|
||||
cy.deleteRouter(routerName, networkName);
|
||||
cy.deleteAll('network', networkName);
|
||||
cy.deleteAll('volume', volumeName);
|
||||
cy.deleteAllAvailableVolume();
|
||||
});
|
||||
});
|
||||
|
@ -52,5 +52,8 @@ describe('The Keypair Page', () => {
|
||||
|
||||
it('successfully delete', () => {
|
||||
cy.tableSearchText(name).clickConfirmActionInFirst().checkEmptyTable();
|
||||
cy.tableSearchText(nameByFile)
|
||||
.clickConfirmActionInFirst()
|
||||
.checkEmptyTable();
|
||||
});
|
||||
});
|
||||
|
@ -80,7 +80,7 @@ describe('The Server Group Page', () => {
|
||||
it('successfully delete', () => {
|
||||
cy.tableSearchText(name).clickFirstActionDisabled();
|
||||
cy.forceDeleteInstance(instanceName);
|
||||
cy.wait(10000);
|
||||
cy.wait(60000);
|
||||
cy.visitPage(listUrl)
|
||||
.tableSearchText(name)
|
||||
.clickConfirmActionInFirst()
|
||||
|
@ -90,17 +90,17 @@ describe('The Floating IP Page', () => {
|
||||
.clickConfirmActionInMore('Disassociate');
|
||||
});
|
||||
|
||||
onlyOn(!qosServiceEnabled, () => {
|
||||
it('successfully edit with qos', () => {
|
||||
cy.clickFirstActionButton()
|
||||
.formText('description', 'description')
|
||||
.clickModalActionSubmitButton()
|
||||
.wait(2000);
|
||||
});
|
||||
});
|
||||
// onlyOn(!qosServiceEnabled, () => {
|
||||
// it('successfully edit', () => {
|
||||
// cy.clickFirstActionButton()
|
||||
// .formText('description', 'description')
|
||||
// .clickModalActionSubmitButton()
|
||||
// .wait(2000);
|
||||
// });
|
||||
// });
|
||||
|
||||
onlyOn(qosServiceEnabled, () => {
|
||||
it('successfully edit with qos', () => {
|
||||
it('successfully edit', () => {
|
||||
cy.clickFirstActionButton()
|
||||
.formText('description', 'description')
|
||||
.formTabClick('qos_policy_id', 1)
|
||||
|
@ -40,6 +40,7 @@ describe('The Security Group Page', () => {
|
||||
.goToDetail()
|
||||
.wait(5000)
|
||||
.clickHeaderButton(1)
|
||||
.formSelect('ethertype')
|
||||
.formInput('sourcePort', 80)
|
||||
.formInput('remote_ip_prefix', '192.168.0.0/24')
|
||||
.clickModalActionSubmitButton();
|
||||
@ -58,6 +59,6 @@ describe('The Security Group Page', () => {
|
||||
});
|
||||
|
||||
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')
|
||||
.wait(5000)
|
||||
.formTableSelect('fip')
|
||||
.clickModalActionSubmitButton();
|
||||
.clickModalActionSubmitButton()
|
||||
.wait(10000);
|
||||
});
|
||||
|
||||
it('successfully disassociate floating IP', () => {
|
||||
cy.tableSearchText(name)
|
||||
.clickActionInMore('Disassociate Floating IP')
|
||||
.goToDetail()
|
||||
.clickDetailActionInMore('Disassociate Floating IP')
|
||||
.wait(5000)
|
||||
.formTableSelect('floating_ip')
|
||||
.clickModalActionSubmitButton();
|
||||
|
@ -187,7 +187,7 @@ describe('The Volume Page', () => {
|
||||
it('successfully delete related resources', () => {
|
||||
cy.deleteAll('image', imageName);
|
||||
cy.deleteAll('volume', cloneVolumeName);
|
||||
cy.forceDeleteInstance(instanceName);
|
||||
cy.forceDeleteInstance(instanceName).wait(30000);
|
||||
cy.deleteAll('network', networkName);
|
||||
cy.loginAdmin().wait(5000);
|
||||
cy.deleteAll('volumeType', volumeTypeName);
|
||||
|
@ -230,7 +230,7 @@ Cypress.Commands.add('createProject', ({ name }) => {
|
||||
.clickModalActionSubmitButton();
|
||||
});
|
||||
|
||||
Cypress.Commands.add('createIronicFlavor', (name) => {
|
||||
Cypress.Commands.add('setAllFlavorType', () => {
|
||||
const filename = 'flavor-family.json';
|
||||
const settingName = 'flavor_families';
|
||||
cy.fixture(filename).then((data) => {
|
||||
@ -240,18 +240,21 @@ Cypress.Commands.add('createIronicFlavor', (name) => {
|
||||
.formJsonInput('value', data)
|
||||
.wait(2000)
|
||||
.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 }) => {
|
||||
const filename = 'cirros-0.4.0-x86_64-disk.qcow2';
|
||||
cy.visitPage(imageListUrl)
|
||||
|
Loading…
x
Reference in New Issue
Block a user