UNCLASSIFIED

Commit 6a6c954a authored by Micah Nagel's avatar Micah Nagel 💰
Browse files

update cypress test to handle upgrades

parent fa73eb41
...@@ -4,6 +4,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ...@@ -4,6 +4,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
--- ---
## [0.1.1-bb.2] - 2021-03-25
### Changed
- Updated Cypress test to handle upgrades
- Added a test to make sure chats can send
## [0.1.1-bb.1] - 2021-03-24 ## [0.1.1-bb.1] - 2021-03-24
### Changed ### Changed
- Refactored the Minio dependency to use the BB upstream with kpt - Refactored the Minio dependency to use the BB upstream with kpt
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
apiVersion: v2 apiVersion: v2
name: mattermost name: mattermost
type: application type: application
version: "0.1.1-bb.1" version: "0.1.1-bb.2"
appVersion: "5.32.1" appVersion: "5.32.1"
description: "Deployment of mattermost" description: "Deployment of mattermost"
keywords: keywords:
......
describe('Basic Mattermost', function() { describe('Basic Mattermost', function() {
it('Check Mattermost is accessible', function() { it('Check Mattermost is accessible', function() {
cy.visit(Cypress.env('mm_url')) cy.visit(Cypress.env('mm_url'))
cy.get('input[id="email"]').type(Cypress.env('mm_email')) // Wait for redirects to happen
cy.get('input[id="name"]').type(Cypress.env('mm_user')) cy.get('div[id="root"]').should('be.visible')
cy.get('input[id="password"]').type(Cypress.env('mm_password'))
cy.get('button[id="createAccountButton"]').click()
cy.get('a[id="createNewTeamLink"]').click()
cy.get('input[id="teamNameInput"]').type(Cypress.env('mm_user'))
cy.get('button[id="teamNameNextButton"]').click()
cy.get('button[id="teamURLFinishButton"]').click()
cy.title().should('include', 'Town Square - ') // Check if this is a fresh install or upgrade
cy.url().then(($url) => {
if ($url.includes('signup')) {
cy.get('input[id="email"]').type(Cypress.env('mm_email'))
cy.get('input[id="name"]').type(Cypress.env('mm_user'))
cy.get('input[id="password"]').type(Cypress.env('mm_password'))
cy.get('button[id="createAccountButton"]').click()
cy.get('a[id="createNewTeamLink"]').click()
cy.get('input[id="teamNameInput"]').type(Cypress.env('mm_user'))
cy.get('button[id="teamNameNextButton"]').click()
cy.get('button[id="teamURLFinishButton"]').click()
cy.title().should('include', 'Town Square - ')
cy.get('a[id="tutorialSkipLink"]').click()
cy.get('textarea[id="post_textbox"]').type("Hello Big Bang").type('{enter}')
cy.get('p').contains("Hello Big Bang").should('be.visible')
} else {
cy.get('input[id="loginId"]').type(Cypress.env('mm_user'))
cy.get('input[id="loginPassword"]').type(Cypress.env('mm_password'))
cy.get('button[id="loginButton"]').click()
cy.title().should('include', 'Town Square - ')
// Safeguard in case tutorial link is still there
cy.get("body").then($body => {
if ($body.find('a[id="tutorialSkipLink"]').length > 0) {
cy.get('a[id="tutorialSkipLink"]').click()
}
})
cy.get('textarea[id="post_textbox"]').type("Hello upgraded Big Bang").type('{enter}')
cy.get('p').contains("Hello upgraded Big Bang").should('be.visible')
}
})
}) })
}) })
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment