Skip to content

Commit

Permalink
re-get the button
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenClontz committed Sep 6, 2024
1 parent ec9e775 commit fe87e54
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/viewer/cypress/e2e/citation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@ describe('citation button', () => {
it('copies Markdown links', () => {
cy.visit('/')

const b = cy.get('button').contains('Markdown Link')
b.click()
cy.get('button').contains('Markdown Link').click()
cy.wait(1000)
b.should('have.text', 'Copied!')
cy.get('button').contains('Markdown Link').should('not.exist')
cy.get('button').contains('Copied!').should('exist')
cy.wait(3000)
b.should('have.text', 'Markdown link')
cy.get('button').contains('Markdown Link').should('exist')
cy.get('button').contains('Copied!').should('not.exist')

cy.window().then(win => {
win.navigator.clipboard.readText().then(text => {
Expand Down

0 comments on commit fe87e54

Please sign in to comment.