jsxc: Enable backup/restore (no data)

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati 2018-10-01 21:04:30 -07:00 committed by James Valleroy
parent 12620fe7c0
commit 8a2e27e8e0
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 16 additions and 7 deletions

View File

@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
@apps @jsxc
@apps @jsxc @backups
Feature: JSXC XMPP Client
Run the JSXC XMPP client.
@ -25,3 +25,10 @@ Background:
Scenario: Install jsxc application
Given the jsxc application is installed
Then the jsxc site should be available
Scenario: Backup and restore jsxc
Given the jsxc application is installed
When I create a backup of the jsxc app data
And I export the jsxc app data backup
And I restore the jsxc app data backup
Then the jsxc site should be available

View File

@ -18,16 +18,17 @@
FreedomBox app to configure XMPP web client/jsxc.
"""
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
import logging
import socket
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from plinth import frontpage
from plinth import service as service_module
from plinth.menu import main_menu
from .manifest import clients
from .manifest import backup, clients
version = 1
@ -38,7 +39,6 @@ name = _('JSXC')
short_description = _('Chat Client')
description = [
_('JSXC is a web client for XMPP. Typically it is used with an XMPP '
'server running locally.'),
]
@ -81,8 +81,7 @@ def setup(helper, old_version=None):
def add_shortcut():
frontpage.add_shortcut('jsxc', name=name,
short_description=short_description,
url=reverse_lazy('jsxc:jsxc'),
login_required=True)
url=reverse_lazy('jsxc:jsxc'), login_required=True)
def is_enabled():

View File

@ -19,6 +19,7 @@ from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from plinth.clients import validate
from plinth.modules.backups.api import validate as validate_backup
clients = validate([{
'name': _('JSXC'),
@ -27,3 +28,5 @@ clients = validate([{
'url': reverse_lazy('jsxc:jsxc')
}]
}])
backup = validate_backup({})