Using cypress("@vue/cli-plugin-e2e-cypress": "~4.2.0") in @vue/cli 4.0.5 app I make CRUD opearitions and adding new category :
cy.get('#parent_id').select('1')
cy.get('section.submit_form_category')
.get('button.submit_button_category')
.click() // by submitting new category was added on server
cy.url()
.should('include', '/admin/categories/edit/')
cy.contains('Edit category')
cy.get('section.submit_form_category')
.get('a.cancel_button_category')
.click()
cy.url()
.should('include', '/admin/categories')
cy.contains('Categories') // opened listing of categories
Next I need to delete this row and for this I need to get ID of a new category created above. If there is a way to make it ?
Thanks!