Skip to content

Commit

Permalink
fix(cypress): test
Browse files Browse the repository at this point in the history
  • Loading branch information
Shoaibdev7 committed Sep 28, 2024
1 parent c73fe52 commit 9ed60d0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions cypress/e2e/addContent/addTweet.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ describe('Add Tweet Content', () => {

cy.wait('@addTweet2') // This is because add source is currently skipped,

cy.wait(5000)

cy.get('.Toastify__toast-body').should('have.text', 'Content Added')

cy.get('#addContent').should('not.exist')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/addContent/addWebpage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Add Webpage Content', () => {
}).as('addWebpage2')

cy.wait('@addWebpage2')

cy.wait(5000)
cy.get('.Toastify__toast-body').should('have.text', 'Content Added')
cy.get('#addContent').should('not.exist')
})
Expand Down
1 change: 1 addition & 0 deletions cypress/e2e/addContent/addYoutube.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ describe('Add Youtube Content', () => {
cy.wait('@addYoutube2')

cy.get('.Toastify__toast-body').should('have.text', 'Content Added')
cy.wait(5000)
cy.get('#addContent').should('not.exist')
})
})
4 changes: 3 additions & 1 deletion cypress/e2e/sourcesTable/sourcesTable.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ describe('Sources Table / Home interactions', () => {

cy.wait(2000)

cy.get('[data-testid="sources-table"]').should('exist')

cy.contains('button', 'Sources Table').click()

cy.wait(2000)
cy.wait(5000)

cy.get('tbody.MuiTableBody-root').find('tr').its('length').should('be.gt', 0)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,10 @@ export const FormInput = ({
</InputsWrapper>
)}
<Flex align="flex-start" py={12}>
<ViewMoreButton onClick={() => append({ key: '', type: 'string', required: true, isNew: true })}>
<ViewMoreButton
data-testid="add-attribute-btn"
onClick={() => append({ key: '', type: 'string', required: true, isNew: true })}
>
<PlusIconWrapper>
<PlusIcon /> Add Attribute
</PlusIconWrapper>
Expand Down

0 comments on commit 9ed60d0

Please sign in to comment.