Mattermost-server: UI Automation: Write an automated test using Cypress for "Draw plugin does not post text in input box"

Created on 31 Jul 2019  路  10Comments  路  Source: mattermost/mattermost-server

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.


Notes: Jira ticket

__Test Key:__ M17448
__Title:__ Draw plugin does not post text in input box
*
__Steps:__*
__Must be tested on community-release.mattermost.com__

  1. Login to the server and open a channel
  2. Type some text into the input box
  3. Select the attachments icon
  4. Select "Draw" or "Your Computer"
    *
    __Expected:__*
    Text in the input box does not post to channel
    See our end-to-end testing documentation for reference.
AreE2E Tests Easy Help Wanted PR Exists

All 10 comments

Hello @saturninoabril, I would like to work on this ticket.

Thanks @EnriqueCer12 :+1:

Hey @EnriqueCer12, Do you have any questions about this ticket? Let me know, how I can help.

Making this one available for the public again due to inactivity.

I'll take this one

Thanks for working on this @NiroshaV :+1: Let me know, if you have any questions

@saturninoabril @hanzei . Update on this ticket : Test cases are automated for Draw plugin:PostMessage - > Working on Configuration part

@NiroshaV Awesome, thanks for the update!

@saturninoabril
Pull request has raised for this Task - https://github.com/mattermost/mattermost-webapp/pull/4460
Initially I was not in authorized list before creating Pull request . This is done

Couple of Observations can be considered like -> When test fails -Ensuring Draw plugin is removed or using Existing methods to switch user access.

@srkgupta @saturninoabril

Have updated the review comments . Thanks for the detailed check

Status about Review comments :

Please follow the test cases specified in the original Help Wanted ticket. Instead of creating separate test cases within the same file, you can add those as steps within single test case. The point here is single test serves single purpose.
--Added all the validations in single test --DONE

Please use the functions within the testcase instead of adding them in ui_commands or api_commands file unless they are very common and might be used across different testcases. [switchToPluginManagementEnableDisableDraw and others]
--Moved test specific Methods to testcases

Do not use a class element locator. Please use only an ID or data-testid element attribute. If it's not available, you can follow the guidelines mentioned here to create one and use the same.
--This is updated

Instead use the function cy.findByTestId()
--DONE ,Updated locator to ID

Detailed comments about params
--This is updated

Check on preferences
--This is updated

Unused Imports / Commented code / UnUsed functions
--This is updated

Please move/rename this file as e2e/cypress/integration/system_console/plugin_upload_spec.js
--This is updated

You may use cy.fixture so that you may pass filename instead of relative path.
--This is updated

Also, I'm wondering if uploading the plugin file/binary into this repo is a good approach. Maybe instead of that, just note somewhere (could be in the file itself)
--Agreed . Added comments in the test cases

Please create separate PRs for separate test cases. You can achieve this by creating different branches in the forked repository and then submitting PRs for individual test.
--Sure Will ensure this

Was this page helpful?
0 / 5 - 0 ratings