couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [couchdb-fauxton] branch master updated: Fix Replication urls (#1014)
Date Thu, 02 Nov 2017 07:53:27 GMT
This is an automated email from the ASF dual-hosted git repository.

garren pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-fauxton.git


The following commit(s) were added to refs/heads/master by this push:
     new 07b2a50  Fix Replication urls (#1014)
07b2a50 is described below

commit 07b2a5025e28322a46b53492b129c2e345e29c8a
Author: Alexis Côté <popojargo@users.noreply.github.com>
AuthorDate: Thu Nov 2 03:53:25 2017 -0400

    Fix Replication urls (#1014)
    
    Update replication link for ViewTabsSideBarLinks
---
 .../tests/nightwatch/replicateDatabaseButton.js    | 57 ++++++++++++++++++++++
 app/addons/replication/base.js                     |  2 +-
 2 files changed, 58 insertions(+), 1 deletion(-)

diff --git a/app/addons/documents/tests/nightwatch/replicateDatabaseButton.js b/app/addons/documents/tests/nightwatch/replicateDatabaseButton.js
new file mode 100644
index 0000000..d19db66
--- /dev/null
+++ b/app/addons/documents/tests/nightwatch/replicateDatabaseButton.js
@@ -0,0 +1,57 @@
+// Licensed under the Apache License, Version 2.0 (the "License"); you may not
+// use this file except in compliance with the License. You may obtain a copy of
+// the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+// License for the specific language governing permissions and limitations under
+// the License.
+
+
+var helpers = require('../../../../../test/nightwatch_tests/helpers/helpers.js');
+var testDbName = 'test_database';
+module.exports = {
+    before: function (client, done) {
+        var nano = helpers.getNanoInstance(client.globals.test_settings.db_url);
+        nano.db.create(testDbName, function () {
+            done();
+        });
+    },
+
+    after: function (client, done) {
+        var nano = helpers.getNanoInstance(client.globals.test_settings.db_url);
+        nano.db.destroy(testDbName, function () {
+            done();
+        });
+    },
+
+    'Shows correct view on replicate database': function (client) {
+        var waitTime = client.globals.maxWaitTime,
+            baseUrl = client.globals.test_settings.launch_url;
+        var srcDbSelector = '.replication__page .replication__section:nth-child(2) .replication__input-react-select
.Select-value-label';
+        client
+            .loginToGUI()
+            .url(baseUrl + '/#/database/' + testDbName + '/_all_docs')
+            .waitForElementNotPresent('.global-notification .fonticon-cancel', waitTime,
false)
+
+            .clickWhenVisible('.faux-header__doc-header-dropdown-toggle')
+            .clickWhenVisible('.faux-header__doc-header-dropdown-itemwrapper .fonticon-replicate')
+
+            //Wait for replication page to show up
+            .waitForElementVisible('.replication__page', waitTime, false)
+
+            //Wait for source select to show
+            .waitForElementVisible(srcDbSelector, waitTime, false)
+
+            //Get the text values
+            .getText(srcDbSelector, function (data) {
+                this.verify.ok(data.value === testDbName,
+                    'Check if database name is filled in source name');
+            })
+            .end();
+    }
+};
+
diff --git a/app/addons/replication/base.js b/app/addons/replication/base.js
index 0b2cc19..54c8f85 100644
--- a/app/addons/replication/base.js
+++ b/app/addons/replication/base.js
@@ -24,7 +24,7 @@ replication.initialize = function () {
 
 FauxtonAPI.registerUrls('replication', {
   app: (db) => {
-    return '#/replication/' + db;
+    return '#/replication/_create/' + db;
   },
   api: () => {
     return window.location.origin + '/_replicator';

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <commits@couchdb.apache.org>'].

Mime
View raw message