Cleanup - improved wording. Removed not needed file.
This commit is contained in:
parent
dd6974963c
commit
3b4b6ea921
4 changed files with 6 additions and 72 deletions
|
@ -2,7 +2,7 @@
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|
||||||
<h1><%- @T('Wall') %></h1>
|
<h1><%- @T('Wall') %></h1>
|
||||||
<p class="description"><%- @T('Choose which group page postings should go.') %></p>
|
<p class="description"><%- @T('Choose which group %s will get added to.', 'wall postings') %></p>
|
||||||
<div class="js-wall">
|
<div class="js-wall">
|
||||||
<h2><%= @channel.options.user.name %></h2>
|
<h2><%= @channel.options.user.name %></h2>
|
||||||
<div data-page-id="<%= @channel.options.user.id %>" class="js-groups"></div>
|
<div data-page-id="<%= @channel.options.user.id %>" class="js-groups"></div>
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<h1><%- @T('Pages') %></h1>
|
<h1><%- @T('Pages') %></h1>
|
||||||
<p class="description"><%- @T('Choose which group page postings should go.') %></p>
|
<p class="description"><%- @T('Choose which group %s will get added to.', 'page postings') %></p>
|
||||||
<div class="js-pages">
|
<div class="js-pages">
|
||||||
<% if @channel.options.pages: %>
|
<% if @channel.options.pages: %>
|
||||||
<% for page in @channel.options.pages: %>
|
<% for page in @channel.options.pages: %>
|
||||||
|
|
|
@ -24,11 +24,11 @@
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3><%- @T('Mentions Group') %></h3>
|
<h3><%- @T('Mentions Group') %></h3>
|
||||||
<p class="description"><%- @T('Choose which group mentions will get added to.') %></p>
|
<p class="description"><%- @T('Choose which group %s will get added to.', 'mentions') %></p>
|
||||||
<div class="js-mentionsGroup"></div>
|
<div class="js-mentionsGroup"></div>
|
||||||
|
|
||||||
<h3><%- @T('Direct Messages Group') %></h3>
|
<h3><%- @T('Direct Messages Group') %></h3>
|
||||||
<p class="description"><%- @T('Choose which group direct messages will get added to.') %></p>
|
<p class="description"><%- @T('Choose which group %s will get added to.', 'direct messages') %></p>
|
||||||
<div class="js-directMessagesGroup"></div>
|
<div class="js-directMessagesGroup"></div>
|
||||||
|
|
||||||
<h3><%- @T('Retweets') %></h3>
|
<h3><%- @T('Retweets') %></h3>
|
||||||
|
|
|
@ -16,6 +16,8 @@ class TelegramSupport < ActiveRecord::Migration
|
||||||
id: 12,
|
id: 12,
|
||||||
name: 'telegram personal-message',
|
name: 'telegram personal-message',
|
||||||
communication: true,
|
communication: true,
|
||||||
|
updated_by_id: 1,
|
||||||
|
created_by_id: 1,
|
||||||
)
|
)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,68 +0,0 @@
|
||||||
# encoding: utf-8
|
|
||||||
require 'test_helper'
|
|
||||||
|
|
||||||
class ChannelsControllerTest < ActionDispatch::IntegrationTest
|
|
||||||
setup do
|
|
||||||
|
|
||||||
# set accept header
|
|
||||||
@headers = { 'ACCEPT' => 'application/json', 'CONTENT_TYPE' => 'application/json' }
|
|
||||||
|
|
||||||
# create agent
|
|
||||||
roles = Role.where(name: %w(Admin Agent))
|
|
||||||
groups = Group.all
|
|
||||||
|
|
||||||
UserInfo.current_user_id = 1
|
|
||||||
@admin = User.create_or_update(
|
|
||||||
login: 'packages-admin',
|
|
||||||
firstname: 'Packages',
|
|
||||||
lastname: 'Admin',
|
|
||||||
email: 'packages-admin@example.com',
|
|
||||||
password: 'adminpw',
|
|
||||||
active: true,
|
|
||||||
roles: roles,
|
|
||||||
groups: groups,
|
|
||||||
)
|
|
||||||
|
|
||||||
# create agent
|
|
||||||
roles = Role.where(name: 'Agent')
|
|
||||||
@agent = User.create_or_update(
|
|
||||||
login: 'packages-agent@example.com',
|
|
||||||
firstname: 'Rest',
|
|
||||||
lastname: 'Agent',
|
|
||||||
email: 'packages-agent@example.com',
|
|
||||||
password: 'agentpw',
|
|
||||||
active: true,
|
|
||||||
roles: roles,
|
|
||||||
groups: groups,
|
|
||||||
)
|
|
||||||
|
|
||||||
# create customer without org
|
|
||||||
roles = Role.where(name: 'Customer')
|
|
||||||
@customer_without_org = User.create_or_update(
|
|
||||||
login: 'packages-customer1@example.com',
|
|
||||||
firstname: 'Packages',
|
|
||||||
lastname: 'Customer1',
|
|
||||||
email: 'packages-customer1@example.com',
|
|
||||||
password: 'customer1pw',
|
|
||||||
active: true,
|
|
||||||
roles: roles,
|
|
||||||
)
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
test '01 telegram_webhook creates ticket' do
|
|
||||||
json = File.read('test/fixtures/telegram/personal_message_content.json')
|
|
||||||
post '/api/v1/channels/telegram_webhook', json, @headers
|
|
||||||
puts JSON.parse(@response.body).inspect
|
|
||||||
|
|
||||||
assert_response(200)
|
|
||||||
|
|
||||||
result = JSON.parse(@response.body)
|
|
||||||
assert_equal(Hash, result.class)
|
|
||||||
assert_equal({ 'ok' => 'ok' }, result)
|
|
||||||
end
|
|
||||||
|
|
||||||
test '0x telegram_webhook with existing ticket adds ticket_article'
|
|
||||||
test '0x telegram_webhook sends welcome message on /start'
|
|
||||||
test '0x telegram_webhook closes the ticket on /stop'
|
|
||||||
end
|
|
Loading…
Reference in a new issue