diff --git a/cypress/integration/discussions.js b/cypress/integration/discussions.js index a6e0ff9b56..caf7d6c3f9 100644 --- a/cypress/integration/discussions.js +++ b/cypress/integration/discussions.js @@ -37,24 +37,24 @@ context('Discussions', () => { }; const reply_through_comment_box = () => { - cy.get('.discussion-on-page:visible .comment-field') + cy.get('.discussion-form:visible .comment-field') .type('This is a discussion from the cypress ui tests. \n\nThis comment was entered through the commentbox on the page.') .should('have.value', 'This is a discussion from the cypress ui tests. \n\nThis comment was entered through the commentbox on the page.'); - cy.get('.discussion-on-page:visible .submit-discussion').click(); + cy.get('.discussion-form:visible .submit-discussion').click(); cy.wait(3000); cy.get('.discussion-on-page:visible').should('have.class', 'show'); - cy.get('.discussion-on-page:visible').children(".reply-card").eq(1).children(".reply-text") + cy.get('.discussion-on-page:visible').children(".reply-card").eq(1).find(".reply-text") .should('have.text', 'This is a discussion from the cypress ui tests. \n\nThis comment was entered through the commentbox on the page.\n'); }; const cancel_and_clear_comment_box = () => { - cy.get('.discussion-on-page:visible .comment-field') + cy.get('.discussion-form:visible .comment-field') .type('This is a discussion from the cypress ui tests.') .should('have.value', 'This is a discussion from the cypress ui tests.'); - cy.get('.discussion-on-page:visible .cancel-comment').click(); - cy.get('.discussion-on-page:visible .comment-field').should('have.value', ''); + cy.get('.discussion-form:visible .cancel-comment').click(); + cy.get('.discussion-form:visible .comment-field').should('have.value', ''); }; const single_thread_discussion = () => { @@ -62,13 +62,13 @@ context('Discussions', () => { cy.get('.discussions-sidebar').should('have.length', 0); cy.get('.reply').should('have.length', 0); - cy.get('.discussion-on-page .comment-field') + cy.get('.discussion-form:visible .comment-field') .type('This comment is being made on a single thread discussion.') .should('have.value', 'This comment is being made on a single thread discussion.'); - cy.get('.discussion-on-page .submit-discussion').click(); + cy.get('.discussion-form:visible .submit-discussion').click(); cy.wait(3000); - cy.get('.discussion-on-page').children(".reply-card").eq(-1).children(".reply-text") + cy.get('.discussion-on-page').children(".reply-card").eq(-1).find(".reply-text") .should('have.text', 'This comment is being made on a single thread discussion.\n'); }; diff --git a/frappe/templates/discussions/discussions.js b/frappe/templates/discussions/discussions.js index 443216a309..dab6287a24 100644 --- a/frappe/templates/discussions/discussions.js +++ b/frappe/templates/discussions/discussions.js @@ -132,7 +132,7 @@ const update_message = (data) => { reply_card.find(".reply-edit-card").addClass("hide"); reply_card.find(".reply-text").html(data.reply); reply_card.find(".reply-actions").addClass("hide"); -} +}; const post_message_cleanup = () => { $(".topic-title").val(""); diff --git a/frappe/templates/discussions/reply_section.html b/frappe/templates/discussions/reply_section.html index 828f6dae31..da3c95737a 100644 --- a/frappe/templates/discussions/reply_section.html +++ b/frappe/templates/discussions/reply_section.html @@ -5,13 +5,13 @@ {% endif %} -