Skip to content

Commit

Permalink
forgot to add the system test
Browse files Browse the repository at this point in the history
  • Loading branch information
JmScherer committed Dec 4, 2023
1 parent ab13d16 commit 1d0f309
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion system-tests/e2e/discussions_analysis.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,33 @@ describe('discussions_analysis.cy.js', () => {
it('should publish a new post to the discussion section', () => {
cy.get('#Discussion').should('exist');

cy.get('[data-test="new-discussion-button"]').click()

cy.get('[data-test="discussion-post"]').should('have.length', 3);

cy.get('[data-test="new-discussion-input"]').type("System Test Text");
cy.get('[data-test="new-discussion-publish"]').click();

cy.get('[data-test="discussion-post"]').should('have.length', 4);
})
});

it('should not be able to publish a post with no text in the new discussion field', () => {
cy.get('#Discussion').should('exist');

cy.get('[data-test="new-discussion-button"]').click()
cy.get('[data-test="new-discussion-publish"]').should('be.disabled')
});

it('should cancel a new post, close the new post field, and not post anything', () => {
cy.get('#Discussion').should('exist');

cy.get('[data-test="new-discussion-button"]').click()

cy.get('[data-test="new-discussion-input"]').type("System Test Text");
cy.get('[data-test="new-discussion-cancel"]').click();

cy.get('[data-test="new-discussion-input"]').should('not.exist');

cy.get('[data-test="discussion-post"]').should('have.length', 3);
});
});

0 comments on commit 1d0f309

Please sign in to comment.