|
|
@@ -63,31 +63,31 @@ describe('group members, with managed users', function () {
|
|
|
cy.get('h1').contains('My Awesome Team')
|
|
|
cy.get('small').contains('You have added 3 of 10 available members')
|
|
|
|
|
|
- cy.get('ul.managed-users-list').within(() => {
|
|
|
- cy.get('> li:nth-child(2)').within(() => {
|
|
|
+ cy.get('ul.managed-users-list table > tbody').within(() => {
|
|
|
+ cy.get('tr:nth-child(1)').within(() => {
|
|
|
cy.contains('john.doe@test.com')
|
|
|
cy.contains('John Doe')
|
|
|
cy.contains('15th Jan 2023')
|
|
|
- cy.get(`[aria-label="Pending invite"]`)
|
|
|
+ cy.get('.sr-only').contains('Pending invite')
|
|
|
|
|
|
cy.get('.badge-new-comment').contains('Pending invite')
|
|
|
cy.get(`.security-state-invite-pending`).should('exist')
|
|
|
})
|
|
|
|
|
|
- cy.get('> li:nth-child(3)').within(() => {
|
|
|
+ cy.get('tr:nth-child(2)').within(() => {
|
|
|
cy.contains('bobby.lapointe@test.com')
|
|
|
cy.contains('Bobby Lapointe')
|
|
|
cy.contains('2nd Jan 2023')
|
|
|
cy.get('.badge-new-comment').should('not.exist')
|
|
|
- cy.get('i[aria-label="Not managed"]').should('exist')
|
|
|
+ cy.get('.sr-only').contains('Not managed')
|
|
|
})
|
|
|
|
|
|
- cy.get('> li:nth-child(4)').within(() => {
|
|
|
+ cy.get('tr:nth-child(3)').within(() => {
|
|
|
cy.contains('claire.jennings@test.com')
|
|
|
cy.contains('Claire Jennings')
|
|
|
cy.contains('3rd Jan 2023')
|
|
|
cy.get('.badge-new-comment').should('not.exist')
|
|
|
- cy.get('i[aria-label="Managed"]').should('exist')
|
|
|
+ cy.get('.sr-only').contains('Managed')
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
@@ -106,11 +106,11 @@ describe('group members, with managed users', function () {
|
|
|
cy.get('.form-control').type('someone.else@test.com')
|
|
|
cy.get('.add-more-members-form button').click()
|
|
|
|
|
|
- cy.get('ul.managed-users-list').within(() => {
|
|
|
- cy.get('> li:nth-child(5)').within(() => {
|
|
|
+ cy.get('ul.managed-users-list table > tbody').within(() => {
|
|
|
+ cy.get('tr:nth-child(4)').within(() => {
|
|
|
cy.contains('someone.else@test.com')
|
|
|
cy.contains('N/A')
|
|
|
- cy.get(`[aria-label="Pending invite"]`)
|
|
|
+ cy.get('.sr-only').contains('Pending invite')
|
|
|
cy.get('.badge-new-comment').contains('Pending invite')
|
|
|
cy.get(`.security-state-invite-pending`).should('exist')
|
|
|
})
|
|
|
@@ -133,22 +133,22 @@ describe('group members, with managed users', function () {
|
|
|
})
|
|
|
|
|
|
it('checks the select all checkbox', function () {
|
|
|
- cy.get('ul.managed-users-list').within(() => {
|
|
|
- cy.get('> li:nth-child(2)').within(() => {
|
|
|
+ cy.get('ul.managed-users-list table > tbody').within(() => {
|
|
|
+ cy.get('tr:nth-child(1)').within(() => {
|
|
|
cy.get('.select-item').should('not.be.checked')
|
|
|
})
|
|
|
- cy.get('li:nth-child(3)').within(() => {
|
|
|
+ cy.get('tr:nth-child(2)').within(() => {
|
|
|
cy.get('.select-item').should('not.be.checked')
|
|
|
})
|
|
|
})
|
|
|
|
|
|
cy.get('.select-all').click()
|
|
|
|
|
|
- cy.get('ul.managed-users-list').within(() => {
|
|
|
- cy.get('> li:nth-child(2)').within(() => {
|
|
|
+ cy.get('ul.managed-users-list table > tbody').within(() => {
|
|
|
+ cy.get('tr:nth-child(1)').within(() => {
|
|
|
cy.get('.select-item').should('be.checked')
|
|
|
})
|
|
|
- cy.get('li:nth-child(3)').within(() => {
|
|
|
+ cy.get('tr:nth-child(2)').within(() => {
|
|
|
cy.get('.select-item').should('be.checked')
|
|
|
})
|
|
|
})
|
|
|
@@ -159,8 +159,8 @@ describe('group members, with managed users', function () {
|
|
|
statusCode: 200,
|
|
|
})
|
|
|
|
|
|
- cy.get('ul.managed-users-list').within(() => {
|
|
|
- cy.get('> li:nth-child(2)').within(() => {
|
|
|
+ cy.get('ul.managed-users-list table > tbody').within(() => {
|
|
|
+ cy.get('tr:nth-child(1)').within(() => {
|
|
|
cy.get('.select-item').check()
|
|
|
})
|
|
|
})
|
|
|
@@ -168,8 +168,8 @@ describe('group members, with managed users', function () {
|
|
|
cy.get('button').contains('Remove from group').click()
|
|
|
|
|
|
cy.get('small').contains('You have added 2 of 10 available members')
|
|
|
- cy.get('ul.managed-users-list').within(() => {
|
|
|
- cy.get('> li:nth-child(2)').within(() => {
|
|
|
+ cy.get('ul.managed-users-list table > tbody').within(() => {
|
|
|
+ cy.get('tr:nth-child(1)').within(() => {
|
|
|
cy.contains('bobby.lapointe@test.com')
|
|
|
cy.contains('Bobby Lapointe')
|
|
|
cy.contains('2nd Jan 2023')
|
|
|
@@ -182,9 +182,9 @@ describe('group members, with managed users', function () {
|
|
|
statusCode: 200,
|
|
|
})
|
|
|
|
|
|
- cy.get('ul.managed-users-list').within(() => {
|
|
|
+ cy.get('ul.managed-users-list table > tbody').within(() => {
|
|
|
// Select 'Claire Jennings', a managed user
|
|
|
- cy.get('> li:nth-child(4)').within(() => {
|
|
|
+ cy.get('tr:nth-child(3)').within(() => {
|
|
|
cy.get('.select-item').check()
|
|
|
})
|
|
|
})
|
|
|
@@ -199,13 +199,13 @@ describe('group members, with managed users', function () {
|
|
|
statusCode: 200,
|
|
|
})
|
|
|
|
|
|
- cy.get('ul.managed-users-list').within(() => {
|
|
|
+ cy.get('ul.managed-users-list table > tbody').within(() => {
|
|
|
// Select 'Claire Jennings', a managed user
|
|
|
- cy.get('> li:nth-child(4)').within(() => {
|
|
|
+ cy.get('tr:nth-child(3)').within(() => {
|
|
|
cy.get('.select-item').check()
|
|
|
})
|
|
|
// Select another user
|
|
|
- cy.get('li:nth-child(3)').within(() => {
|
|
|
+ cy.get('tr:nth-child(2)').within(() => {
|
|
|
cy.get('.select-item').check()
|
|
|
})
|
|
|
})
|
|
|
@@ -220,8 +220,8 @@ describe('group members, with managed users', function () {
|
|
|
statusCode: 500,
|
|
|
})
|
|
|
|
|
|
- cy.get('ul.managed-users-list').within(() => {
|
|
|
- cy.get('> li:nth-child(2)').within(() => {
|
|
|
+ cy.get('ul.managed-users-list table > tbody').within(() => {
|
|
|
+ cy.get('tr:nth-child(1)').within(() => {
|
|
|
cy.get('.select-item').check()
|
|
|
})
|
|
|
})
|