+
- {{#unless autocomplete 'isShowing'}}
- {{#if expertise}}
- {{#if expertiseError}}
- {{> AssistifyCreateInputError text=expertiseError}}
- {{/if}}
- {{/if}}
- {{/unless}}
- {{#with config}}
- {{#if autocomplete 'isShowing'}}
-
- {{#if autocomplete 'isLoaded'}}
- {{> popupList data=config items=items}}
+ {{#unless autocomplete 'isShowing'}}
+ {{#if expertise}}
+ {{#if expertiseError}}
+ {{> AssistifyCreateInputError text=expertiseError}}
{{/if}}
+ {{/if}}
+ {{/unless}}
+ {{#with config}}
+ {{#if autocomplete 'isShowing'}}
+
+ {{#if autocomplete 'isLoaded'}}
+ {{> popupList data=config items=items}}
+ {{/if}}
+
+ {{/if}}
+ {{/with}}
+
+
+
-
-
-
-
-
+
+ {{else}}
+ {{> AssistifyWordCloud properties=getWordcloudProperties}}
+ {{/unless}}
diff --git a/packages/assistify-help-request/client/views/creationDialog/AssistifyCreateRequest.js b/packages/assistify-help-request/client/views/creationDialog/AssistifyCreateRequest.js
index 89a1f3f7c567..4889e743ddfa 100755
--- a/packages/assistify-help-request/client/views/creationDialog/AssistifyCreateRequest.js
+++ b/packages/assistify-help-request/client/views/creationDialog/AssistifyCreateRequest.js
@@ -9,6 +9,14 @@ const acEvents = {
t.ac.onItemClick(this, e);
t.debounceValidateExpertise(this.item.name);
},
+ 'click .rc-input__icon-svg--book-alt'(e, t) {
+ e.preventDefault();
+ t.topicSearchEnable.set(true);
+ },
+ 'click #more-topics'(e, t) {
+ e.preventDefault();
+ t.topicSearchEnable.set(true);
+ },
'keydown [name="expertise"]'(e, t) {
t.ac.onKeyDown(e);
},
@@ -16,11 +24,15 @@ const acEvents = {
t.ac.onKeyUp(e);
},
'focus [name="expertise"]'(e, t) {
+ if (t.expertise.get() === '' && t.showDropDown.get() === '') {
+ t.showDropDown.set('isShowing');
+ }
t.ac.onFocus(e);
},
'blur [name="expertise"]'(e, t) {
t.ac.onBlur(e);
t.debounceValidateExpertise(e.target.value);
+ t.debounceDropDown();
}
};
@@ -29,17 +41,27 @@ Template.AssistifyCreateRequest.helpers({
autocomplete(key) {
const instance = Template.instance();
const param = instance.ac[key];
+ if (!Template.instance().expertise.get() && Template.instance().showDropDown.get() === 'isShowing') {
+ return true; // show the expertise auto complete drop down
+ }
return typeof param === 'function' ? param.apply(instance.ac) : param;
},
items() {
- return Template.instance().ac.filteredList();
+ const instance = Template.instance();
+ if (instance.expertise.get() === '') {
+ if (instance.expertisesList.get() && instance.expertisesList.get().length <= 10) {
+ return instance.expertisesList.get();
+ }
+ // instance.showDropDown.set('');
+ }
+ return instance.ac.filteredList();
},
config() {
const filter = Template.instance().expertise;
return {
filter: filter.get(),
template_item: 'AssistifyCreateRequestAutocomplete',
- noMatchTemplate: 'userSearchEmpty',
+ noMatchTemplate: 'AssistifyTopicSearchEmpty',
modifier(text) {
const f = filter.get();
return `#${ f.length === 0 ? text : text.replace(new RegExp(filter.get()), function(part) {
@@ -50,7 +72,6 @@ Template.AssistifyCreateRequest.helpers({
},
createIsDisabled() {
const instance = Template.instance();
-
if (instance.validExpertise.get() && !instance.titleError.get()) {
return '';
} else {
@@ -68,10 +89,68 @@ Template.AssistifyCreateRequest.helpers({
titleError() {
const instance = Template.instance();
return instance.titleError.get();
+ },
+ topicSearchEnable() {
+ const instance = Template.instance();
+ return instance.topicSearchEnable.get();
+ },
+ getWordcloudProperties() {
+ const instance = Template.instance();
+ const expertises = instance.expertisesList.get();
+
+ function getRandomArbitrary(min, max) {
+ return Math.random() * (max - min) + min;
+ }
+
+ function getWordList() {
+ const list = [];
+ expertises.forEach(function(expertise) {
+ list.push([expertise.name, getRandomArbitrary(4, 10)]);
+ });
+ return list;
+ }
+
+ function setExpertise() {
+ return function(selectedExpertise) {
+ const expertise = expertises.find(expertise => expertise.name === selectedExpertise[0]);
+ if (expertise) {
+ instance.debounceWordCloudSelect(expertise);
+ }
+ instance.topicSearchEnable.set(''); //Search completed.
+ };
+ }
+
+ function onWordHover() {
+ return function(item) {
+ // To Do
+ return item;
+
+ };
+ }
+
+ function setFlatness() {
+ return 0.5;
+ }
+
+ return {
+ clearCanvas: true,
+ weightFactor: 8,
+ fontWeight: 'normal',
+ gridSize: 55,
+ shape: 'square',
+ rotateRatio: 0,
+ rotationSteps: 0,
+ drawOutOfBound: true,
+ shuffle: true,
+ ellipticity: setFlatness(),
+ list: getWordList(),
+ click: setExpertise(),
+ hover: onWordHover()
+ //setCanvas: getCanvas
+ };
}
});
-
Template.AssistifyCreateRequest.events({
...acEvents,
'input #expertise-search'(e, t) {
@@ -91,7 +170,6 @@ Template.AssistifyCreateRequest.events({
} else {
t.debounceValidateRequestName(input.value);
}
-
},
'input #first_question'(e, t) {
const input = e.target;
@@ -150,10 +228,8 @@ Template.AssistifyCreateRequest.onRendered(function() {
instance.expertise.set(item.name);
$('input[name="expertise"]').val(item.name);
instance.debounceValidateExpertise(item.name);
-
return instance.find('.js-save-request').focus();
});
-
if (instance.requestTitle.get()) {
titleElement.value = instance.requestTitle.get();
}
@@ -164,7 +240,9 @@ Template.AssistifyCreateRequest.onRendered(function() {
// strategy for setting the focus (yac!)
if (!expertiseElement.value) {
- expertiseElement.focus();
+ Meteor.setTimeout(()=>{
+ expertiseElement.focus();
+ }, 1500);
} else if (!questionElement.value) {
questionElement.focus();
} else if (!titleElement.value) {
@@ -172,18 +250,41 @@ Template.AssistifyCreateRequest.onRendered(function() {
} else {
questionElement.focus();
}
+ this.autorun(() => {
+ instance.debounceWordCloudSelect = _.debounce((expertise) => {
+ /*
+ * Update the expertise html reference to autocomplete
+ */
+ instance.ac.element = this.find('#expertise-search');
+ instance.ac.$element = $(instance.ac.element);
+ $('input[name="expertise"]').val(expertise.name); // copy the selected value to screen field
+ instance.ac.$element.on('autocompleteselect', function(e, {item}) {
+ instance.expertise.set(item.name);
+ $('input[name="expertise"]').val(item.name);
+ instance.debounceValidateExpertise(item.name);
+ return instance.find('.js-save-request').focus();
+ });
+ instance.expertise.set(expertise.name);
+ instance.debounceValidateExpertise(expertise.name); // invoke validation*/
+ }, 200);
+ });
});
Template.AssistifyCreateRequest.onCreated(function() {
const instance = this;
-
instance.expertise = new ReactiveVar(''); //the value of the text field
instance.validExpertise = new ReactiveVar(false);
instance.expertiseError = new ReactiveVar(null);
instance.titleError = new ReactiveVar(null);
instance.requestTitle = new ReactiveVar('');
instance.openingQuestion = new ReactiveVar('');
+ instance.topicSearchEnable = new ReactiveVar('');
+ instance.showDropDown = new ReactiveVar('');
+ instance.expertisesList = new ReactiveVar('');
+ instance.debounceDropDown = _.debounce(() => {
+ instance.showDropDown.set('');
+ }, 200);
instance.debounceValidateExpertise = _.debounce((expertise) => {
if (!expertise) {
@@ -234,7 +335,6 @@ Template.AssistifyCreateRequest.onCreated(function() {
}
}
}, 500);
-
this.ac = new AutoComplete({
selector: {
item: '.rc-popup-list__item',
@@ -260,7 +360,7 @@ Template.AssistifyCreateRequest.onCreated(function() {
});
this.ac.tmplInst = this;
- //prefill form based on query parameters if passed
+ //pre-fill form based on query parameters if passed
if (FlowRouter.current().queryParams) {
const expertise = FlowRouter.getQueryParam('topic') || FlowRouter.getQueryParam('expertise');
if (expertise) {
@@ -278,4 +378,9 @@ Template.AssistifyCreateRequest.onCreated(function() {
instance.openingQuestion.set(question);
}
}
+ Meteor.call('expertiseList', {sort: 'name'}, function(err, result) {
+ if (result) {
+ instance.expertisesList.set(result.channels);
+ }
+ });
});
diff --git a/packages/assistify-help-request/client/views/creationDialog/AssistifyCreateRequestAutocomplete.html b/packages/assistify-help-request/client/views/creationDialog/AssistifyCreateRequestAutocomplete.html
new file mode 100644
index 000000000000..05ee63bb0bad
--- /dev/null
+++ b/packages/assistify-help-request/client/views/creationDialog/AssistifyCreateRequestAutocomplete.html
@@ -0,0 +1,5 @@
+
+
+
diff --git a/packages/assistify-help-request/client/views/creationDialog/AssistifyTopicSearchEmpty.html b/packages/assistify-help-request/client/views/creationDialog/AssistifyTopicSearchEmpty.html
new file mode 100644
index 000000000000..0771ade73cff
--- /dev/null
+++ b/packages/assistify-help-request/client/views/creationDialog/AssistifyTopicSearchEmpty.html
@@ -0,0 +1,9 @@
+
+
+
diff --git a/packages/assistify-help-request/client/views/creationDialog/AssistifyTopicSearchEmpty.js b/packages/assistify-help-request/client/views/creationDialog/AssistifyTopicSearchEmpty.js
new file mode 100644
index 000000000000..03b54c3cdaac
--- /dev/null
+++ b/packages/assistify-help-request/client/views/creationDialog/AssistifyTopicSearchEmpty.js
@@ -0,0 +1,15 @@
+Template.AssistifyTopicSearchEmpty.helpers({
+ showMoreTopics() {
+ const instance = Template.instance();
+ return instance.expertisesCount.get() > 10 ? true : false;
+ }
+});
+Template.AssistifyTopicSearchEmpty.onCreated(function() {
+ const instance = this;
+ instance.expertisesCount = new ReactiveVar('');
+ Meteor.call('expertiseList', {sort: 'name'}, function(err, result) {
+ if (result) {
+ instance.expertisesCount.set(result.channels.length);
+ }
+ });
+});
diff --git a/packages/assistify-help-request/client/views/creationDialog/AssistifyWordCloud.html b/packages/assistify-help-request/client/views/creationDialog/AssistifyWordCloud.html
new file mode 100644
index 000000000000..b00d8d49130b
--- /dev/null
+++ b/packages/assistify-help-request/client/views/creationDialog/AssistifyWordCloud.html
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/packages/assistify-help-request/client/views/creationDialog/AssistifyWordCloud.js b/packages/assistify-help-request/client/views/creationDialog/AssistifyWordCloud.js
new file mode 100644
index 000000000000..4afb23638394
--- /dev/null
+++ b/packages/assistify-help-request/client/views/creationDialog/AssistifyWordCloud.js
@@ -0,0 +1,33 @@
+/* eslint-disable no-unused-vars,new-cap */
+import { ReactiveVar } from 'meteor/reactive-var';
+
+import { WordCloud } from 'meteor/overture8:wordcloud2';
+
+function drawWords() {
+ const instance = Template.instance();
+ const properties = instance.data.properties;
+ //properties.setCanvas(instance.canvasToDraw.get());
+ window.WordCloud(instance.canvasToDraw.get(), properties);
+}
+
+Template.AssistifyWordCloud.events({
+// To Do
+});
+
+Template.AssistifyWordCloud.helpers({
+// To Do
+});
+
+Template.AssistifyWordCloud.onRendered(function() {
+ const canvasToDraw = this.find('[id="wc-canvas"]');
+ if (canvasToDraw) {
+ canvasToDraw.width = 1200;
+ canvasToDraw.height = 800;
+ this.canvasToDraw.set(canvasToDraw);
+ drawWords();
+ }
+});
+
+Template.AssistifyWordCloud.onCreated(function() {
+ this.canvasToDraw = new ReactiveVar('');
+});
diff --git a/packages/assistify-help-request/lib/messageTypes/threadMessage.js b/packages/assistify-help-request/lib/messageTypes/threadMessage.js
index bc7eec98fc96..aa2111f0910c 100644
--- a/packages/assistify-help-request/lib/messageTypes/threadMessage.js
+++ b/packages/assistify-help-request/lib/messageTypes/threadMessage.js
@@ -39,11 +39,11 @@ RocketChat.MessageTypes.registerType({
message: 'Thread_welcome_message',
data(message) {
/* Thread Welcome Message
- * @Returns
+ * @Returns
* Thread Initiator
* Parent Room Name
* Original Message
- * */
+ * */
const room = RocketChat.models.Rooms.findOne({_id: message.channels[0]._id});
let attachEvents = true;
for (const e of Template.room.__eventMaps) {
diff --git a/packages/assistify-help-request/package.js b/packages/assistify-help-request/package.js
index 2cff535f8ccb..55874a80006d 100644
--- a/packages/assistify-help-request/package.js
+++ b/packages/assistify-help-request/package.js
@@ -18,6 +18,7 @@ Package.onUse(function(api) {
api.use(['nimble:restivus', 'rocketchat:api'], 'server');
api.use('templating', 'client');
api.use('meteorhacks:inject-initial'); //for provisioning of svg-icons
+ //api.use('overture8:wordcloud2');
api.addFiles('help-request.js', 'server');
api.addFiles('server/types.js', 'server');
@@ -53,6 +54,7 @@ Package.onUse(function(api) {
api.addFiles('server/methods/createRequestFromRoomId.js', 'server');
api.addFiles('server/methods/requestsList.js', 'server');
api.addFiles('server/methods/isValidExpertise.js', 'server');
+ api.addFiles('server/methods/expertiseList.js', 'server');
// Hooks
api.addFiles('server/hooks/sendMessageToKnowledgeAdapter.js', 'server');
@@ -74,6 +76,11 @@ Package.onUse(function(api) {
api.addFiles('client/views/creationDialog/AssistifyCreateExpertise.html', 'client');
api.addFiles('client/views/creationDialog/AssistifyCreateExpertise.js', 'client');
api.addFiles('client/views/creationDialog/AssistifyCreateInputError.html', 'client');
+ api.addFiles('client/views/creationDialog/AssistifyWordCloud.html', 'client');
+ api.addFiles('client/views/creationDialog/AssistifyWordCloud.js', 'client');
+ api.addFiles('client/views/creationDialog/AssistifyCreateRequestAutocomplete.html', 'client');
+ api.addFiles('client/views/creationDialog/AssistifyTopicSearchEmpty.html', 'client');
+ api.addFiles('client/views/creationDialog/AssistifyTopicSearchEmpty.js', 'client');
api.addFiles('client/views/sideNav/requests.html', 'client');
api.addFiles('client/views/sideNav/requests.js', 'client');
api.addFiles('client/views/sideNav/expertise.html', 'client');
@@ -81,6 +88,7 @@ Package.onUse(function(api) {
api.addFiles('client/views/sideNav/listRequestsFlex.html', 'client');
api.addFiles('client/views/sideNav/listRequestsFlex.js', 'client');
api.addFiles('client/views/messageActions/AssistifyMessageAction.js', 'client');
+
//Libraries
api.addFiles('client/lib/collections.js', 'client');
diff --git a/packages/assistify-help-request/server/methods/expertiseList.js b/packages/assistify-help-request/server/methods/expertiseList.js
new file mode 100644
index 000000000000..03edda67c091
--- /dev/null
+++ b/packages/assistify-help-request/server/methods/expertiseList.js
@@ -0,0 +1,46 @@
+/* globals _ */
+Meteor.methods({
+ expertiseList({sort, limit}) {
+ this.unblock();
+ check(sort, Match.Optional(String));
+ check(limit, Match.Optional(Number));
+
+ if (!Meteor.userId()) {
+ throw new Meteor.Error('error-invalid-user', 'Invalid user', {
+ method: 'requestsList'
+ });
+ }
+
+ const options = {
+ fields: {
+ name: 1,
+ t: 1
+ },
+ sort: {
+ msgs: -1
+ }
+ };
+
+ if (_.isNumber(limit)) {
+ options.limit = limit;
+ }
+
+ if (sort.trim) {
+ switch (sort) {
+ case 'name':
+ options.sort = {
+ name: 1
+ };
+ break;
+ case 'msgs':
+ options.sort = {
+ msgs: -1
+ };
+ }
+ }
+
+ return {
+ channels: RocketChat.models.Rooms.find({t: 'e'}, options).fetch()
+ };
+ }
+});
diff --git a/packages/assistify-help-request/server/models/Rooms.js b/packages/assistify-help-request/server/models/Rooms.js
index 9d0a8385af96..60a0324b042e 100755
--- a/packages/assistify-help-request/server/models/Rooms.js
+++ b/packages/assistify-help-request/server/models/Rooms.js
@@ -37,5 +37,9 @@ _.extend(RocketChat.models.Rooms, {
{$or};
return this._db.find(query, options); //do not use cache
+ },
+ findByExpertise(expertise, options) {
+ const query = {expertise};
+ return this.find(query, options);
}
});
diff --git a/packages/assistify-help-request/server/publications/Expertise.js b/packages/assistify-help-request/server/publications/Expertise.js
index c84e6d0807f1..03f47c739167 100644
--- a/packages/assistify-help-request/server/publications/Expertise.js
+++ b/packages/assistify-help-request/server/publications/Expertise.js
@@ -17,7 +17,6 @@ Meteor.publish('autocompleteExpertise', function(selector) {
},
limit: 10
};
-
const cursorHandle = RocketChat.models.Rooms.findByNameContainingTypesAndTags(selector.term, [{type: 'e'}], options)
.observeChanges({
added(_id, record) {
diff --git a/packages/assistify-help-request/server/publications/Rooms.js b/packages/assistify-help-request/server/publications/Rooms.js
index 1c0657220e44..33804f8a8cca 100755
--- a/packages/assistify-help-request/server/publications/Rooms.js
+++ b/packages/assistify-help-request/server/publications/Rooms.js
@@ -15,3 +15,18 @@ Meteor.publish('assistify:room', function({rid: roomId}) {
return RocketChat.models.Rooms.findOneById(roomId, {fields: {helpRequestId: 1}});
});
+
+
+Meteor.publish('assistify:expertise', function() {
+ if (!this.userId) {
+ return this.error(new Meteor.Error('error-not-authorized', 'Not authorized'));
+ }
+ return RocketChat.models.Rooms.find({
+ fields: {
+ _id: 1,
+ roomId: 1,
+ helpRequestId: 1,
+ expertise: 1
+ }
+ });
+});
diff --git a/packages/rocketchat-i18n/i18n/assistifyHelpRequest.en.i18n.yml b/packages/rocketchat-i18n/i18n/assistifyHelpRequest.en.i18n.yml
index 6a5083b43fad..d7182d504c10 100755
--- a/packages/rocketchat-i18n/i18n/assistifyHelpRequest.en.i18n.yml
+++ b/packages/rocketchat-i18n/i18n/assistifyHelpRequest.en.i18n.yml
@@ -41,6 +41,7 @@ Search_Requests: Search requests
system: System
SystemContext: System context
transaction: Transaction
+Topic_Search: More topics
create-r: Create request
create-e: Create topic
delete-r: Delete request
diff --git a/tests/end-to-end/assistify/01-wordcloud.js b/tests/end-to-end/assistify/01-wordcloud.js
new file mode 100644
index 000000000000..1e2a7b734cb7
--- /dev/null
+++ b/tests/end-to-end/assistify/01-wordcloud.js
@@ -0,0 +1,47 @@
+/* eslint-env mocha */
+
+import sideNav from '../../pageobjects/side-nav.page';
+import assistify from '../../pageobjects/assistify.page';
+import { adminUsername, adminEmail, adminPassword } from '../../data/user.js';
+import { checkIfUserIsAdmin } from '../../data/checks';
+
+const topicName = 'topic-';
+const topicExpert = 'rocketchat.internal.admin.test';
+const numTopics = 11;
+
+describe('[Word-cloud Test]', () => {
+
+ before(() => {
+ checkIfUserIsAdmin(adminUsername, adminEmail, adminPassword);
+ });
+
+ it(`create ${ numTopics } topics for word-cloud`, function() {
+ this.timeout(100000);
+ for (let i=1; i <= numTopics; i++) {
+ try {
+ sideNav.openChannel(topicName+i);
+ } catch (e) {
+ assistify.createTopic(topicName+i, topicExpert);
+ console.log('New topic created: ', topicName+i);
+ }
+ }
+ //done();
+ });
+
+ it('open word-cloud', function(done) {
+ assistify.openWordCloud('d');
+ assistify.wordCloudCanvas.waitForVisible(5000);
+ done();
+ });
+
+ it('cleanup all topics', function(done) {
+ this.timeout(100000);
+ console.log('Topics cleaning started.');
+ for (let i=1; i <= numTopics; i++) {
+ console.log('Topic Deleted', topicName+i);
+ assistify.deleteRoom(topicName+i);
+ }
+ done();
+ });
+
+});
diff --git a/tests/end-to-end/assistify/02-create-request.js b/tests/end-to-end/assistify/02-create-request.js
index 19870a53bb12..ccea98eed3b3 100644
--- a/tests/end-to-end/assistify/02-create-request.js
+++ b/tests/end-to-end/assistify/02-create-request.js
@@ -48,6 +48,7 @@ describe('[Help Request]', function() {
});
describe('[Threading]', function() {
const helpRequest = 'execute-test-cases';
+ let helpRequestThreaded = null;
const inChatHelp = 'what-is-test-case';
before(()=> {
@@ -102,6 +103,8 @@ describe('[Threading]', function() {
it('It should create a new request from chat Room', function() {
globalObject.confirmPopup();
+ mainContent.channelTitle.waitForVisible(3000);
+ helpRequestThreaded = mainContent.channelTitle.getText();
sideNav.discovery.waitForVisible(3000);
});
@@ -123,6 +126,8 @@ describe('[Threading]', function() {
it('close the topics and request', () => {
console.log('Clean for the Topic and Expertise Started...', topicName);
assistify.deleteRoom(helpRequest);
+ assistify.deleteRoom(helpRequestThreaded);
+ browser.pause(1000);
assistify.deleteRoom(topicName);
});
});
diff --git a/tests/pageobjects/assistify.page.js b/tests/pageobjects/assistify.page.js
index 23520bb4ed4c..f41cffc318f8 100644
--- a/tests/pageobjects/assistify.page.js
+++ b/tests/pageobjects/assistify.page.js
@@ -10,11 +10,13 @@ const Keys = {
'ENTER': '\uE007',
'ESCAPE': 'u\ue00c'
};
+
class Assistify extends Page {
get knowledgebaseIcon() {
return browser.element('.tab-button-icon--lightbulb');
}
+
// in order to communicate with Smarti we need the roomId.
// funny enough, it's available in its DOM. A bit dirty, but very efficient
get roomId() {
@@ -98,6 +100,18 @@ class Assistify extends Page {
return browser.element('nav.rc-tabs .rc-tabs__tab-link.AssistifyCreateRequest');
}
+ get wordCloudLink() {
+ return browser.element('[id="more-topics"]');
+ }
+
+ get wordCloudButton() {
+ return browser.element('.rc-input__icon-svg--book-alt');
+ }
+
+ get wordCloudCanvas() {
+ return browser.element('[id="wc-canvas"]');
+ }
+
// Knowledgebase
get editInfoBtn() {
return browser.element('.rc-button.rc-button--icon.rc-button--outline.js-edit');
@@ -115,11 +129,14 @@ class Assistify extends Page {
return browser.element('#newTagInput');
}
- get numberOfRequests() { return browser.element('#rocket-chat > aside > div.rooms-list > h3:nth-child(9) > span.badge'); }
+ get numberOfRequests() {
+ return browser.element('#rocket-chat > aside > div.rooms-list > h3:nth-child(9) > span.badge');
+ }
escape() {
browser.keys(Keys.ESCAPE);
}
+
createTopic(topicName, expert) {
this.escape();
this.newChannelBtn.waitForVisible(3000);
@@ -137,7 +154,7 @@ class Assistify extends Page {
this.topicExperts.setValue(expert);
browser.pause(500);
browser.keys(Keys.TAB);
- browser.pause(500);
+ // browser.pause(500);
browser.waitUntil(function() {
return browser.isEnabled('.create-channel__content [data-button="create"]');
@@ -148,6 +165,22 @@ class Assistify extends Page {
browser.pause(500);
}
+ openWordCloud(key) {
+ this.newChannelBtn.waitForVisible(10000);
+ this.newChannelBtn.click();
+ this.tabs.waitForVisible(5000);
+ if (this.tabs) {
+ this.createRequestTab.waitForVisible(5000);
+ this.createRequestTab.click();
+ }
+
+ this.topicName.waitForVisible(5000);
+ this.topicName.setValue(key);
+
+ this.wordCloudButton.waitForVisible(5000);
+ this.wordCloudButton.click();
+ }
+
createHelpRequest(topicName, message, requestTitle) {
this.escape();
this.newChannelBtn.waitForVisible(1000);
@@ -208,15 +241,15 @@ class Assistify extends Page {
global.confirmPopup();
}
- // closeTopic(topicName) {
- // flexTab.channelTab.waitForVisible(5000);
- // flexTab.channelTab.click();
- // this.editInfoBtn.waitForVisible(5000);
- // this.editInfoBtn.click();
- // this.closeTopicBtn.waitForVisible(5000);
- // this.closeTopicBtn.click();
- // global.confirmPopup();
- // }
+ /* closeTopic(topicName) {
+ flexTab.channelTab.waitForVisible(5000);
+ flexTab.channelTab.click();
+ this.editInfoBtn.waitForVisible(5000);
+ this.editInfoBtn.click();
+ this.closeTopicBtn.waitForVisible(5000);
+ this.closeTopicBtn.click();
+ global.confirmPopup();
+ }*/
clickKnowledgebase() {
this.knowledgebaseIcon.waitForVisible(5000);