couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robertkowal...@apache.org
Subject fauxton commit: updated refs/heads/master to 9d0f679
Date Thu, 28 May 2015 10:24:27 GMT
Repository: couchdb-fauxton
Updated Branches:
  refs/heads/master 51a9bbf67 -> 9d0f67903


Mango, Indexes: link to _all_dbs using route helper

PR: #445
PR-URL: https://github.com/apache/couchdb-fauxton/pull/445
Reviewed-By: Michelle Phung <michellep@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/commit/9d0f6790
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/tree/9d0f6790
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/diff/9d0f6790

Branch: refs/heads/master
Commit: 9d0f67903b24483f9b1931ecaeb61b0f6a35e33d
Parents: 51a9bbf
Author: Robert Kowalski <robertkowalski@apache.org>
Authored: Wed May 27 22:50:23 2015 +0200
Committer: Robert Kowalski <robertkowalski@apache.org>
Committed: Thu May 28 12:28:08 2015 +0200

----------------------------------------------------------------------
 app/addons/documents/routes-index-editor.js     |  6 ++-
 app/addons/documents/routes-mango.js            | 10 +++--
 .../tests/nightwatch/previousButton.js          | 44 ++++++++++++++++++++
 .../tests/nightwatch/previousFromView.js        | 30 -------------
 4 files changed, 54 insertions(+), 36 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9d0f6790/app/addons/documents/routes-index-editor.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-index-editor.js b/app/addons/documents/routes-index-editor.js
index 981d6f7..ad04b44 100644
--- a/app/addons/documents/routes-index-editor.js
+++ b/app/addons/documents/routes-index-editor.js
@@ -70,11 +70,12 @@ function (app, FauxtonAPI, Helpers, BaseRoute, Documents, IndexEditorComponents,
         database: this.database
       }));
 
+      var url = FauxtonAPI.urls('allDocs', 'app', this.database.safeID(), '?limit=' + FauxtonAPI.constants.DATABASES.DOCUMENT_LIMIT);
       this.breadcrumbs = this.setView('#breadcrumbs', new Components.Breadcrumbs({
         toggleDisabled: true,
         crumbs: [
           {'type': 'back', 'link': Helpers.getPreviousPage(this.database)},
-          {'name': this.database.id, 'link': Databases.databaseUrl(this.database) }
+          {'name': this.database.id, 'link': url }
         ]
       }));
 
@@ -126,11 +127,12 @@ function (app, FauxtonAPI, Helpers, BaseRoute, Documents, IndexEditorComponents,
         newDesignDoc = false;
       }
 
+      var url = FauxtonAPI.urls('allDocs', 'app', this.database.safeID(), '?limit=' + FauxtonAPI.constants.DATABASES.DOCUMENT_LIMIT);
       this.breadcrumbs = this.setView('#breadcrumbs', new Components.Breadcrumbs({
         toggleDisabled: true,
         crumbs: [
           { type: 'back', link: Helpers.getPreviousPage(this.database) },
-          { name: 'Create new index', link: Databases.databaseUrl(this.database) }
+          { name: 'Create new index', link: url }
         ]
       }));
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9d0f6790/app/addons/documents/routes-mango.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/routes-mango.js b/app/addons/documents/routes-mango.js
index 31705c7..506869fa1 100644
--- a/app/addons/documents/routes-mango.js
+++ b/app/addons/documents/routes-mango.js
@@ -103,11 +103,12 @@ function (app, FauxtonAPI, Helpers, BaseRoute, Databases,
         indexList: mangoIndexList
       });
 
+      var url = FauxtonAPI.urls('allDocs', 'app', this.database.safeID(), '?limit=' + FauxtonAPI.constants.DATABASES.DOCUMENT_LIMIT);
       this.breadcrumbs = this.setView('#breadcrumbs', new Components.Breadcrumbs({
         toggleDisabled: true,
         crumbs: [
-          {'type': 'back', 'link': Databases.databaseUrl(this.database)},
-          {'name': app.i18n.en_US['mango-title-editor'], 'link': Databases.databaseUrl(this.database)}
+          {'type': 'back', 'link': url},
+          {'name': app.i18n.en_US['mango-title-editor'], 'link': url}
         ]
       }));
 
