From 45c64db90f5c02c561ffe55b37809c2a91137883 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 14 May 2019 21:15:12 +0000 Subject: [PATCH 1/2] Bump neo4j-graphql-js from 2.4.2 to 2.6.0 in /backend Bumps [neo4j-graphql-js](https://github.com/neo4j-graphql/neo4j-graphql-js) from 2.4.2 to 2.6.0. - [Release notes](https://github.com/neo4j-graphql/neo4j-graphql-js/releases) - [Changelog](https://github.com/neo4j-graphql/neo4j-graphql-js/blob/master/CHANGELOG.md) - [Commits](https://github.com/neo4j-graphql/neo4j-graphql-js/commits) Signed-off-by: dependabot[bot] --- backend/package.json | 2 +- backend/yarn.lock | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/backend/package.json b/backend/package.json index 798ed764c..37c01839b 100644 --- a/backend/package.json +++ b/backend/package.json @@ -71,7 +71,7 @@ "lodash": "~4.17.11", "ms": "~2.1.1", "neo4j-driver": "~1.7.4", - "neo4j-graphql-js": "~2.4.2", + "neo4j-graphql-js": "~2.6.0", "node-fetch": "~2.5.0", "npm-run-all": "~4.1.5", "request": "~2.88.0", diff --git a/backend/yarn.lock b/backend/yarn.lock index 51b0a136d..f054fa2f2 100644 --- a/backend/yarn.lock +++ b/backend/yarn.lock @@ -3819,7 +3819,7 @@ graphql-yoga@~1.17.4: graphql-tools "^4.0.0" subscriptions-transport-ws "^0.9.8" -"graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0", graphql@^14.0.2, graphql@~14.3.0: +"graphql@^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0", graphql@^14.2.1, graphql@~14.3.0: version "14.3.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.3.0.tgz#34dd36faa489ff642bcd25df6c3b4f988a1a2f3e" integrity sha512-MdfI4v7kSNC3NhB7cF8KNijDsifuWO2XOtzpyququqaclO8wVuChYv+KogexDwgP5sp7nFI9Z6N4QHgoLkfjrg== @@ -5552,7 +5552,7 @@ negotiator@0.6.1: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= -neo4j-driver@^1.7.2, neo4j-driver@~1.7.4: +neo4j-driver@^1.7.3, neo4j-driver@~1.7.4: version "1.7.4" resolved "https://registry.yarnpkg.com/neo4j-driver/-/neo4j-driver-1.7.4.tgz#9661cf643b63818bff85e82c4691918e75098c1e" integrity sha512-pbK1HbXh92zNSwMlXL8aNynkHohg9Jx/Tk+EewdJawGm8n8sKIY4NpRkp0nRw6RHvVBU3u9cQXt01ftFVe7j+A== @@ -5561,15 +5561,15 @@ neo4j-driver@^1.7.2, neo4j-driver@~1.7.4: text-encoding "^0.6.4" uri-js "^4.2.1" -neo4j-graphql-js@~2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/neo4j-graphql-js/-/neo4j-graphql-js-2.4.2.tgz#0acf1d0b3a8a1da516c29dbc6b7c90ef1d0c82bd" - integrity sha512-K1A61T6ZaEePXg2wZ4plYsQYxo7cxjHtZ6wZX7JXiX4y96c82J5VcD++FXcUys2jG4z4Bz40YS0Ce7ybMjsmUg== +neo4j-graphql-js@~2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/neo4j-graphql-js/-/neo4j-graphql-js-2.6.0.tgz#1c418c5e4de384bd0992f99538d3d056d0602669" + integrity sha512-YStuqeBg6sjXQvQjICz+jpG4W58yHz3Fi1Gjw9HsVYeCSr97ARbGn4Sl02970IKpBeRYqKt1N1Xp3QIvO3OMIw== dependencies: - graphql "^14.0.2" + graphql "^14.2.1" graphql-auth-directives "^2.1.0" lodash "^4.17.11" - neo4j-driver "^1.7.2" + neo4j-driver "^1.7.3" next-tick@^1.0.0: version "1.0.0" From a819d6353a00df75587ca77bec3fa5baa4d7f594 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Fri, 17 May 2019 00:09:54 +0200 Subject: [PATCH 2/2] Fix probably randomly failing cypress test @mattwr18 @ulfgebhardt @tirokk @appinteractive @ogerly I think I just fixed a randomly failing test (so-called "flaky" test). After an update of `neo4j-graphql-js` I wondered why the `TagsAndCategories.feature` test failed consistently. It turns out the table that you can see in the test is ordered by the "Users" column: | | Name | Users | Posts | | 1 | Democracy | 2 | 3 | | 2 | Ecology | 1 | 1 | | 3 | Nature | 1 | 2 | So there is a tie between row 2 and row 3. It seems that on version 2.4.0 the backend would return those rows in arbitrary order and now it returns them in a deterministic order, thus failing the test every time. Therefore I changed the test setup and I believe this should also make the build more robust now. --- .../administration/TagsAndCategories.feature | 6 +++--- cypress/integration/common/steps.js | 13 ++++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/cypress/integration/administration/TagsAndCategories.feature b/cypress/integration/administration/TagsAndCategories.feature index 813ff5d80..e55535ea9 100644 --- a/cypress/integration/administration/TagsAndCategories.feature +++ b/cypress/integration/administration/TagsAndCategories.feature @@ -32,6 +32,6 @@ Feature: Tags and Categories And I click on the menu item "Tags" Then I can see the following table: | | Name | Users | Posts | - | 1 | Democracy | 2 | 3 | - | 2 | Ecology | 1 | 1 | - | 3 | Nature | 1 | 2 | + | 1 | Democracy | 3 | 4 | + | 2 | Nature | 2 | 3 | + | 3 | Ecology | 1 | 1 | diff --git a/cypress/integration/common/steps.js b/cypress/integration/common/steps.js index 0be3f882f..387f33ac0 100644 --- a/cypress/integration/common/steps.js +++ b/cypress/integration/common/steps.js @@ -49,14 +49,23 @@ Given('we have a selection of tags and categories as well as posts', () => { email: 'author@example.org', password: '1234' } + const yetAnotherAuthor = { + id: 'yetAnotherAuthor', + email: 'yet-another-author@example.org', + password: '1234' + } cy.factory() .create('User', someAuthor) .authenticateAs(someAuthor) .create('Post', { id: 'p0' }) .create('Post', { id: 'p1' }) cy.factory() - .authenticateAs(loginCredentials) + .create('User', yetAnotherAuthor) + .authenticateAs(yetAnotherAuthor) .create('Post', { id: 'p2' }) + cy.factory() + .authenticateAs(loginCredentials) + .create('Post', { id: 'p3' }) .relate('Post', 'Categories', { from: 'p0', to: 'cat1' }) .relate('Post', 'Categories', { from: 'p1', to: 'cat2' }) .relate('Post', 'Categories', { from: 'p2', to: 'cat1' }) @@ -65,7 +74,9 @@ Given('we have a selection of tags and categories as well as posts', () => { .relate('Post', 'Tags', { from: 'p0', to: 't3' }) .relate('Post', 'Tags', { from: 'p1', to: 't2' }) .relate('Post', 'Tags', { from: 'p1', to: 't3' }) + .relate('Post', 'Tags', { from: 'p2', to: 't2' }) .relate('Post', 'Tags', { from: 'p2', to: 't3' }) + .relate('Post', 'Tags', { from: 'p3', to: 't3' }) }) Given('we have the following user accounts:', table => {