You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2017/11/02 07:53:29 UTC
[GitHub] garrensmith closed pull request #1014: Fix Replication urls
garrensmith closed pull request #1014: Fix Replication urls
URL: https://github.com/apache/couchdb-fauxton/pull/1014
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/app/addons/documents/tests/nightwatch/replicateDatabaseButton.js b/app/addons/documents/tests/nightwatch/replicateDatabaseButton.js
new file mode 100644
index 000000000..d19db6631
--- /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 0b2cc190f..54c8f85cb 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';
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services