Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Master to 2.4 #986

Merged
merged 119 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
25b225d
2.4.2 Release (#752)
nielsdejong Jan 12, 2024
fcbb2f8
Fixed issue where dashboards were marked as draft incorrectly on sele…
nielsdejong Feb 22, 2024
723c685
Update Configuration Docs (#777)
nielsdejong Feb 22, 2024
67e600a
Bump follow-redirects from 1.15.2 to 1.15.4 in /gallery (#747)
dependabot[bot] Feb 22, 2024
c3d6b84
Bump follow-redirects from 1.15.2 to 1.15.4 (#749)
dependabot[bot] Feb 22, 2024
a235b67
Fix url to docs ui bundle (#756)
nielsdejong Feb 22, 2024
844b2fa
Added standalonePasswordWarningHidden option to config-entrypoint.sh …
josepmonclus Feb 22, 2024
c77eee4
Fix/table export (#781)
alfredorubin96 Feb 22, 2024
620eac4
Cypress e2e component testing (#769)
jbleakleycode Feb 22, 2024
0d4535a
Update quickstart.adoc to point to Aura console (#773)
nielsdejong Feb 22, 2024
f5b13c5
Sidebar refresh button (#788)
alfredorubin96 Feb 22, 2024
8dabb29
Fixing wrong behaviour in GraphChart report Action (#782)
alfredorubin96 Feb 22, 2024
b535a01
Fix/clipping examples (#768)
jbleakleycode Feb 22, 2024
5a4d1d9
Interaction (tooltip) working when "custom label position" == "off" (…
jbleakleycode Feb 22, 2024
8c8fa61
adding symbol to force utf-8 casting in Excel (#790)
alfredorubin96 Feb 23, 2024
90f51f3
Tweak Cypress test issues (#796)
nielsdejong Feb 27, 2024
6b1379b
Fix/parameter select (#794)
alfredorubin96 Feb 28, 2024
001cee1
Handle token expiration in SSO (#611)
OskarDamkjaer Feb 28, 2024
2fa0279
Merge
nielsdejong Feb 28, 2024
f1ca6fa
Added release notes for 2.4.3 release (#799)
nielsdejong Feb 28, 2024
8772663
Add RBAC extensions and dashboard access management (#793)
nielsdejong Feb 28, 2024
19401a3
adding migration for report action fix (#800)
alfredorubin96 Feb 28, 2024
f700e57
fixing forEach on null variable (#801)
nielsdejong Feb 28, 2024
80386fa
Merge pull request #798 from neo4j-labs/develop
alfredorubin96 Feb 28, 2024
291e9cd
fix: in report config bar chart had duplicate settings
m-o-n-i-s-h Feb 29, 2024
4eb9285
fixing gantt chart, new driver version was returning {low,high} numbers
alfredorubin96 Feb 29, 2024
f417f57
Revert "fixing gantt chart, new driver version was returning {low,hig…
alfredorubin96 Feb 29, 2024
825b1e9
fixing gantt chart, new driver version was returning {low,high} numbers
alfredorubin96 Feb 29, 2024
87c1215
Fix number conversion
BennuFire Mar 1, 2024
3ad44c4
Some NaNs
BennuFire Mar 1, 2024
b3e6a63
fixing gantt chart, new driver version was returning {low,high} numbers
alfredorubin96 Feb 29, 2024
c015b87
Revert "fixing gantt chart, new driver version was returning {low,hig…
alfredorubin96 Feb 29, 2024
bb67fc7
Merge branch 'master' into fix/radar_num_upgrade
alfredorubin96 Mar 1, 2024
be5111c
Merge pull request #806 from neo4j-labs/fix/radar_num_upgrade
alfredorubin96 Mar 1, 2024
3cec6d0
Merge pull request #804 from neo4j-labs/fix/gantt-chart
alfredorubin96 Mar 1, 2024
8ba4094
Revert "Fix Radar number NaN High-Low"
BennuFire Mar 1, 2024
cb33e50
Merge pull request #807 from neo4j-labs/revert-806-fix/radar_num_upgrade
BennuFire Mar 1, 2024
b1d12e7
Merge branch 'develop' into fix/radar_num_upgrade
BennuFire Mar 1, 2024
262c35d
Merge pull request #808 from neo4j-labs/fix/radar_num_upgrade
BennuFire Mar 1, 2024
a81b980
NaNs
BennuFire Mar 1, 2024
31dea05
Merge pull request #810 from neo4j-labs/fix/GraphSizeNaNs
BennuFire Mar 1, 2024
d2729d7
fixing number parsing
alfredorubin96 Mar 1, 2024
19b7538
Merge branch 'develop' into fix/parsing-number
BennuFire Mar 1, 2024
2a33380
Merge pull request #811 from neo4j-labs/fix/parsing-number
BennuFire Mar 1, 2024
2211bb7
Revert "Handle token expiration in SSO (#611)" (#815)
nielsdejong Mar 4, 2024
4b779a0
Fixing RBAC feature + parameters (#813)
alfredorubin96 Mar 6, 2024
4a14772
Added 2.4.4 release notes, bumped version (#818)
nielsdejong Mar 6, 2024
7cd0302
Removed old console.log statements
nielsdejong Mar 6, 2024
f63c104
Merge branch 'master' into develop
nielsdejong Mar 6, 2024
31ccf16
2.4.4 Release (#821)
nielsdejong Mar 6, 2024
813e9d1
Update Dockerfile to use yarn.lock (#829)
nielsdejong Mar 15, 2024
ab5e2f7
fixes bug where arrays are passed as [object Object]
LiamEdwardsLamarche Apr 9, 2024
88dbcc7
Wrap text in tables
Apr 9, 2024
3af23cd
Merge remote-tracking branch 'origin/develop' into issue/789-wrap-tex…
Apr 9, 2024
d5d78df
added new scrollable bar(inline style) + more robust way to update us…
AleSim94 Apr 9, 2024
03ed871
Merge remote-tracking branch 'remotes/upstream/develop' into fix/Para…
LiamEdwardsLamarche Apr 9, 2024
ea97143
chnaged the new scollable bar from inline styling to tailwind styling
AleSim94 Apr 9, 2024
774dc7c
just made it little bigger
AleSim94 Apr 9, 2024
52e3438
Wrap words
Apr 10, 2024
cafc366
Render HTML strings
Apr 10, 2024
0d24ec0
Disable auto-sorting for Cypher Parameter Select
Apr 10, 2024
6416b06
cleaning according to sonarqube
alfredorubin96 Apr 11, 2024
ec61cb1
shrinking menu lenght
alfredorubin96 Apr 11, 2024
37970ed
Merge pull request #857 from neo4j-labs/issue/856-auto-sorting
mariusconjeaud Apr 18, 2024
0bd87b8
Merge pull request #855 from neo4j-labs/issue/848-html-rendering
mariusconjeaud Apr 18, 2024
85f4e4f
Merge pull request #854 from neo4j-labs/feature/rbac_feature_updates
mariusconjeaud Apr 18, 2024
58c8bc5
Merge pull request #852 from neo4j-labs/issue/789-wrap-text-table
mariusconjeaud Apr 18, 2024
6b11588
Merge branch 'develop' into fix/ParameterListParse
mariusconjeaud Apr 18, 2024
6e54e0d
Merge pull request #849 from LiamEdwardsLamarche/fix/ParameterListParse
mariusconjeaud Apr 18, 2024
28cc5a6
Fix padding in compact table with report actions
Apr 22, 2024
ace909f
Merge pull request #863 from neo4j-labs/issue/compact-table-report
mariusconjeaud Apr 22, 2024
ae7e3e5
html render rollback due to too many bugs
LiamEdwardsLamarche Apr 22, 2024
ac672a3
Merge branch 'develop' into fix/htmlRenderRollback
mariusconjeaud Apr 22, 2024
a281406
fixes typo
LiamEdwardsLamarche Apr 22, 2024
3b58bf8
Merge branch 'fix/htmlRenderRollback' of https://github.com/LiamEdwar…
LiamEdwardsLamarche Apr 22, 2024
62cf070
code cleanup
LiamEdwardsLamarche Apr 22, 2024
9c4475e
Merge pull request #864 from LiamEdwardsLamarche/fix/htmlRenderRollback
mariusconjeaud Apr 22, 2024
eb05802
Update release notes 2.4.5
Apr 22, 2024
2adc6e8
Update version tags
Apr 22, 2024
f6e2333
Merge pull request #866 from neo4j-labs/release/2.4.5
mariusconjeaud Apr 22, 2024
5b47a54
Merge pull request #867 from neo4j-labs/develop
mariusconjeaud Apr 22, 2024
eb046c7
fixing casting error at while loading the dashboards, to check when w…
alfredorubin96 Apr 23, 2024
333d9a8
fixing casting at loading
alfredorubin96 Apr 23, 2024
f40c9e1
Merge branch 'develop' into fix/parameters-casting-at-start
nielsdejong Apr 26, 2024
53c5e1d
Make wrapping in table optional, enabled by default (#872)
mariusconjeaud Apr 26, 2024
308afde
Fix bad wrapping for arrays (#868)
mariusconjeaud Apr 26, 2024
43c9463
Fixed issues where cross database dashboard sharing always reverted b…
nielsdejong Apr 26, 2024
1195ff5
Added option to define style config using environment variables for t…
nielsdejong Apr 26, 2024
912994a
Added release notes for 2.4.6 (#877)
nielsdejong Apr 26, 2024
2fc0983
2.4.6 Release (#878)
nielsdejong Apr 26, 2024
e14324c
Fix multi-parameter select and transposed table side effect
Apr 29, 2024
21f9547
Fix multi-parameter select and transposed table side effect
Apr 29, 2024
54528c8
Merge branch 'bug/array-spaghetti-bowl' of https://github.com/neo4j-l…
Apr 29, 2024
c0a030b
Write tests for array render method
Apr 30, 2024
f2ff256
Remove debugging test skips
May 2, 2024
2ff63c9
Add test for multiple parameter select
May 2, 2024
7e10e22
Fix tests
May 2, 2024
9f4d94f
Bump ejs from 3.1.9 to 3.1.10 in /gallery
dependabot[bot] May 2, 2024
8e66f33
Merge branch 'develop' into fix/remove-duplicates-in-report-configs
m-o-n-i-s-h May 3, 2024
04f048a
Remove redundant ternary operator
May 3, 2024
c1013c9
changed file according to PR #837
alfredorubin96 May 7, 2024
16b3d5a
Merge pull request #874 from neo4j-labs/fix/parameters-casting-at-start
mariusconjeaud May 7, 2024
84cd7ed
Merge pull request #881 from neo4j-labs/bug/array-spaghetti-bowl
mariusconjeaud May 7, 2024
1053b59
Merge pull request #802 from mercedes-benz/fix/remove-duplicates-in-r…
mariusconjeaud May 7, 2024
edff3f6
Merge pull request #885 from neo4j-labs/fix/fraud-dashboard
mariusconjeaud May 7, 2024
8d901be
Release prep
May 7, 2024
ce7a21d
Add contributors to release notes
May 7, 2024
c504094
Merge pull request #886 from neo4j-labs/develop
mariusconjeaud May 7, 2024
3ae7632
fixing string edge case at param loading
alfredorubin96 May 10, 2024
d165cce
Fix: Default rel width applied on missing property value
nielsdejong May 13, 2024
c08207c
Merge pull request #889 from neo4j-labs/fix/rel-width-property-not-used
mariusconjeaud May 13, 2024
e8b85bd
Update release notes
May 13, 2024
546b6ae
Remove console prints
May 13, 2024
0078f06
Merge pull request #887 from neo4j-labs/fix/persist-params
mariusconjeaud May 13, 2024
7fa9ad3
Merge branch 'master' into develop
mariusconjeaud May 13, 2024
af51209
Merge pull request #890 from neo4j-labs/develop
mariusconjeaud May 13, 2024
3670a18
Merge branch 'master' into dependabot/npm_and_yarn/gallery/ejs-3.1.10
mariusconjeaud May 13, 2024
42b196a
Merge pull request #882 from neo4j-labs/dependabot/npm_and_yarn/galle…
mariusconjeaud May 13, 2024
601c95f
2.4.9 Release (#973)
nielsdejong Nov 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"extends": ["eslint:recommended", "prettier", "plugin:@typescript-eslint/recommended"], // this is optional
"env": {
"browser": true,
"node": true
"node": true,
"jest": true
},
"settings": {
"react": {
Expand Down Expand Up @@ -166,5 +167,9 @@
],
"symbol-description": "error",
"yoda": "error"
},
"globals": {
"cy": "readonly",
"Cypress": "readonly"
}
}
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.2
tags: ${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_LABS_USERNAME }}/neodash:2.4.9
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.2
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/neodash:latest,${{ secrets.DOCKER_HUB_USERNAME }}/neodash:2.4.9
deploy-gallery:
runs-on: neodash-runners
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ target
/coverage
/.nyc_output
cypress/videos

cypress/screenshots
# production
/build
/dist
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.2"
LABEL version="2.4.9"
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@

## NeoDash - Neo4j Dashboard Builder
NeoDash is an open source tool for visualizing your Neo4j data. It lets you group visualizations together as dashboards, and allow for interactions between reports.
## NeoDash Labs - Neo4j Dashboard Builder

![screenshot](public/screenshot.png)
![screenshot](evolving.png)

In September 2024 **Neo4j [announced](https://www.datanami.com/2024/09/04/neo4j-simplifies-graph-database-in-the-cloud/#:~:text=NeoDash%20is%20an%20open%20source,was%20open%20source%2C%20not%20supported) NeoDash is evolving into a fully supported dashboard builder, as part of the Neo4j product suite**.

This project (NeoDash Labs) will still be available and contain experimental features, but will **not** have official support. If you're interested to get official support for NeoDash as part of a Neo4j License agreement, please reach out to your Neo4j contact person.

## About NeoDash Labs
NeoDash is a web-based tool for visualizing your Neo4j data. It lets you group visualizations together as dashboards, and allow for interactions between reports.

Neodash supports presenting your data as tables, graphs, bar charts, line charts, maps and more. It contains a Cypher editor to directly write the Cypher queries that populate the reports. You can save dashboards to your database, and share them with others.

## Try NeoDash
## Try NeoDash Labs
You can run NeoDash in one of three ways:

1. You can install NeoDash into Neo4j Desktop from the [graph app gallery](https://install.graphapp.io). NeoDash will automatically connect to your active database.
2. You can run NeoDash from a web browser by visiting http://neodash.graphapp.io.
1. You can install NeoDash Labs into Neo4j Desktop from the [graph app gallery](https://install.graphapp.io). NeoDash will automatically connect to your active database.
> Note: never versions of Neo4j Desktop do not support adding experimental graph apps such as NeoDash.

2. You can run NeoDash Labs from a web browser by visiting http://neodash.graphapp.io.
3. For on-prem deployments, you can build the application yourself, or pull the latest Docker image from Docker Hub.
```
# Run the application on http://localhost:5005
Expand Down Expand Up @@ -79,4 +87,4 @@ If you have any questions about NeoDash, please reach out to the maintainers:
- Connect with us on the [Neo4j Discord](https://neo4j.com/developer/discord/).
- Create a post on the Neo4j [Community Forum](https://community.neo4j.com/).

> NeoDash is a free and open-source tool developed by the Neo4j community - not an official Neo4j product. If you have a need for a commercial agreement around training, custom extensions or other services, please contact the [Neo4j Professional Services](https://neo4j.com/professional-services/) team.
> NeoDash Labs is a free and open-source tool developed by the Neo4j community - not an official Neo4j product. Use at your own risk!
100 changes: 100 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,103 @@
## NeoDash 2.4.9
This release adds some minor changes to documentation and implements some community contributions.
- Added notice about project evolution: [#967](https://github.com/neo4j-labs/neodash/pull/967)
- Added community contributions and bug fixes:
[#967](https://github.com/neo4j-labs/neodash/pull/967)
[#894](https://github.com/neo4j-labs/neodash/pull/894)
[#822](https://github.com/neo4j-labs/neodash/pull/822)
[#951](https://github.com/neo4j-labs/neodash/pull/951)
[#946](https://github.com/neo4j-labs/neodash/pull/946)
[#944](https://github.com/neo4j-labs/neodash/pull/944)
[#943](https://github.com/neo4j-labs/neodash/pull/943)
[#938](https://github.com/neo4j-labs/neodash/pull/938)
[#935](https://github.com/neo4j-labs/neodash/pull/935)
[#918](https://github.com/neo4j-labs/neodash/pull/918)
[#908](https://github.com/neo4j-labs/neodash/pull/908)
[#906](https://github.com/neo4j-labs/neodash/pull/906)
[#902](https://github.com/neo4j-labs/neodash/pull/902)
[#895](https://github.com/neo4j-labs/neodash/pull/895)
[#893](https://github.com/neo4j-labs/neodash/pull/893)

## 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)
- Reverted new connection handler for auto-renewed SSO sessions. [815](https://github.com/neo4j-labs/neodash/pull/815)
- Improved handling of parameters in form extension, resolved local state issues. [813](https://github.com/neo4j-labs/neodash/pull/813)
- Updated Role management extension to no longer execute queries in parallel, improved UX and error handling [813](https://github.com/neo4j-labs/neodash/pull/813)

If you are currently using NeoDash version 2.4.3, we recommend updating as soon as possible.

## NeoDash 2.4.3
This release contains several improvements and additions to multi-dashboard management, as well as a bug fixes and a variety of quality-of-life improvements:

Dashboard management and access control:
- Added a UI for handling dashboard access using RBAC, as well as a new extension to simply access control.
- Added button to sidebar to refresh the list of dashboards saved in the database.
- Improved handling and detection of draft dashboards in the dashboard sidebar.

Other improvements:
- Changed CSV export functionality for tables to use UTF-8 format.
- Various improvements / fixes to the documentation to include new images, and up-to-date functionality.
- Added logic for handling refresh tokens when connected to NeoDash via SSO.
- Incorporated tooltips for bar charts with and without custom labels.

Bug fixes and testing:
- Implemented bug fixes on type casting for numeric parameter selectors.
- Fixed issue with report actions not functioning properly on node click events.
- Extended test suite with Cypress tests for advanced settings in the bar chart.

Thanks to all the contributors for this release:
- [OskarDamkjaer](https://github.com/OskarDamkjaer)
- [alfredorubin96](https://github.com/alfredorubin96),
- [AleSim94](https://github.com/AleSim94),
- [BennuFire](https://github.com/BennuFire),
- [jacobbleakley-neo4j](https://github.com/jacobbleakley-neo4j),
- [josepmonclus](https://github.com/josepmonclus)
- [nielsdejong](https://github.com/nielsdejong)


## NeoDash 2.4.2
This is a release with a large amount of quality of life improvements, as well as some new features:

Expand Down
1 change: 1 addition & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export default defineConfig({
projectId: 'a8nh14',
video: false,
e2e: {
defaultCommandTimeout: 20000,
experimentalMemoryManagement: true,
numTestsKeptInMemory: 0,
baseUrl: 'http://localhost:3000',
Expand Down
156 changes: 156 additions & 0 deletions cypress/Page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
const DB_URL = 'localhost';
const DB_USERNAME = 'neo4j';
const DB_PASSWORD = 'test1234';

export class Page {
constructor(cardSelector) {
this.cardSelector = cardSelector;
}

init() {
cy.viewport(1920, 1080);
cy.visit('/', {
onBeforeLoad(win) {
win.localStorage.clear();
},
});
return this;
}

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

connectToNeo4j() {
cy.get('#form-dialog-title', { timeout: 20000 }).should('contain', 'Connect to Neo4j');
cy.get('#url').clear().type(DB_URL);
cy.get('#dbusername').clear().type(DB_USERNAME);
cy.get('#dbpassword').type(DB_PASSWORD);
cy.get('button').contains('Connect').click();
cy.wait(100);
return this;
}

enableReportActions() {
cy.get('main button[aria-label="Extensions').should('be.visible').click();
cy.get('#checkbox-actions').scrollIntoView();
cy.get('#checkbox-actions').should('be.visible').click();
cy.get('.ndl-dialog-close').scrollIntoView().should('be.visible').click();
cy.wait(100);
return this;
}

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(100);
return this;
}

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(100);
return this;
}

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(`${this.cardSelector} #type`, { timeout: 2000 }).should('be.visible').click();
cy.contains(type).click();
cy.wait(100);
return this;
}

createReportOfType(type, query, fast = false, run = true) {
this.selectReportOfType(type);
if (fast) {
cy.get(`${this.cardSelector} .ReactCodeMirror`).type(query, {
delay: 1,
parseSpecialCharSequences: false,
});
} else {
cy.get(`${this.cardSelector} .ReactCodeMirror`).type(query, { parseSpecialCharSequences: false });
}
cy.wait(400);

if (run) {
this.closeSettings();
}

cy.wait(100);
return this;
}

openSettings() {
cy.get(this.cardSelector).find('button[aria-label="settings"]', { WAITING_TIME: 2000 }).click();
cy.wait(100);
return this;
}

closeSettings() {
cy.get(`${this.cardSelector} button[aria-label="run"]`).click();
cy.wait(100);
return this;
}

openAdvancedSettings() {
this.openSettings();
cy.get(this.cardSelector).contains('Advanced settings').click();
cy.wait(100);
return this;
}

closeAdvancedSettings() {
cy.get(this.cardSelector).contains('Advanced settings').click();
this.closeSettings();
return this;
}

openReportActionsMenu() {
this.openSettings();
cy.get(this.cardSelector).find('button[aria-label="custom actions"]').click();
cy.wait(100);
return this;
}

updateDropdownAdvancedSetting(settingLabel, targetValue) {
this.openAdvancedSettings();
cy.get(`${this.cardSelector} .ndl-dropdown`).contains(settingLabel).siblings('div').click();
cy.contains(targetValue).click();
this.closeAdvancedSettings();
return this;
}

updateChartQuery(query) {
this.openSettings();

cy.get(this.cardSelector)
.find('.ndl-cypher-editor div[role="textbox"]')
.should('be.visible')
.click()
.clear()
.type(query);
cy.wait(100);

this.closeSettings();
return this;
}
}
Loading
Loading