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

Commit

Permalink
MM-T636 Description field for incoming and outgoing webhooks can hold…
Browse files Browse the repository at this point in the history
… 500 characters (#6682)

* first run

* fixes

* refactor, add sanity check

* Delete description_field_for_incoming_and_outgoing_webhooks_can_hold_500_characters_spec.js

name change

* move let into describe block

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
  • Loading branch information
2 people authored and calebroseland committed Oct 27, 2020
1 parent 68b1e15 commit 29204d0
Showing 1 changed file with 38 additions and 0 deletions.
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);
});
});

0 comments on commit 29204d0

Please sign in to comment.