Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/npm_and_yarn/gallery/webpack-d…
Browse files Browse the repository at this point in the history
…ev-middleware-5.3.4
  • Loading branch information
mariusconjeaud authored May 13, 2024
2 parents dc59000 + d2cbd1c commit ec4010c
Show file tree
Hide file tree
Showing 37 changed files with 1,191 additions and 666 deletions.
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
target-branch: 'develop'

- package-ecosystem: 'npm'
directory: '/gallery'
schedule:
interval: 'weekly'
target-branch: 'develop'

- package-ecosystem: 'npm'
directory: '/docs'
schedule:
interval: 'weekly'
target-branch: 'develop'
6 changes: 3 additions & 3 deletions .github/workflows/master-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
with:
build: yarn run build
start: yarn run dev
wait-on: "http://localhost:3000"
wait-on: 'http://localhost:3000'
browser: chrome
build-s3:
needs: build-test
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:2.4.4
tags: ${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:2.4.8
build-docker-legacy:
needs: build-test
runs-on: neodash-runners
Expand All @@ -103,7 +103,7 @@ jobs:
context: .
file: ./Dockerfile
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.4.4
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.4.8
deploy-gallery:
runs-on: neodash-runners
strategy:
Expand Down
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ WORKDIR /usr/local/src/neodash

# Copy sources and install/build
COPY ./package.json /usr/local/src/neodash/package.json
COPY ./yarn.lock /usr/local/src/neodash/yarn.lock

RUN yarn install
COPY ./ /usr/local/src/neodash
Expand Down Expand Up @@ -43,4 +44,4 @@ USER nginx
EXPOSE $NGINX_PORT

HEALTHCHECK cmd curl --fail "http://localhost:$NGINX_PORT" || exit 1
LABEL version="2.4.4"
LABEL version="2.4.8"
42 changes: 42 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,45 @@
## NeoDash 2.4.8
This is a minor release containing an important fix and other minor fixes:

- Fixed a bug where loading a dashboard would reset parameters to null ([887](https://github.com/neo4j-labs/neodash/pull/887)).
- Fix relationship width parameter for Graph report ([889](https://github.com/neo4j-labs/neodash/pull/889)).

Thanks to all the contributors for this release:
- [alfredorubin96](https://github.com/alfredorubin96),
- [nielsdejong](https://github.com/nielsdejong).

## NeoDash 2.4.7
This is a minor release containing a few critical fixes and general code quality improvements:

- Fix multiple parameter select ([881](https://github.com/neo4j-labs/neodash/pull/881)).
- Fix parameter casting error when loading dashboards([874](https://github.com/neo4j-labs/neodash/pull/874)).
- Fix the fraud demo in the [Example Gallery](https://neodash-gallery.graphapp.io/).

Thanks to all the contributors for this release:
- [alfredorubin96](https://github.com/alfredorubin96),
- [MariusC](https://github.com/mariusconjeaud),
- [elizarp](https://github.com/elizarp).

## NeoDash 2.4.6
This is a minor release containing a few critical fixes and some extra style customizations:

- Fix bad text wrapping for arrays in tables ([868](https://github.com/neo4j-labs/neodash/pull/868)).
- Make wrapping in table optional, disabled by default ([872](https://github.com/neo4j-labs/neodash/pull/872)).
- Fixed issues where cross database dashboard sharing always reverted back to the default database ([873](https://github.com/neo4j-labs/neodash/pull/873)).
- Added option to define style config using environment variables for the Docker image ([876](https://github.com/neo4j-labs/neodash/pull/876)).

## NeoDash 2.4.5
This is a small release containing a few fixes:
- Fixed rendering of string arrays inside tables, report titles, and report action buttons [849](https://github.com/neo4j-labs/neodash/pull/849)
- Allowed text to wrap in tables, preserving the number of rows [852](https://github.com/neo4j-labs/neodash/pull/852)
- Disabled auto-sorting of Cypher query-based Parameter Select ; use Cypher ORDER BY to control result order [857](https://github.com/neo4j-labs/neodash/pull/857)
- Updated role selector menu, and made user updates more robust [854](https://github.com/neo4j-labs/neodash/pull/854)

Thanks to all the contributors for this release:
- [MariusC](https://github.com/mariusconjeaud),
- [LiamEdwardsLamarche](https://github.com/LiamEdwardsLamarche),
- [AleSim94](https://github.com/AleSim94)

## NeoDash 2.4.4
This is a hotfix release fixing some breaking issues in the 2.4.3:
- Fixed number parsing using newer versions of the Neo4j driver. [811](https://github.com/neo4j-labs/neodash/pull/811)
Expand Down
154 changes: 154 additions & 0 deletions cypress/e2e/render/array.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
import { stringArrayCypherQuery, intArrayCypherQuery, pathArrayCypherQuery } from '../../fixtures/cypher_queries';
import {
enableReportActions,
createReportOfType,
closeSettings,
toggleTableTranspose,
openReportActionsMenu,
selectReportOfType,
openAdvancedSettings,
updateDropdownAdvancedSetting,
} from '../utils';

const WAITING_TIME = 20000;
const CARD_SELECTOR = 'main .react-grid-item:eq(2)';
// Ignore warnings that may appear when using the Cypress dev server
Cypress.on('uncaught:exception', (err, runnable) => {
console.log(err, runnable);
return false;
});

describe('Testing array rendering', () => {
beforeEach('open neodash', () => {
cy.viewport(1920, 1080);
cy.visit('/', {
onBeforeLoad(win) {
win.localStorage.clear();
},
});

cy.get('#form-dialog-title', { WAITING_TIME: WAITING_TIME })
.should('contain', 'NeoDash - Neo4j Dashboard Builder')
.click();

cy.get('#form-dialog-title').then(($div) => {
const text = $div.text();
if (text == 'NeoDash - Neo4j Dashboard Builder') {
cy.wait(500);
// Create new dashboard
cy.contains('New Dashboard').click();
}
});

cy.get('#form-dialog-title', { WAITING_TIME: WAITING_TIME }).should('contain', 'Connect to Neo4j');

cy.get('#url').clear().type('localhost');
cy.get('#dbusername').clear().type('neo4j');
cy.get('#dbpassword').type('test1234');
cy.get('button').contains('Connect').click();
cy.wait(100);
});

it('creates a table that contains string arrays', () => {
cy.checkInitialState();
enableReportActions();
createReportOfType('Table', stringArrayCypherQuery, true, true);

// Standard array, displays strings joined with comma and whitespace
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(0)`).should('have.text', 'initial, list');
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(1)`).should('have.text', 'other, list');

// Now, transpose the table
toggleTableTranspose(CARD_SELECTOR, true);
cy.get(`${CARD_SELECTOR} .MuiDataGrid-columnHeaderTitle:eq(1)`, { timeout: WAITING_TIME }).should(
'have.text',
'initial,list'
);
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(1)`).should('have.text', 'other, list');

// Transpose back
// And add a report action
toggleTableTranspose(CARD_SELECTOR, false);
openReportActionsMenu(CARD_SELECTOR);
cy.get('.ndl-modal').find('button[aria-label="add"]').click();
cy.get('.ndl-modal').find('input:eq(2)').type('column');
cy.get('.ndl-modal').find('input:eq(5)').type('test_param');
cy.get('.ndl-modal').find('input:eq(6)').type('column');
cy.get('.ndl-modal').find('button').contains('Save').click();
closeSettings(CARD_SELECTOR);
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(0)`)
.find('button')
.should('be.visible')
.should('have.text', 'initial, list')
.click();

// Previous step's click set a parameter from the array
// Test that parameter rendering works
cy.get(`${CARD_SELECTOR} .MuiCardHeader-root`).find('input').type('$neodash_test_param').blur();
cy.get(`${CARD_SELECTOR} .MuiCardHeader-root`).find('input').should('have.value', 'initial, list');
});

it('creates a table that contains int arrays', () => {
cy.checkInitialState();
createReportOfType('Table', intArrayCypherQuery, true, true);

// Standard array, displays strings joined with comma and whitespace
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(0)`).should('have.text', '1, 2');
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(1)`).should('have.text', '3, 4');

// Now, transpose the table
toggleTableTranspose(CARD_SELECTOR, true);
cy.get(`${CARD_SELECTOR} .MuiDataGrid-columnHeaderTitle:eq(1)`, { timeout: WAITING_TIME }).should(
'have.text',
'1,2'
);
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(1)`).should('have.text', '3, 4');
});

it('creates a table that contains nodes and rels', () => {
cy.checkInitialState();
createReportOfType('Table', pathArrayCypherQuery, true, true);

// Standard array, displays a path with two nodes and a relationship
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(0)`).should('have.text', 'PersonACTED_INMovie');
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(0) button`).should('have.length', 2);
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(0) button:eq(0)`).should('have.text', 'Person');
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(0) button:eq(1)`).should('have.text', 'Movie');
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(0) .MuiChip-root`).should('have.length', 1);
cy.get(`${CARD_SELECTOR} .MuiDataGrid-cell:eq(0) .MuiChip-root`).should('have.text', 'ACTED_IN');
});

it('creates a single value report which is an array', () => {
cy.checkInitialState();
createReportOfType('Single Value', stringArrayCypherQuery, true, true);
cy.get(CARD_SELECTOR).should('have.text', 'initial, list');
});

it('creates a multi parameter select', () => {
cy.checkInitialState();
selectReportOfType('Parameter Select');
cy.get('main .react-grid-item:eq(2) label[for="Selection Type"]').siblings('div').click();
// Set up the parameter select
cy.contains('Node Property').click();
cy.wait(100);
cy.contains('Node Label').click();
cy.contains('Node Label').siblings('div').find('input').type('Movie');
cy.wait(1000);
cy.get('.MuiAutocomplete-popper').contains('Movie').click();
cy.contains('Property Name').click();
cy.contains('Property Name').siblings('div').find('input').type('title');
cy.wait(1000);
cy.get('.MuiAutocomplete-popper').contains('title').click();
// Enable multiple selection
closeSettings(CARD_SELECTOR);
updateDropdownAdvancedSetting(CARD_SELECTOR, 'Multiple Selection', 'on');
// Finally, select a few values in the parameter select
cy.get(CARD_SELECTOR).contains('Movie title').click();
cy.get(CARD_SELECTOR).contains('Movie title').siblings('div').find('input').type('a');
cy.get('.MuiAutocomplete-popper').contains('Apollo 13').click();
cy.get(CARD_SELECTOR).contains('Movie title').siblings('div').find('input').type('t');
cy.get('.MuiAutocomplete-popper').contains('The Matrix').click();
cy.get(CARD_SELECTOR).contains('Apollo 13').should('be.visible');
cy.get(CARD_SELECTOR).contains('The Matrix').should('be.visible');
});
});
44 changes: 1 addition & 43 deletions cypress/e2e/start_page.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
gaugeChartCypherQuery,
formCypherQuery,
} from '../fixtures/cypher_queries';
import { createReportOfType, selectReportOfType, enableAdvancedVisualizations, enableFormsExtension } from './utils';

const WAITING_TIME = 20000;
// Ignore warnings that may appear when using the Cypress dev server
Expand Down Expand Up @@ -293,46 +294,3 @@ describe('NeoDash E2E Tests', () => {
}
});
});

function enableAdvancedVisualizations() {
cy.get('main button[aria-label="Extensions').should('be.visible').click();
cy.get('#checkbox-advanced-charts').should('be.visible').click();
cy.get('.ndl-dialog-close').scrollIntoView().should('be.visible').click();
cy.wait(200);
}

function enableFormsExtension() {
cy.get('main button[aria-label="Extensions').should('be.visible').click();
cy.get('#checkbox-forms').scrollIntoView();
cy.get('#checkbox-forms').should('be.visible').click();
cy.get('.ndl-dialog-close').scrollIntoView().should('be.visible').click();
cy.wait(200);
}

function selectReportOfType(type) {
cy.get('main .react-grid-item button[aria-label="add report"]').should('be.visible').click();
cy.get('main .react-grid-item')
.contains('No query specified.')
.parentsUntil('.react-grid-item')
.find('button[aria-label="settings"]', { timeout: 2000 })
.should('be.visible')
.click();
cy.get('main .react-grid-item:eq(2) #type', { timeout: 2000 }).should('be.visible').click();
cy.contains(type).click();
cy.wait(100);
}

function createReportOfType(type, query, fast = false, run = true) {
selectReportOfType(type);
if (fast) {
cy.get('main .react-grid-item:eq(2) .ReactCodeMirror').type(query, { delay: 1, parseSpecialCharSequences: false });
} else {
cy.get('main .react-grid-item:eq(2) .ReactCodeMirror').type(query, { parseSpecialCharSequences: false });
}
cy.wait(400);

cy.get('main .react-grid-item:eq(2)').contains('Advanced settings').click();
if (run) {
cy.get('main .react-grid-item:eq(2) button[aria-label="run"]').click();
}
}
Loading

0 comments on commit ec4010c

Please sign in to comment.