Skip to content

Commit

Permalink
Merge pull request #1833 from stakwork/feature/cypress_settings_test
Browse files Browse the repository at this point in the history
Updated admin cypress test to also change graph description
  • Loading branch information
Rassl authored Jul 16, 2024
2 parents e7cc759 + 646c1c8 commit 5b255e4
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 34 deletions.
9 changes: 9 additions & 0 deletions cypress/e2e/admin/signin.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ describe('Admin Login', () => {
}).as('updateAbout')

const title = `Testing NavFiber`
const description = 'Testing Graph Description'

// Open settings modal
cy.get('div[data-testid="settings-modal"]').should('be.visible').click()
Expand All @@ -18,6 +19,9 @@ describe('Admin Login', () => {
// Efficiently interact with the about title
cy.get('#cy-about-title-id').should('be.visible').click().type('{selectAll}').type(title)

// Efficiently interact with the about description
cy.get('#cy-about-id').should('be.visible').click().type('{selectAll}').type(description)

// Submit the form
cy.get('#add-node-submit-cta').click()

Expand All @@ -26,5 +30,10 @@ describe('Admin Login', () => {
// Close modal and assert the title
cy.get('div[data-testid="close-modal"]').click()
cy.get('.title').should('have.text', title)

cy.contains('About').click({ force: true })
cy.wait(1000)

cy.contains(description).should('be.visible')
})
})
Loading

0 comments on commit 5b255e4

Please sign in to comment.