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

55 ipfs file uploader #58

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
REACT_APP_IPFS_URL="http://109.235.70.27:5001"
REACT_APP_TENSORFLOW_URL="http://109.235.70.27:8501"
REACT_APP_IPFS_URL=http://109.235.70.27:5001
REACT_APP_TENSORFLOW_URL=http://109.235.70.27:8501
4 changes: 2 additions & 2 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
REACT_APP_IPFS_URL="http://localhost:3000/IPFS_API"
REACT_APP_TENSORFLOW_URL="http://localhost:3000/TF_API"
REACT_APP_IPFS_URL=http://109.235.70.27:5001
REACT_APP_TENSORFLOW_URL=http://109.235.70.27:8501
30 changes: 30 additions & 0 deletions cypress/component/CreateUpdateTaskForm.spec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from "react";
import { mount } from "cypress-react-unit-test";
import CreateUpdateTaskForm from '../../src/components/universaldot/DAO/CreateUpdateTaskForm';

const taskFormData = {
title: '',
specification: '',
budget: '',
deadline: '',
attachments: '',
keywords: '',
};

describe("IPFS File Upload Testing", () => {
it("should handle file upload correctly", () => {

const mockFunction = cy.stub();
mount(<CreateUpdateTaskForm
taskForm={taskFormData || {}}
onCancel={mockFunction}
actionCb={mockFunction}
/>);

cy.get<HTMLInputElement>('input[type="file"]').attachFile('test.txt');

// Assert that the file input value is set correctly
cy.get('input[type="file"]').should('have.value', 'test.txt');

});
});
2 changes: 2 additions & 0 deletions cypress/support/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import 'cypress-react-unit-test/support';

Loading