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