From 5fbb14e68687190e352d7fe18e082758f7dd5bc5 Mon Sep 17 00:00:00 2001 From: Micah Nagel Date: Mon, 30 Aug 2021 13:04:14 -0600 Subject: [PATCH] why does this work? --- chart/tests/cypress/mattermost-health.spec.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/chart/tests/cypress/mattermost-health.spec.js b/chart/tests/cypress/mattermost-health.spec.js index fa16c6b..d96ba21 100644 --- a/chart/tests/cypress/mattermost-health.spec.js +++ b/chart/tests/cypress/mattermost-health.spec.js @@ -41,19 +41,19 @@ describe('Mattermost Healthcheck', function() { cy.title().should('include', 'Town Square - Big Bang') } }) + + cy.get("body").then($body => { + if ($body.find('button[class="SidebarNextSteps__close"]').length > 0) { + cy.get('button[class="SidebarNextSteps__close"]').click() + cy.get('button[type="submit"] > span').contains("Remove").click() + } + }) }) it('should allow chatting', function() { - // Click between channels to dodge the tutorial if it exists - cy.get('span[class="SidebarChannelLinkLabel"]').contains("Off-Topic").click() - cy.get('span[class="SidebarChannelLinkLabel"]').contains("Town Square").click() let randomChat = "Hello " + Math.random().toString(36).substring(8); - cy.get('textarea[id="post_textbox"]').type(randomChat) - cy.get('textarea[id="post_textbox"]').type('{enter}') + cy.get('textarea[id="post_textbox"]').type(randomChat).type('{enter}') cy.reload() - // Click between channels to dodge the tutorial if it exists - cy.get('span[class="SidebarChannelLinkLabel"]').contains("Off-Topic").click() - cy.get('span[class="SidebarChannelLinkLabel"]').contains("Town Square").click() cy.get('p').contains(randomChat).should('be.visible') }) -- GitLab