Skip to content

Commit

Permalink
Adjust list items order
Browse files Browse the repository at this point in the history
And better name list item (TODO ID.)
  • Loading branch information
wlsf82 committed Jan 15, 2024
1 parent 1c4652c commit 2f93eb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions cypress/e2e/playground.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ describe('Cypress Playground - Test Design Masterclas TAT', () => {
cy.get('@todo')
.its('response.body.id')
.should('be.equal', 1)
cy.contains('#intercept ul li', 'Completed: ').should('be.visible')
cy.contains('#intercept ul li', 'ID: ').should('be.visible')
cy.contains('#intercept ul li', 'TODO ID: ').should('be.visible')
cy.contains('#intercept ul li', 'Title: ').should('be.visible')
cy.contains('#intercept ul li', 'Completed: ').should('be.visible')
cy.contains('#intercept ul li', 'User ID: ').should('be.visible')
})

Expand All @@ -100,9 +100,9 @@ describe('Cypress Playground - Test Design Masterclas TAT', () => {
.as('todo')
.its('response.statusCode')
.should('be.equal', 200)
cy.contains('#intercept ul li', `Completed: ${todo.completed}`).should('be.visible')
cy.contains('#intercept ul li', `ID: ${todo.id}`).should('be.visible')
cy.contains('#intercept ul li', `TODO ID: ${todo.id}`).should('be.visible')
cy.contains('#intercept ul li', `Title: ${todo.title}`).should('be.visible')
cy.contains('#intercept ul li', `Completed: ${todo.completed}`).should('be.visible')
cy.contains('#intercept ul li', `User ID: ${todo.userId}`).should('be.visible')
})
})
6 changes: 3 additions & 3 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ document.querySelector('#intercept button').addEventListener('click', async () =
const titleListItem = document.createElement('li')
const userIdListItem = document.createElement('li')

completedListItem.innerHTML = `Completed: ${completed}`
idListItem.innerHTML = `ID: ${id}`
idListItem.innerHTML = `TODO ID: ${id}`
titleListItem.innerHTML = `Title: ${title}`
completedListItem.innerHTML = `Completed: ${completed}`
userIdListItem.innerHTML = `User ID: ${userId}`

interceptDiv.appendChild(unorderedList)
document.querySelector('#intercept ul').appendChild(completedListItem)
document.querySelector('#intercept ul').appendChild(idListItem)
document.querySelector('#intercept ul').appendChild(titleListItem)
document.querySelector('#intercept ul').appendChild(completedListItem)
document.querySelector('#intercept ul').appendChild(userIdListItem)

return {
Expand Down

0 comments on commit 2f93eb1

Please sign in to comment.