Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(test): cypress #2389

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 35 additions & 35 deletions cypress/e2e/admin/signin.cy.ts
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
describe('Admin Login', () => {
it('Admin uses the enable function', () => {
const username = 'alice'

cy.initialSetup(username, 50)

cy.intercept({
method: 'POST',
url: 'http://localhost:8444/api/about*',
}).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()

// Asserting the settings label text
cy.get('[data-testid="setting-label"]').should('have.text', 'Admin Settings')

// 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()
cy.wait('@updateAbout')

cy.wait(1000)

cy.get('.title').should('have.text', title)
})
})
describe('Admin Login', () => {
it('Admin uses the enable function', () => {
const username = 'alice'
cy.initialSetup(username, 50)
cy.intercept({
method: 'POST',
url: 'http://localhost:8444/api/about*',
}).as('updateAbout')
const title = `Testing NavFiber`
const description = 'Testing Graph Description'
// Open settings modals
cy.get('div[data-testid="settings-modal"]').should('be.visible').click()
// Asserting the settings label text
cy.get('[data-testid="setting-label"]').should('have.text', 'Admin Settings')
// 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()
cy.wait('@updateAbout')
cy.wait(1000)
cy.get('.title').should('have.text', title)
})
})
Loading