@@ -142,11 +143,12 @@ function (app, FauxtonAPI, Helpers, BaseRoute, Databases,
         typeOfIndex: 'mango'
       });
 
+      var url = FauxtonAPI.urls('allDocs', 'app', this.database.safeID(), '?limit=' + FauxtonAPI.constants.DATABASES.DOCUMENT_LIMIT);
       this.breadcrumbs = this.setView('#breadcrumbs', new Components.Breadcrumbs({
         toggleDisabled: true,
         crumbs: [
-          {'type': 'back', 'link': Databases.databaseUrl(this.database)},
-          {'name': app.i18n.en_US['mango-indexeditor-title'], 'link': Databases.databaseUrl(this.database)
}
+          {'type': 'back', 'link': url},
+          {'name': app.i18n.en_US['mango-indexeditor-title'], 'link': url }
         ]
       }));
 

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9d0f6790/app/addons/documents/tests/nightwatch/previousButton.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/previousButton.js b/app/addons/documents/tests/nightwatch/previousButton.js
new file mode 100644
index 0000000..d2ec413
--- /dev/null
+++ b/app/addons/documents/tests/nightwatch/previousButton.js
@@ -0,0 +1,44 @@
+// 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.
+
+module.exports = {
+  'View: Navigate previous works correctly': function (client) {
+    var waitTime = client.globals.maxWaitTime,
+        newDatabaseName = client.globals.testDatabaseName,
+        baseUrl = client.globals.test_settings.launch_url;
+
+    client
+      .populateDatabase(newDatabaseName, 3)
+      .loginToGUI()
+      .url(baseUrl + '/#/database/' + newDatabaseName + '/_changes')
+      .clickWhenVisible('#nav-header-keyview')
+      .clickWhenVisible('#nav-design-function-keyviewviews')
+      .clickWhenVisible('#keyview_keyview')
+      .clickWhenVisible('.breadcrumb-back-link .fonticon-left-open')
+      .waitForElementPresent('.js-changes-view', waitTime)
+    .end();
+  },
+
+  'Mango: Navigate back works correctly': function (client) {
+    var waitTime = client.globals.maxWaitTime,
+        newDatabaseName = client.globals.testDatabaseName,
+        baseUrl = client.globals.test_settings.launch_url;
+
+    client
+      .populateDatabase(newDatabaseName, 3)
+      .loginToGUI()
+      .url(baseUrl + '/#/database/' + newDatabaseName + '/_index')
+      .clickWhenVisible('.breadcrumb-back-link .fonticon-left-open')
+      .assert.urlContains('_all_docs')
+    .end();
+  }
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/9d0f6790/app/addons/documents/tests/nightwatch/previousFromView.js
----------------------------------------------------------------------
diff --git a/app/addons/documents/tests/nightwatch/previousFromView.js b/app/addons/documents/tests/nightwatch/previousFromView.js
deleted file mode 100644
index d6cecbd..0000000
--- a/app/addons/documents/tests/nightwatch/previousFromView.js
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-module.exports = {
-  'View: Navigate previous works correctly': function (client) {
-    var waitTime = client.globals.maxWaitTime,
-        newDatabaseName = client.globals.testDatabaseName,
-        baseUrl = client.globals.test_settings.launch_url;
-
-    client
-      .populateDatabase(newDatabaseName, 3)
-      .loginToGUI()
-      .url(baseUrl + '/#/database/' + newDatabaseName + '/_changes')
-      .clickWhenVisible('#nav-header-keyview')
-      .clickWhenVisible('#nav-design-function-keyviewviews')
-      .clickWhenVisible('#keyview_keyview')
-      .clickWhenVisible('.breadcrumb-back-link .fonticon-left-open')
-      .waitForElementPresent('.js-changes-view', waitTime)
-    .end();
-  }
-};


Mime
View raw message