Skip to content

Commit b870e6a

Browse files
Feature/testing improvement (#221)
Adding Neo4j Container inside Github Actions
1 parent 963a8df commit b870e6a

File tree

6 files changed

+540
-6
lines changed

6 files changed

+540
-6
lines changed

.github/workflows/develop-test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ jobs:
1717
uses: actions/setup-node@v1
1818
with:
1919
node-version: ${{ matrix.node-version }}
20+
- name: Creating Neo4j Container
21+
run: |
22+
chmod +x ./scripts/docker-neo4j-initializer/docker-neo4j.sh
23+
./scripts/docker-neo4j-initializer/docker-neo4j.sh
24+
sleep 30s
25+
chmod +x ./scripts/docker-neo4j-initializer/start-movies-db.sh
26+
./scripts/docker-neo4j-initializer/start-movies-db.sh
2027
- run: yarn install
2128
- name: Cypress run
2229
uses: cypress-io/github-action@v2

.github/workflows/master.test.yml renamed to .github/workflows/master-test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ jobs:
1717
uses: actions/setup-node@v1
1818
with:
1919
node-version: ${{ matrix.node-version }}
20+
- name: Creating Neo4j Container
21+
run: |
22+
chmod +x ./scripts/docker-neo4j-initializer/docker-neo4j.sh
23+
./scripts/docker-neo4j-initializer/docker-neo4j.sh
24+
sleep 30s
25+
chmod +x ./scripts/docker-neo4j-initializer/start-movies-db.sh
26+
./scripts/docker-neo4j-initializer/start-movies-db.sh
2027
- run: yarn install
2128
- name: Cypress run
2229
uses: cypress-io/github-action@v2

cypress/integration/start_page.spec.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ describe('NeoDash E2E Tests', () => {
1212
cy.viewport(1920, 1080)
1313
// Navigate to index
1414
cy.visit('/')
15+
cy.wait(1000)
1516
cy.get('#form-dialog-title').should('contain', 'NeoDash - Neo4j Dashboard Builder')
1617
cy.wait(300)
1718

@@ -27,13 +28,13 @@ describe('NeoDash E2E Tests', () => {
2728
cy.get('#form-dialog-title').should('contain', 'Connect to Neo4j')
2829

2930
// Connect to Neo4j database
30-
cy.get('#protocol').click()
31-
cy.contains('neo4j+s').click()
32-
cy.get('#url').clear().type('demo.neo4jlabs.com')
31+
// cy.get('#protocol').click()
32+
// cy.contains('neo4j').click()
33+
cy.get('#url').clear().type('localhost')
3334
cy.wait(100)
34-
cy.get('#database').type('movies')
35-
cy.get('#dbusername').clear().type('movies')
36-
cy.get('#dbpassword').type('movies')
35+
// cy.get('#database').type('neo4j')
36+
cy.get('#dbusername').clear().type('neo4j')
37+
cy.get('#dbpassword').type('test')
3738
cy.wait(100)
3839
cy.get('button').contains('Connect').click()
3940
})
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
docker run \
2+
--name neo4j \
3+
-p7474:7474 -p7687:7687 \
4+
-d \
5+
--env NEO4J_AUTH=neo4j/test \
6+
neo4j:latest

0 commit comments

Comments
 (0)