-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from PoCInnovation/dev
feat: add file sharing & better UI
- Loading branch information
Showing
42 changed files
with
1,453 additions
and
299 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,5 @@ cypress/screenshots | |
cypress/videos | ||
|
||
.metamask | ||
|
||
/.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
let dashboardSpecMnemonic = ''; | ||
|
||
describe('Create account for DashboardView tests', () => { | ||
it('Connect', () => { | ||
cy.visit('http://localhost:3000/signup'); | ||
cy.wait(1000); | ||
cy.get('#ipc-signupView-credentials-signup-button').click(); | ||
cy.get('#ipc-signupView-text-area') | ||
.invoke('val') | ||
.then((input) => { | ||
dashboardSpecMnemonic = input; | ||
}); | ||
cy.get('#ipc-modal-close-button').click(); | ||
}); | ||
}); | ||
|
||
describe('Good front for DashboardView', () => { | ||
it('Go to dashboard view', () => { | ||
cy.visit('http://localhost:3000/login'); | ||
cy.wait(1000); | ||
cy.get('#ipc-loginView-text-area').click().type(dashboardSpecMnemonic); | ||
cy.get('#ipc-loginView-credentials-button').click(); | ||
}); | ||
|
||
it('Good title', () => { | ||
cy.get('#ipc-sideBar-title').should('contain', 'Inter Planetary Cloud'); | ||
}); | ||
|
||
it('Good name for upload button', () => { | ||
cy.get('#ipc-dashboardView-drawer-button').click({ force: true }); | ||
cy.get('#ipc-upload-button').should('contain', 'Upload a file'); | ||
}); | ||
}); | ||
|
||
describe('Good Modal Front for DashboardView', () => { | ||
it('Go to upload modal into dashboard view', () => { | ||
cy.visit('http://localhost:3000/login'); | ||
cy.wait(1000); | ||
cy.get('#ipc-loginView-text-area').click().type(dashboardSpecMnemonic); | ||
cy.get('#ipc-loginView-credentials-button').click().wait(3000); | ||
cy.get('#ipc-dashboardView-drawer-button').click({ force: true }); | ||
cy.get('#ipc-upload-button').click(); | ||
}); | ||
|
||
it('Good header', () => { | ||
cy.get('header').should('contain', 'Upload a file'); | ||
}); | ||
|
||
it('Good number of buttons', () => { | ||
cy.get('button').should('have.length', 8); | ||
}); | ||
|
||
it('Good number of input', () => { | ||
cy.get('input[type=file]').should('have.length', 1); | ||
}); | ||
|
||
it('Good name for upload a file button', () => { | ||
cy.get('#ipc-dashboardView-upload-file-modal-button').should('contain', 'Upload file'); | ||
}); | ||
|
||
it('Good name for close button', () => { | ||
cy.get('#ipc-modal-close-button').should('contain', 'Close'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { Box, Flex, Text, VStack } from '@chakra-ui/react'; | ||
import { IPCContact } from '../types/types'; | ||
|
||
type FileCardProps = { | ||
contact: IPCContact; | ||
children: JSX.Element; | ||
}; | ||
|
||
export const ContactCard = ({ contact, children }: FileCardProps): JSX.Element => ( | ||
<Box | ||
p="16px" | ||
bg="white" | ||
w="100%" | ||
boxShadow="0px 2px 3px 3px rgb(240, 240, 240)" | ||
borderRadius="4px" | ||
border="1px solid rgb(200, 200, 200)" | ||
mb="8px" | ||
display="flex" | ||
justifyContent="space-between" | ||
> | ||
<VStack w="100%" justify="space-between" align="center"> | ||
<Text fontWeight="500">{contact.name}</Text> | ||
<Flex w="100%" justify="space-between" align="center"> | ||
{children} | ||
</Flex> | ||
</VStack> | ||
</Box> | ||
); |
Oops, something went wrong.