From d05e19515003e335bf9662bc77cf1d547f50de2b Mon Sep 17 00:00:00 2001 From: Peter Schmidt Date: Mon, 23 Jan 2017 14:02:19 +1100 Subject: [PATCH 1/4] COMPASS-697: Backport COMPASS-666: Keyboard Enter on forms cause page refresh (#753) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit NOTE: Due to merge conflicts in our rapidly evolving functional test suite since creating the 1.5.x branch, ‘data-test-id’ values and the actual code fix has been backported and manually tested, but the functional test changes have not been back ported. --- .../lib/components/create-collection-dialog.jsx | 11 +++++++++-- .../lib/components/drop-collection-dialog.jsx | 14 ++++++++++++-- .../lib/component/create-database-dialog.jsx | 9 +++++++-- .../lib/component/drop-database-dialog.jsx | 14 ++++++++++++-- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/internal-packages/database/lib/components/create-collection-dialog.jsx b/src/internal-packages/database/lib/components/create-collection-dialog.jsx index 11a1dd0e520..c8a7fcac52d 100644 --- a/src/internal-packages/database/lib/components/create-collection-dialog.jsx +++ b/src/internal-packages/database/lib/components/create-collection-dialog.jsx @@ -73,8 +73,12 @@ class CreateCollectionDialog extends React.Component { /** * Initiate the attempt to create a collection. + * @param {Object} evt - The event object */ - onCreateCollectionButtonClicked() { + onCreateCollectionButtonClicked(evt) { + evt.preventDefault(); + evt.stopPropagation(); + this.setState({ inProgress: true, error: false, errorMessage: '' }); Actions.createCollection( this.state.databaseName, @@ -163,7 +167,10 @@ class CreateCollectionDialog extends React.Component { -
+ - +
- +
- +
Date: Wed, 30 Nov 2016 16:37:04 +1100 Subject: [PATCH 2/4] COMPASS 443: Standardise mongodb-runner CI (#633) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Standardise mongodb-runner CI https://github.com/mongodb-js/connection-model/pull/138 NOTE: `npm run check && npm run test-unit` passes for me locally on macOS, but the functional tests `npm test ` still error with results: 177 passing (50s) 2 pending 10 failing 1) Compass #spectron when working with the application when working with collections when selecting a collection renders the sample collection in the title: Error: element (button[data-hook=start-button]) still not visible after 5000ms at elements("button[data-hook=start-button]") - isVisible.js:54:17 at isVisible("button[data-hook=start-button]") - waitForVisible.js:37:22 2) Compass #spectron when working with the application when working with collections when selecting a collection renders the schema tab: Error: An element could not be located on the page using the given search parameters. at element("li#SCHEMA") - click.js:12:17 at elementIdDisplayed("0.9192226665154364-7") - isVisible.js:71:55 3) Compass #spectron when working with the application when working with collections when selecting a collection when applying a filter the text in refine bar matches query: Error: Promise was rejected with the following reason: Error: An element could not be located on the page using the given search parameters ("input#refine_input"). at elements("input#refine_input") - getValue.js:18:17 at getValue("input#refine_input") - waitForValue.js:37:22 4) Compass #spectron when working with the application when working with collections when selecting a collection when applying a filter samples the matching documents: Error: element (div.sampling-message) still not visible after 15000ms at elements("div.sampling-message") - isVisible.js:54:17 at isVisible("div.sampling-message") - waitForVisible.js:37:22 5) Compass #spectron when working with the application when working with collections when selecting a collection when applying a filter updates the schema view: Error: An element could not be located on the page using the given search parameters ("li.bubble code.selectable"). at elements("li.bubble code.selectable") - getText.js:18:17 at getText("li.bubble code.selectable") - compass-functional.test.js:120:16 6) Compass #spectron when working with the application when working with collections when selecting a collection when applying a filter filters out non-matches from the document list: Error: An element could not be located on the page using the given search parameters. at element("li#DOCUMENTS") - click.js:12:17 at elementIdDisplayed("0.9192226665154364-7") - isVisible.js:71:55 7) Compass #spectron when working with the application when working with collections when selecting a collection when applying a filter includes documents that match the filter: Error: An element could not be located on the page using the given search parameters ("div.element-value-is-string"). at elements("div.element-value-is-string") - getText.js:18:17 at getText("div.element-value-is-string") - compass-functional.test.js:138:16 8) Compass #spectron when working with the application when working with collections when working in the documents tab when viewing documents renders the documents in the list: Error: An element could not be located on the page using the given search parameters. at element("li#DOCUMENTS") - click.js:12:17 at elementIdDisplayed("0.9192226665154364-7") - isVisible.js:71:55 9) Compass #spectron when working with the application when working with collections when working in the explain tab when viewing the explain tab renders the stages: Error: An element could not be located on the page using the given search parameters. at element("li#EXPLAIN_PLAN") - click.js:12:17 at elementIdDisplayed("0.9192226665154364-7") - isVisible.js:71:55 10) Compass #spectron when working with the application when working with collections when working in the indexes tab when viewing the indexes tab renders the indexes: Error: An element could not be located on the page using the given search parameters. at element("li#INDEXES") - click.js:12:17 at elementIdDisplayed("0.9192226665154364-7") - isVisible.js:71:55 * Go back to the full pretest and post test hooks Annoying as we can’t test multiple topologies, but probably a decent idea for Compass itself as we should delegate as much as possible to each public mongodb-js dependency. Note: Needed as otherwise TravisCI hangs for 10 minutes then kills the job even though it completes with exit code 0, i.e. successfully. e.g. https://travis-ci.com/10gen/compass/jobs/57691028 * Drop lts/boron We can add it in when we decide we actually want to switch, as our private Travis seems to be a little under-powered at this time (build queues backing up). --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 17e65571b4b..20e50e7ec92 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ +sudo: required language: node_js node_js: -- 6.3.1 + - 6.3.1 env: matrix: - CXX=g++-4.8 CI=1 From 1e57ec2630747af0e5b1d03b74ad32cc3db63e34 Mon Sep 17 00:00:00 2001 From: Peter Schmidt Date: Thu, 26 Jan 2017 01:47:57 +1100 Subject: [PATCH 3/4] Standardise on no space MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s that way on master, just too lazy to mine git log to cherry-pick the change that did it somewhere between 1.5 and 1.7, to pass code review comments. https://github.com/10gen/compass/pull/758 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 20e50e7ec92..3aeafe94aab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ sudo: required language: node_js node_js: - - 6.3.1 +- 6.3.1 env: matrix: - CXX=g++-4.8 CI=1 From 5b100c9b29d58196f28c8a6b00c50b6ea0705cfe Mon Sep 17 00:00:00 2001 From: Peter Schmidt Date: Thu, 26 Jan 2017 01:52:12 +1100 Subject: [PATCH 4/4] Drop data-test-ids we do not need on 1.5-releases --- .../database/lib/components/create-collection-dialog.jsx | 1 - .../database/lib/components/drop-collection-dialog.jsx | 5 +++-- .../server-stats/lib/component/create-database-dialog.jsx | 7 ++++--- .../server-stats/lib/component/drop-database-dialog.jsx | 4 ++-- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/internal-packages/database/lib/components/create-collection-dialog.jsx b/src/internal-packages/database/lib/components/create-collection-dialog.jsx index c8a7fcac52d..a25fe793a8c 100644 --- a/src/internal-packages/database/lib/components/create-collection-dialog.jsx +++ b/src/internal-packages/database/lib/components/create-collection-dialog.jsx @@ -169,7 +169,6 @@ class CreateCollectionDialog extends React.Component {
- +
- +
+ onSubmit={this.onDropDatabaseButtonClicked.bind(this)} + >