|
|
@@ -27,7 +27,7 @@ describe('Create Openstack to OCI Migration', () => {
|
|
|
|
|
|
it('Shows Wizard page', () => {
|
|
|
cy.get('div').contains('New').click()
|
|
|
- cy.get('a').contains('Migration').click()
|
|
|
+ cy.getById('newItemDropdown-listItem-Migration').click()
|
|
|
cy.get('#app').should('contain', 'New Migration')
|
|
|
})
|
|
|
|
|
|
@@ -35,42 +35,42 @@ describe('Create Openstack to OCI Migration', () => {
|
|
|
cy.server()
|
|
|
cy.route({ url: '**/instances**', method: 'GET' }).as('sourceInstances')
|
|
|
cy.get('button').contains('Next').click()
|
|
|
- cy.get('div[data-test-id="wEndpointList-dropdown-openstack"]').first().click()
|
|
|
+ cy.getById('wEndpointList-dropdown-openstack').first().click()
|
|
|
cy.get('div').contains('e2e-openstack-test').click()
|
|
|
cy.wait('@sourceInstances')
|
|
|
})
|
|
|
|
|
|
+ it('Searches and selects instances', () => {
|
|
|
+ cy.get('button').contains('Next').click()
|
|
|
+ // cy.server()
|
|
|
+ // cy.route({ url: '**/instances**', method: 'GET' }).as('search')
|
|
|
+ cy.get('input[placeholder="Search VMs"]').type(config.wizard.instancesSearch.openstackSearchText)
|
|
|
+ // cy.wait('@search')
|
|
|
+ cy.getById('wInstances-instanceItem').contains(config.wizard.instancesSearch.openstackSearchText)
|
|
|
+ cy.getById('wInstances-instanceItem').its('length').should('be.gt', 0)
|
|
|
+ cy.getById('wInstances-instanceItem').eq(config.wizard.instancesSearch.openstackItemIndex).click()
|
|
|
+ })
|
|
|
+
|
|
|
it('Chooses OCI as Target Cloud', () => {
|
|
|
cy.server()
|
|
|
cy.get('button').contains('Next').click()
|
|
|
- cy.get('div[data-test-id="wEndpointList-dropdown-oci"]').first().click()
|
|
|
+ cy.getById('wEndpointList-dropdown-oci').first().click()
|
|
|
cy.route({ url: '**/destination-options', method: 'GET' }).as('destOptions')
|
|
|
cy.get('div').contains('e2e-oci-test').click()
|
|
|
cy.wait('@destOptions')
|
|
|
})
|
|
|
|
|
|
- it('Searches and selects instances', () => {
|
|
|
- cy.get('button').contains('Next').click()
|
|
|
- cy.server()
|
|
|
- cy.route({ url: '**/instances**', method: 'GET' }).as('search')
|
|
|
- cy.get('input[placeholder="Search VMs"]').type(config.wizard.instancesSearch.ociSearchText)
|
|
|
- cy.wait('@search')
|
|
|
- cy.get('div[data-test-id="wInstances-instanceItem"]').contains(config.wizard.instancesSearch.ociSearchText)
|
|
|
- cy.get('div[data-test-id="wInstances-instanceItem"]').its('length').should('be.gt', 0)
|
|
|
- cy.get('div[data-test-id="wInstances-instanceItem"]').eq(config.wizard.instancesSearch.ociItemIndex).click()
|
|
|
- })
|
|
|
-
|
|
|
it('Fills OCI migration info', () => {
|
|
|
cy.get('button').contains('Next').click()
|
|
|
- cy.get('div[data-test-id="wOptionsField-enumDropdown-compartment"]').click()
|
|
|
- cy.get('div[data-test-id="dropdownListItem"]').contains(config.wizard.oci.compartment.label).click()
|
|
|
- cy.get('div[data-test-id="wOptionsField-enumDropdown-availability_domain"]').click()
|
|
|
+ cy.getById('wOptionsField-enumDropdown-compartment').click()
|
|
|
+ cy.getById('dropdownListItem').contains(config.wizard.oci.compartment).click()
|
|
|
+ cy.getById('wOptionsField-enumDropdown-availability_domain').click()
|
|
|
cy.server()
|
|
|
cy.route({ url: '**/destination-options**', method: 'GET' }).as('destOptions')
|
|
|
- cy.get('div[data-test-id="dropdownListItem"]').contains(config.wizard.oci.availabilityDomain).click()
|
|
|
+ cy.getById('dropdownListItem').contains(config.wizard.oci.availabilityDomain).click()
|
|
|
cy.wait('@destOptions')
|
|
|
- cy.get('div[data-test-id="wOptionsField-enumDropdown-migr_subnet_id"]').click()
|
|
|
- cy.get('div[data-test-id="dropdownListItem"]').contains(config.wizard.oci.migrSubnetId.label).click()
|
|
|
+ cy.getById('wOptionsField-enumDropdown-migr_subnet_id').click()
|
|
|
+ cy.getById('dropdownListItem').contains(config.wizard.oci.migrSubnetId).click()
|
|
|
})
|
|
|
|
|
|
it('Selects first available network mapping', () => {
|
|
|
@@ -80,9 +80,9 @@ describe('Create Openstack to OCI Migration', () => {
|
|
|
cy.get('button').contains('Next').click()
|
|
|
cy.wait(['@networks', '@instances'])
|
|
|
cy.get('button').contains('Next').should('be.disabled')
|
|
|
- cy.get('div[data-test-id="networkItem"]').its('length').should('be.gt', 0)
|
|
|
+ cy.getById('networkItem').its('length').should('be.gt', 0)
|
|
|
cy.get('div[value="Select ..."]').first().click()
|
|
|
- cy.get('div[data-test-id="dropdownListItem"]').first().click()
|
|
|
+ cy.getById('dropdownListItem').first().click()
|
|
|
cy.get('button').contains('Next').should('not.be.disabled')
|
|
|
})
|
|
|
|
|
|
@@ -92,10 +92,10 @@ describe('Create Openstack to OCI Migration', () => {
|
|
|
cy.get('#app').should('contain', 'e2e-openstack-test')
|
|
|
cy.get('#app').should('contain', 'e2e-oci-test')
|
|
|
cy.get('#app').should('contain', 'Coriolis Migration')
|
|
|
- cy.get('#app').should('contain', 'Migration Options')
|
|
|
- cy.get('div[data-test-id="wSummary-optionValue-compartment"]').should('contain', config.wizard.oci.compartment.value)
|
|
|
- cy.get('div[data-test-id="wSummary-optionValue-availability_domain"]').should('contain', config.wizard.oci.availabilityDomain)
|
|
|
- cy.get('div[data-test-id="wSummary-optionValue-migr_subnet_id"]').should('contain', config.wizard.oci.migrSubnetId.value)
|
|
|
+ cy.get('#app').should('contain', 'Migration Target Options')
|
|
|
+ cy.getById('wSummary-optionValue-compartment').should('contain', 'ocid1.compartment')
|
|
|
+ cy.getById('wSummary-optionValue-availability_domain').should('contain', config.wizard.oci.availabilityDomain)
|
|
|
+ cy.getById('wSummary-optionValue-migr_subnet_id').should('contain', 'ocid1.subnet')
|
|
|
})
|
|
|
|
|
|
it('Executes migration', () => {
|
|
|
@@ -106,24 +106,25 @@ describe('Create Openstack to OCI Migration', () => {
|
|
|
})
|
|
|
|
|
|
it('Shows running migration page', () => {
|
|
|
- cy.get('div[data-test-id="statusPill-RUNNING"]').should('exist')
|
|
|
+ cy.getById('statusPill-RUNNING').should('exist')
|
|
|
})
|
|
|
|
|
|
it('Cancels migration', () => {
|
|
|
+ cy.getById('dcHeader-actionButton').click()
|
|
|
+ cy.get('*[data-test-id="actionDropdown-listItem-Cancel"]', { timeout: 10000 }).click()
|
|
|
cy.server()
|
|
|
- cy.get('button', { timeout: 10000 }).contains('Cancel').click()
|
|
|
cy.route({ url: '**/actions', method: 'POST' }).as('cancel')
|
|
|
- cy.get('button').contains('Yes').click()
|
|
|
+ cy.getById('aModal-yesButton').click()
|
|
|
cy.wait('@cancel')
|
|
|
cy.get('div[data-test-id="dcHeader-statusPill-ERROR"]', { timeout: 120000 })
|
|
|
})
|
|
|
|
|
|
it('Deletes migration', () => {
|
|
|
- cy.get('a[data-test-id="detailsNavigation-"]').click()
|
|
|
- cy.get('button').contains('Delete Migration').click()
|
|
|
+ cy.getById('dcHeader-actionButton').click()
|
|
|
+ cy.getById('actionDropdown-listItem-Delete Migration').click()
|
|
|
cy.server()
|
|
|
cy.route({ url: '**/migrations/**', method: 'DELETE' }).as('delete')
|
|
|
- cy.get('button').contains('Yes').click()
|
|
|
+ cy.getById('aModal-yesButton').click()
|
|
|
cy.wait('@delete')
|
|
|
})
|
|
|
})
|