Skip to content

Commit

Permalink
test(cypress): Fix selector for assistant free prompt
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- committed Jul 24, 2024
1 parent f546695 commit 7058cef
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions cypress/e2e/Assistant.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,28 @@ describe('Assistant', () => {
.click({ force: true })
cy.get('[data-cy="assistantMenu"]')
.click()
cy.get('.action-item__popper ul li').first()
cy.get('.action-item__popper li')
.contains('Free prompt')
.click()

cy.get('.assistant-modal--content #input-prompt')
cy.get('.assistant-modal--content #input-input')
.should('be.visible')

cy.get('.assistant-modal--content #input-prompt')
cy.get('.assistant-modal--content #input-input')
.type('Hello World')
cy.get('.assistant-modal--content .submit-button')
.click()

// eslint-disable-next-line cypress/no-unnecessary-waiting
cy.wait(2000)

cy.get('.assistant-modal--content button')
.contains('Run in the background')
.click()

cy.get('assistant-modal--content')
.should('contain', 'Your task has been scheduled')

cy.get('.assistant-modal--content .close-button')
.click()
cy.get('[data-cy="assistantMenu"]')
Expand Down

0 comments on commit 7058cef

Please sign in to comment.