Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

MM-T636 Description field for incoming and outgoing webhooks can hold 500 characters #6682

Merged
merged 7 commits into from
Oct 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.

// ***************************************************************
// - [#] indicates a test step (e.g. # Go to a page)
// - [*] indicates an assertion (e.g. * Check the title)
// - Use element ID when selecting an element. Create one if none.
// ***************************************************************

// Group: @integrations

describe('Integrations', () => {
const maxDescription = '1234567890'.repeat(50);
const overMaxDescription = `${maxDescription}123`;

let testTeam;

before(() => {
// # Login as test user and visit the newly created test channel
cy.apiInitSetup().then(({team}) => {
testTeam = team;

// # Visit the Incoming Webhooks add page
cy.visit(`/${team.name}/integrations/incoming_webhooks/add`);
});
});

it('MM-T636 Description field length check', () => {
// * Check incoming description field only accepts 500 characters
cy.get('#description').clear().type(maxDescription).should('have.value', maxDescription);
cy.get('#description').clear().type(overMaxDescription).should('have.value', maxDescription);

// * Check outgoing description field only accepts 500 characters
cy.visit(`/${testTeam.name}/integrations/outgoing_webhooks/add`);
cy.get('#description').clear().type(maxDescription).should('have.value', maxDescription);
cy.get('#description').clear().type(overMaxDescription).should('have.value', maxDescription);
});
});