Skip to content

[DO NOT MERGE]Feature/#145 ask question from room#232

Closed
vickyokrm wants to merge 12 commits intodevelopfrom
feature/#142-ask-question-from-room
Closed

[DO NOT MERGE]Feature/#145 ask question from room#232
vickyokrm wants to merge 12 commits intodevelopfrom
feature/#142-ask-question-from-room

Conversation

@vickyokrm
Copy link
Copy Markdown

@vickyokrm vickyokrm commented Feb 14, 2018

closes #145 [Enable users to ask questions from an existing chat room]

Feature Overview:
To allow users to ask help about a conversation while they are in a chat room.

Motivation:
This feature will enable user to ask more questions in an isolated way which implies the new help request is created in the current conversation context.

Benefits of the solution:

  • Enable users to pro-actively communicate with out being afraid of leaving the chat room in which the user is conversing.

  • Using Assistify as a platform to ask and communicate more intensive.

What has changed/introduced:

  1. A new Message Action so called 'Help' has been introduced shall be used to create help request for a particular message.

  2. The new help request creation feature will prompt user to provide a request title a optional field.

  3. Upon confirmation, a new help request room will be created propagating the experts users and the question/query to the new room.

What is missing:

  • Translation of the texts in Deutsch

  • Code review from reviewer

  • Feedback

@ghost ghost assigned vickyokrm Feb 14, 2018
@ghost ghost added the progress:working label Feb 14, 2018
@vickyokrm
Copy link
Copy Markdown
Author

@ThomasRoehl @mrsimpson just realized that object from redlink:rocket-chat repo has messed my branch while pulling out test scripts updates.

@ThomasRoehl
Copy link
Copy Markdown

ThomasRoehl commented Feb 15, 2018

It is failing when looking for the last message in the request because there is none

[Help Reqeust]
	User not logged. logging in...
New Expertise created
    ✓ Create a Expertise (8329ms)
New Help Request Created
    ✓ Create a HelpRequest (8095ms)

  [In-Chat Help]
	Wrong logged user. Changing user...
Expertise already Exists
    ✓ Create a Expertise (663ms)
HelpRequest already Exists
    ✓ Create a HelpRequest (59ms)
    Help:
      1) "before all" hook


  4 passing (24s)
  1 failing

  1) [In-Chat Help]
       Help:
         "before all" hook:
     Uncaught Error: An element could not be located on the page using the given search parameters (".message:last-child .body").
      at moveToObject() - index.js:307:3

@vickyokrm vickyokrm force-pushed the feature/#142-ask-question-from-room branch from c108dc2 to 54f0f14 Compare February 15, 2018 15:28
@vickyokrm vickyokrm force-pushed the feature/#142-ask-question-from-room branch from 54f0f14 to f54ad56 Compare February 18, 2018 20:21
@vickyokrm
Copy link
Copy Markdown
Author

@ThomasRoehl> Test scripts issues were fixed. Please do the needful.

Copy link
Copy Markdown

@ThomasRoehl ThomasRoehl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the test is crashing after creating the topic and before writing the message, no further test run will be successful anymore.


return findAndModifyResult.value.value;
};
class CreateRequestBase {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this rearrangement necessary? Did you check if your changes are adapted to all files which use this method?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThomasRoehl Yes, this is planned re-factoring.

import { checkIfUserIsValid, checkIfUserIsAdmin } from '../../data/checks';
import globalObject from '../../pageobjects/global';
const topicName = 'unit-testing';
const message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text is very long, for stability reasons you should take a shorter message

describe('Help:', () => {
before(() => {
sideNav.spotlightSearch.waitForVisible(10000);
mainContent.openMessageActionMenu();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is crashing if the topic exists but no message is there


get knowledgebasePostBtn() {
return browser.element('.external-search-content .smarti-widget .search-results .result-actions');
get knowledgebasePickAnswer() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure you don't mess up other tests which use this functions

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically, this has come from the redlink repo. So I just left it as is.

}

createHelpRequest(topicName, message) {
createHelpRequest(topicName, message, requestTitle) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make sure you don't mess up other tests which use this functions.
Is it possible to call this function with only 2 parameters or do you have to add '' if no requestTitle is needed?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we would need to the function with 'requestTitle' because you would need to create a sub-request based on the requestTitle for tests scenario and when you do not pass the requestTitle it will be difficult figure out the request as it will get a random number.

@ghost ghost assigned ThomasRoehl Feb 23, 2018
@ThomasRoehl
Copy link
Copy Markdown

@vickyokrm I fixed the tests but found another bug:
when you try to use the help feature to create a new request, but the request already exists, there is no error or feedback to the user, it just skips the creation of the request. I don't think that is intended.

@janrudolph
Copy link
Copy Markdown

@vickyokrm and me reviewed the current state. Results:

  • Open new request works as expected :-)
  • We should add a bot message in the original channel after the new request has been created. the bot message should state that a new request has created based on the message. The message should contain the link to the request.
  • The "get help" dialog should have a member input field like the regular "channel create dialog". Thereby, an user is able to determine which other users should join the request. By default, all channel members should be listed. This feature is handy in large channels where not everyone wants to join a request by default.
  • Possible future enhancement (not part of this pull request): Assigning a topic to new requests. Thereby experts can be invited.

@ruKurz
Copy link
Copy Markdown

ruKurz commented Feb 27, 2018

In a final version the request creation dialog should not appear to the user (asking a question). The name and users of the channel the user starts the question from shoul be taken as topic / experts. The display name of the newly created question can be set afterwards.

@mrsimpson
Copy link
Copy Markdown
Member

@ruKurz @janrudolph your ideas about the target picture are opposite. I believe we should align it before @vickyokrm starts coding it

@vickyokrm vickyokrm changed the title [DO NOT MERGE]Feature/#142 ask question from room [DO NOT MERGE]Feature/#145 ask question from room Mar 4, 2018
@vickyokrm vickyokrm closed this Mar 4, 2018
@vickyokrm vickyokrm deleted the feature/#142-ask-question-from-room branch March 4, 2018 18:20
@ghost ghost removed the progress:working label Mar 4, 2018
@vickyokrm vickyokrm mentioned this pull request Mar 4, 2018
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make people ask questions - heavyweight threading from every room

5 participants