Skip to content

Commit

Permalink
fix new messenger specs
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Nov 16, 2023
1 parent 034d4a1 commit f986944
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/application.tailwind.css
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,14 @@ div[data-controller="chat-editor"] .ProseMirror {
-webkit-font-smoothing: antialiased;
}


}
}

#bbbb .wait-for-input {
display: none;
}


.cache-emo-sfyuaf[data-content="0"] {
display: none;
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/components/wait_for_reply/component.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div class="mx-2 p-2 my-4 bg-blue-100 text-gray-600 border border-md border-blue-300 rounded-md text-center">
<div class="wait-for-input mx-2 p-2 my-4 bg-blue-100 text-gray-600 border border-md border-blue-300 rounded-md text-center">
<span>... wait for user input ...</span>
</div>
4 changes: 2 additions & 2 deletions spec/cypress/integration/new_messenger/conversations_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('Conversation Spec', function () {

cy.wrap($body)
.xpath(
'//*[@id="main-content"]/div/div/div[3]/div/div/textarea'
'/html/body/div/div/div/div[2]/div[1]/main/div/div/div[4]/div/div/textarea'
)
.type('oeoe \n')
.then(() => {
Expand Down Expand Up @@ -161,7 +161,7 @@ describe('Conversation Spec', function () {
.then(() => {
cy.wrap($body)
.xpath(
'//*[@id="main-content"]/div/div/div[3]/div/div/textarea'
'/html/body/div/div/div/div[2]/div[1]/main/div/div/div[4]/div/div/textarea'
)
.should('be.enabled');
});
Expand Down
14 changes: 7 additions & 7 deletions spec/cypress/integration/new_messenger/task_bot_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ describe('Task bot Spec', function () {
cy.wait(1000)

cy.wrap($body)
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[3]/div/div/textarea')
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[4]/div/div/textarea')
.type('oeoe \n').then(() => {
cy.wrap($body).contains('four')
})
Expand Down Expand Up @@ -179,10 +179,10 @@ describe('Task bot Spec', function () {
.click()
.then(() => {
cy.wrap($body)
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[3]/div/div/textarea')
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[4]/div/div/textarea')
.should('be.enabled').then(() => {
cy.wrap($body)
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[3]/div/div/textarea')
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[4]/div/div/textarea')
.type('oeoe \n').then(() => {
cy.wait(2000)

Expand Down Expand Up @@ -230,11 +230,11 @@ describe('start conversation welcome bot', function () {
cy.wrap($body).contains('sauper!')

cy.wrap($body)
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[3]/div/div/textarea')
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[4]/div/div/textarea')
.should('be.enabled').then(() => {
cy.wait(2000)
cy.wrap($body)
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[3]/div/div/textarea')
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[4]/div/div/textarea')
.type('oeoe \n').then(() => {
cy.wrap($body).contains('oeoe')
cy.wrap($body).contains('go to!').click()
Expand All @@ -260,11 +260,11 @@ describe('start conversation welcome bot', function () {
cy.wrap($body).contains('sauper!')

cy.wrap($body)
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[3]/div/div/textarea')
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[4]/div/div/textarea')
.should('be.enabled').then(() => {
cy.wait(2000)
cy.wrap($body)
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[3]/div/div/textarea')
.xpath('/html/body/div/div/div/div[2]/div[1]/main/div/div/div[4]/div/div/textarea')
.type('oeoe \n').then(() => {
cy.wrap($body).contains('oeoe')
cy.wrap($body).contains('go to!').click()
Expand Down

0 comments on commit f986944

Please sign in to comment.