Skip to content

Commit

Permalink
Merge pull request stakwork#2304 from stakwork/createGeneratedEdges
Browse files Browse the repository at this point in the history
test: added new test for node edge
  • Loading branch information
Rassl authored Oct 7, 2024
2 parents b24c755 + 6777e69 commit e95e173
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
cache: "yarn"
- name: Clone Stack
run: |
git clone https://github.com/stakwork/sphinx-stack.git stack
git clone -b multipleWorkers https://github.com/stakwork/sphinx-stack.git stack
- name: Give Permissions to Sphinx Nav Fiber
run: chmod 777 -R relay
Expand Down
29 changes: 29 additions & 0 deletions cypress/e2e/createGeneratedEdges/createGeneratedEdges.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
describe('Test Create Generated edges on Jarvis', () => {
it('Should response successfully when creating generated edges', () => {
cy.request({
method: 'POST',
url: `http://localhost:8444/api/node/edge`,
headers: { 'x-api-token': 'navfiber-tester' },
body: {
edge: {
edge_type: 'RELATED_TO',
weight: 1,
},
source: {
node_type: 'Person',
node_data: {
name: 'Tom Smith',
},
},
target: {
node_type: 'Topic',
node_data: {
name: 'Stakwork',
},
},
},
}).then((response) => {
expect(response.status).to.equal(200)
})
})
})

0 comments on commit e95e173

Please sign in to comment.