test: Update e2e case
1. Update flavor e2e order 2. Fix create shared image 3. Update waiting for attach volume finished 4. Add instance resize case 5. Update edit setting wait time 6. Update wait time for topologo page 7. Update waiting for volume attached finished Change-Id: Idca457b794aedd6e414e1f5486fae8ef75ebeb1e
This commit is contained in:
parent
ec49fffbe5
commit
700c208bc8
@ -17,7 +17,6 @@ env:
|
|||||||
testFiles:
|
testFiles:
|
||||||
# compute
|
# compute
|
||||||
- pages/compute/image.spec.js
|
- pages/compute/image.spec.js
|
||||||
- pages/compute/flavor.spec.js
|
|
||||||
- pages/compute/server-group.spec.js
|
- pages/compute/server-group.spec.js
|
||||||
- pages/compute/keypair.spec.js
|
- pages/compute/keypair.spec.js
|
||||||
- pages/compute/instance.spec.js
|
- pages/compute/instance.spec.js
|
||||||
@ -25,3 +24,4 @@ testFiles:
|
|||||||
- pages/compute/aggregate.spec.js
|
- pages/compute/aggregate.spec.js
|
||||||
- pages/compute/hypervisor.spec.js
|
- pages/compute/hypervisor.spec.js
|
||||||
- pages/compute/baremetal.spec.js
|
- pages/compute/baremetal.spec.js
|
||||||
|
- pages/compute/flavor.spec.js
|
||||||
|
@ -48,7 +48,6 @@ testFiles:
|
|||||||
- pages/network/topology.spec.js
|
- pages/network/topology.spec.js
|
||||||
# compute
|
# compute
|
||||||
- pages/compute/image.spec.js
|
- pages/compute/image.spec.js
|
||||||
- pages/compute/flavor.spec.js
|
|
||||||
- pages/compute/server-group.spec.js
|
- pages/compute/server-group.spec.js
|
||||||
- pages/compute/keypair.spec.js
|
- pages/compute/keypair.spec.js
|
||||||
- pages/compute/instance.spec.js
|
- pages/compute/instance.spec.js
|
||||||
@ -56,6 +55,7 @@ testFiles:
|
|||||||
- pages/compute/aggregate.spec.js
|
- pages/compute/aggregate.spec.js
|
||||||
- pages/compute/hypervisor.spec.js
|
- pages/compute/hypervisor.spec.js
|
||||||
- pages/compute/baremetal.spec.js
|
- pages/compute/baremetal.spec.js
|
||||||
|
- pages/compute/flavor.spec.js
|
||||||
# - pages/management/recycle-bin.spec.js
|
# - pages/management/recycle-bin.spec.js
|
||||||
# configuration
|
# configuration
|
||||||
- pages/configuration/metadata.spec.js
|
- pages/configuration/metadata.spec.js
|
||||||
|
@ -29,11 +29,17 @@ describe('The Image Page', () => {
|
|||||||
const downloadUrl = Cypress.env('imageDownloadUrl');
|
const downloadUrl = Cypress.env('imageDownloadUrl');
|
||||||
const imageFile = Cypress.env('imageFile');
|
const imageFile = Cypress.env('imageFile');
|
||||||
const filename = imageFile || `cirros-disk-${uuid}.qcow2`;
|
const filename = imageFile || `cirros-disk-${uuid}.qcow2`;
|
||||||
|
const projectName = `e2e-project-for-image-${uuid}`;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
cy.login(listUrl);
|
cy.login(listUrl);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('successfully prepair resource', () => {
|
||||||
|
cy.loginAdmin();
|
||||||
|
cy.createProject({ name: projectName });
|
||||||
|
});
|
||||||
|
|
||||||
onlyOn(!imageFile, () => {
|
onlyOn(!imageFile, () => {
|
||||||
it('successfully download image', () => {
|
it('successfully download image', () => {
|
||||||
cy.downloadFile(downloadUrl, 'test/e2e/fixtures', filename);
|
cy.downloadFile(downloadUrl, 'test/e2e/fixtures', filename);
|
||||||
@ -71,7 +77,7 @@ describe('The Image Page', () => {
|
|||||||
.clickHeaderButton(1)
|
.clickHeaderButton(1)
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formInput('name', sharedImage)
|
.formInput('name', sharedImage)
|
||||||
.formTableSelectBySearch('owner', 'e2e')
|
.formTableSelectBySearch('owner', projectName)
|
||||||
.formAttachFile('file', filename)
|
.formAttachFile('file', filename)
|
||||||
.formSelect('disk_format', 'QCOW2 - QEMU image format')
|
.formSelect('disk_format', 'QCOW2 - QEMU image format')
|
||||||
.formSelect('os_distro', 'Others')
|
.formSelect('os_distro', 'Others')
|
||||||
@ -148,4 +154,8 @@ describe('The Image Page', () => {
|
|||||||
.tableSearchText(sharedImage)
|
.tableSearchText(sharedImage)
|
||||||
.clickConfirmActionInMore('Delete');
|
.clickConfirmActionInMore('Delete');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('successfully delete related resources', () => {
|
||||||
|
cy.loginAdmin().deleteAll('project', projectName);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -12,7 +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 { instanceListUrl } from '../../../support/constants';
|
import { instanceListUrl, volumeListUrl } from '../../../support/constants';
|
||||||
|
|
||||||
describe('The Instance Page', () => {
|
describe('The Instance Page', () => {
|
||||||
const listUrl = instanceListUrl;
|
const listUrl = instanceListUrl;
|
||||||
@ -106,6 +106,7 @@ describe('The Instance Page', () => {
|
|||||||
.clickConfirmActionInMoreSub('Stop', 'Instance Status')
|
.clickConfirmActionInMoreSub('Stop', 'Instance Status')
|
||||||
.tableSearchText(name)
|
.tableSearchText(name)
|
||||||
.waitStatusTextByFresh('Shutoff')
|
.waitStatusTextByFresh('Shutoff')
|
||||||
|
.tableSearchText(name)
|
||||||
.selectFirst()
|
.selectFirst()
|
||||||
.clickHeaderButtonByTitle('Stop')
|
.clickHeaderButtonByTitle('Stop')
|
||||||
.checkDisableAction(2000);
|
.checkDisableAction(2000);
|
||||||
@ -197,15 +198,12 @@ describe('The Instance Page', () => {
|
|||||||
.clickActionInMoreSub('Attach Volume', 'Related Resources')
|
.clickActionInMoreSub('Attach Volume', 'Related Resources')
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelectBySearch('volume', volumeName)
|
.formTableSelectBySearch('volume', volumeName)
|
||||||
.clickModalActionSubmitButton()
|
.clickModalActionSubmitButton();
|
||||||
.wait(30000);
|
|
||||||
|
|
||||||
// check attach successful
|
// check attach successful
|
||||||
cy.tableSearchText(name)
|
cy.visitPage(volumeListUrl)
|
||||||
.goToDetail()
|
|
||||||
.clickDetailTab('Volume')
|
|
||||||
.tableSearchText(volumeName)
|
.tableSearchText(volumeName)
|
||||||
.checkColumnValue(2, 'In-use');
|
.waitStatusTextByFresh('In-use');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully detach volume', () => {
|
it('successfully detach volume', () => {
|
||||||
@ -265,16 +263,20 @@ describe('The Instance Page', () => {
|
|||||||
.waitStatusActiveByRefresh();
|
.waitStatusActiveByRefresh();
|
||||||
});
|
});
|
||||||
|
|
||||||
// todo: need a confirm resize button
|
it('successfully resize', () => {
|
||||||
// it('successfully resize', () => {
|
cy.tableSearchText(name)
|
||||||
// cy.tableSearchText(name)
|
.clickActionInMoreSub('Resize', 'Configuration Update')
|
||||||
// .clickActionInMoreSub('Resize', 'Configuration Update')
|
.wait(5000)
|
||||||
// .wait(5000)
|
.formTableSelect('newFlavor')
|
||||||
// .formTableSelect('newFlavor')
|
.formCheckboxClick('option')
|
||||||
// .formCheckboxClick('option')
|
.clickModalActionSubmitButton()
|
||||||
// .clickModalActionSubmitButton()
|
.wait(120000);
|
||||||
// .waitStatusActiveByRefresh();
|
cy.visitPage(instanceListUrl)
|
||||||
// });
|
.tableSearchText(name)
|
||||||
|
.clickConfirmActionInMoreSub('Confirm Resize', 'Configuration Update')
|
||||||
|
.tableSearchText(name)
|
||||||
|
.waitStatusActiveByRefresh();
|
||||||
|
});
|
||||||
|
|
||||||
it('successfully edit', () => {
|
it('successfully edit', () => {
|
||||||
cy.tableSearchText(name)
|
cy.tableSearchText(name)
|
||||||
|
@ -34,7 +34,7 @@ describe('The Setting Page', () => {
|
|||||||
cy.tableSimpleSearchText(name)
|
cy.tableSimpleSearchText(name)
|
||||||
.clickActionInMore('Edit')
|
.clickActionInMore('Edit')
|
||||||
.formJsonInput('value', data)
|
.formJsonInput('value', data)
|
||||||
.wait(2000)
|
.wait(10000)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton();
|
||||||
|
|
||||||
cy.visitPage(flavorListUrl)
|
cy.visitPage(flavorListUrl)
|
||||||
|
@ -31,6 +31,7 @@ describe('The Netowrk Topology Page', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('successfully page', () => {
|
it('successfully page', () => {
|
||||||
|
cy.wait(5000);
|
||||||
cy.get('canvas').should('exist');
|
cy.get('canvas').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -136,9 +136,9 @@ describe('The Volume Page', () => {
|
|||||||
.clickActionInMore('Attach')
|
.clickActionInMore('Attach')
|
||||||
.wait(5000)
|
.wait(5000)
|
||||||
.formTableSelectBySearch('instance', instanceName)
|
.formTableSelectBySearch('instance', instanceName)
|
||||||
.clickModalActionSubmitButton();
|
.clickModalActionSubmitButton()
|
||||||
|
.tableSearchText(name)
|
||||||
cy.wait(10000).tableSearchText(name).checkColumnValue(3, 'In-use');
|
.waitStatusTextByFresh('In-use');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('successfully detach', () => {
|
it('successfully detach', () => {
|
||||||
@ -189,7 +189,7 @@ describe('The Volume Page', () => {
|
|||||||
cy.deleteAll('volume', cloneVolumeName);
|
cy.deleteAll('volume', cloneVolumeName);
|
||||||
cy.forceDeleteInstance(instanceName).wait(30000);
|
cy.forceDeleteInstance(instanceName).wait(30000);
|
||||||
cy.deleteAll('network', networkName);
|
cy.deleteAll('network', networkName);
|
||||||
cy.loginAdmin().wait(5000);
|
cy.loginAdmin().wait(10000);
|
||||||
cy.deleteAll('volumeType', volumeTypeName);
|
cy.deleteAll('volumeType', volumeTypeName);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -141,7 +141,7 @@ Cypress.Commands.add('formJsonInput', (formItemName, content) => {
|
|||||||
cy.get(getId(formItemName))
|
cy.get(getId(formItemName))
|
||||||
.find('textarea')
|
.find('textarea')
|
||||||
.clear({ force: true })
|
.clear({ force: true })
|
||||||
.wait(1000)
|
.wait(2000)
|
||||||
.type(value, { force: true, parseSpecialCharSequences: false });
|
.type(value, { force: true, parseSpecialCharSequences: false });
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -174,7 +174,7 @@ Cypress.Commands.add('formTableSelect', (formItemName, value) => {
|
|||||||
.find('.ant-table-row')
|
.find('.ant-table-row')
|
||||||
.first()
|
.first()
|
||||||
.find('.ant-table-selection-column')
|
.find('.ant-table-selection-column')
|
||||||
.click();
|
.click({ force: true });
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cy.get(getId(formItemName))
|
cy.get(getId(formItemName))
|
||||||
|
Loading…
Reference in New Issue
Block a user