pull/8190/head
Rodrigo Nascimento 8 years ago
parent fd72a499e9
commit 2ea54668a0
No known key found for this signature in database
GPG Key ID: CFCE33B7B01AC335
  1. 2
      packages/rocketchat-lib/client/lib/settings.js
  2. 4
      packages/rocketchat-ui-message/client/message.js
  3. 4
      packages/rocketchat-ui-message/client/messageBox.js
  4. 9
      packages/rocketchat-ui/client/views/app/room.js
  5. 2
      tests/end-to-end/ui/11-admin.js
  6. 1
      tests/pageobjects/administration.page.js

@ -60,7 +60,7 @@ Meteor.startup(function() {
}
Meteor.setTimeout(function() {
const currentUrl = location.origin + __meteor_runtime_config__.ROOT_URL_PATH_PREFIX;
if (__meteor_runtime_config__.ROOT_URL !== currentUrl) {
if (__meteor_runtime_config__.ROOT_URL.replace(/\/$/, '') !== currentUrl) {
swal({
type: 'warning',
title: t('Warning'),

@ -367,9 +367,11 @@ Template.message.onViewRendered = function(context) {
if (!templateInstance) {
return;
}
if (currentNode.classList.contains('own') === true) {
return (templateInstance.atBottom = true);
templateInstance.atBottom = true;
}
templateInstance.sendToBottomIfNecessary();
}
});
};

@ -364,9 +364,9 @@ Template.messageBox.events({
// fixes https://github.com/RocketChat/Rocket.Chat/issues/3037
// at this point, the input is cleared and ready for autogrow
input.updateAutogrow();
return instance.isMessageFieldEmpty.set(chatMessages[this._id].isEmpty());
instance.isMessageFieldEmpty.set(chatMessages[this._id].isEmpty());
return input.focus();
});
return input.focus();
},
'keyup .js-input-message'(event, instance) {
chatMessages[this._id].keyup(this._id, event, instance);

@ -817,8 +817,10 @@ Template.room.onRendered(function() {
const messageBox = $('.messages-box');
template.isAtBottom = function(scrollThreshold) {
if ((scrollThreshold == null)) { scrollThreshold = 0; }
if ((wrapper.scrollTop + scrollThreshold) >= (wrapper.scrollHeight - wrapper.clientHeight)) {
if (scrollThreshold == null) {
scrollThreshold = 0;
}
if (wrapper.scrollTop + scrollThreshold >= wrapper.scrollHeight - wrapper.clientHeight) {
newMessage.className = 'new-message background-primary-action-color color-content-background-color not';
return true;
}
@ -837,8 +839,7 @@ Template.room.onRendered(function() {
};
template.sendToBottomIfNecessary = function() {
if ((template.atBottom === true) && (template.isAtBottom() !== true)) {
if (template.atBottom === true && template.isAtBottom() !== true) {
return template.sendToBottom();
}
};

@ -414,8 +414,10 @@ describe('[Administration]', () => {
describe('[General Settings]', () => {
before(() => {
admin.settingsSearch.setValue('general');
admin.generalLink.waitForVisible(5000);
admin.generalLink.click();
admin.settingsSearch.setValue('');
admin.generalSiteUrl.waitForVisible(5000);
});

@ -3,6 +3,7 @@ import Page from './Page';
class Administration extends Page {
get flexNav() { return browser.element('.flex-nav'); }
get flexNavContent() { return browser.element('.flex-nav'); }
get settingsSearch() { return browser.element('[name=settings-search]'); }
get layoutLink() { return browser.element('.flex-nav [href="/admin/Layout"]'); }
get infoLink() { return browser.element('.flex-nav [href="/admin/info"]'); }
get roomsLink() { return browser.element('.flex-nav [href="/admin/rooms"]'); }

Loading…
Cancel
Save