UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects

Cypress updates

Merged Jimmy Bourque requested to merge cypress-updates into main
1 file
+ 7
9
Compare changes
  • Side-by-side
  • Inline
@@ -68,11 +68,7 @@ describe('Create Gitlab Project and Cleanup Resources Created', () => {
// Validate project can be created and then delete to clean up resources
cy.createGitlabProject(Cypress.env('url'), Cypress.env('gitlab_project'))
cy.visit(`${Cypress.env('url')}/${Cypress.env('gitlab_username')}/${Cypress.env('gitlab_project')}/edit`)
cy.get('section[data-testid="advanced-settings-content"]').contains('span', 'Expand').click()
cy.get('button[data-testid="delete-button"]').click()
cy.get('input[data-testid="confirm-name-field"]').type(`${Cypress.env('gitlab_username')}/${Cypress.env('gitlab_project')}`)
cy.get('button[data-testid="confirm-delete-button"]').click()
cy.deleteGitlabProject(Cypress.env('url'), Cypress.env('gitlab_username'), Cypress.env('gitlab_project'))
})
it('Login as Root and Delete Test User', () => {
// clear user data before starting test
@@ -87,11 +83,13 @@ describe('Create Gitlab Project and Cleanup Resources Created', () => {
cy.get('div[data-testid="user-actions-2"]').find('button[data-testid="base-dropdown-toggle"]').click()
cy.get('li[data-testid="delete-deleteWithContributions"]').find('button').click()
cy.get('input[name="username"]').type(`${Cypress.env('gitlab_first_name')} ${Cypress.env('gitlab_last_name')}`)
cy.contains('span', 'Delete user and contributions').click({force: true})
//Wait for user deletion to complete before validating user no longer exists
//Unfortunately, there is no API call to listen to here so it has to be an explicit wait
cy.wait(3000)
//Start listening for user list refresh prior to moving on to validation
cy.intercept('GET', '**/admin/users').as('userListCall')
cy.contains('span', 'Delete user and contributions').click({force: true})
cy.wait('@userListCall').then((interception) => {
expect(interception.response.statusCode).to.equal(200)
})
//Validate user is gone
cy.visit(`${Cypress.env('url')}/admin/users?search_query=${Cypress.env('gitlab_email')}&sort=name_asc`)
Loading