From 616c27e3944745e07e5e30a790dd5eb6efc971f9 Mon Sep 17 00:00:00 2001
From: Maarten de Waard <maarten@greenhost.nl>
Date: Wed, 2 Oct 2019 16:34:33 +0200
Subject: [PATCH] add onlyoffice status test, use newest onlyoffice-docserver

---
 ansible/group_vars/all/oas.yml         | 2 +-
 openappstack/cluster.py                | 3 +++
 test/behave/features/nextcloud.feature | 4 ++++
 test/behave/features/steps/login.py    | 6 ++++++
 4 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/ansible/group_vars/all/oas.yml b/ansible/group_vars/all/oas.yml
index b2f2d2f07..73ae94a9c 100644
--- a/ansible/group_vars/all/oas.yml
+++ b/ansible/group_vars/all/oas.yml
@@ -29,7 +29,7 @@ kubernetes_version: "v1.14.3-rancher1-1"
 git_charts_version: 'HEAD'
 git_local_storage_version: 'HEAD'
 # version of the https://open.greenhost.net/openappstack/nextcloud repo
-git_nextcloud_version: 'cac00d369f5eeeddb7b33781ae3966b0c36fc308'
+git_nextcloud_version: '7df9f8044bc7bca2fcc9d23ce3af7a694b16338a'
 
 # Application versions
 # https://github.com/kubernetes-sigs/krew/releases
diff --git a/openappstack/cluster.py b/openappstack/cluster.py
index d728c54a1..143c6e777 100644
--- a/openappstack/cluster.py
+++ b/openappstack/cluster.py
@@ -200,6 +200,9 @@ class Cluster:
         behave_config['behave.userdata']['nextcloud.password'] = \
             nextcloud_admin_password
 
+        behave_config['behave.userdata']['onlyoffice.url'] = \
+            'https://office.{}/welcome'.format(self.domain)
+
         behave_config['behave.userdata']['grafana.url'] = \
             'https://grafana.{}'.format(self.domain)
         behave_config['behave.userdata']['grafana.username'] = 'admin'
diff --git a/test/behave/features/nextcloud.feature b/test/behave/features/nextcloud.feature
index 2482af3ec..5fb9e6e43 100644
--- a/test/behave/features/nextcloud.feature
+++ b/test/behave/features/nextcloud.feature
@@ -23,6 +23,10 @@ Scenario: Close welcome to nextcloud modal
   When I close the nextcloud welcome wizard if it exists
   Then I wait on element "#firstrunwizard" for 1000ms to not exist
 
+Scenario: Test OnlyOffice welcome screen
+  When I open the onlyoffice URL
+  Then I expect that element "#status-ok-icon" is visible
+
 Scenario: Create a new document in OnlyOffice
   When I click on the element ".actions a.button.new"
   And I click on the element "[data-action='onlyofficeDocx']"
diff --git a/test/behave/features/steps/login.py b/test/behave/features/steps/login.py
index 5eb11075b..c662039c1 100644
--- a/test/behave/features/steps/login.py
+++ b/test/behave/features/steps/login.py
@@ -23,6 +23,12 @@ def step_impl(context):
     """Open grafana URL."""
     context.behave_driver.get(context.grafana['url'])
 
+@when(u'I open the onlyoffice URL')
+@given(u'I open the onlyoffice URL')
+def step_impl(context):
+    """Open onlyoffice URL."""
+    context.behave_driver.get(context.onlyoffice['url'])
+
 
 @when(u'I enter the "{section}" "{cred_type}" in the inputfield "{element}"')
 def step_impl(context, section, cred_type, element):
-- 
GitLab