diff --git a/functional_tests/features/jsxc.feature b/functional_tests/features/jsxc.feature index ecbc12291..83dea3d41 100644 --- a/functional_tests/features/jsxc.feature +++ b/functional_tests/features/jsxc.feature @@ -15,7 +15,7 @@ # along with this program. If not, see . # -@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 diff --git a/plinth/modules/jsxc/__init__.py b/plinth/modules/jsxc/__init__.py index 28ce38215..155836754 100644 --- a/plinth/modules/jsxc/__init__.py +++ b/plinth/modules/jsxc/__init__.py @@ -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(): diff --git a/plinth/modules/jsxc/manifest.py b/plinth/modules/jsxc/manifest.py index ec3606132..760f6c1cd 100644 --- a/plinth/modules/jsxc/manifest.py +++ b/plinth/modules/jsxc/manifest.py @@ -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({})