Skip to content

Commit

Permalink
style: fix prettier warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
RezaRahemtola committed Jun 25, 2023
1 parent 50ff150 commit 632b642
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 62 deletions.
119 changes: 64 additions & 55 deletions cypress/e2e/front/landing.cy.ts
Original file line number Diff line number Diff line change
@@ -1,55 +1,64 @@
describe('Good front for Landing', () => {
it('Go to landing', () => {
cy.visit('');
});

it ('Good text', () => {
cy.get('#ipc-landing-navigation-name').should('contain', 'Inter Planetary Cloud');
cy.get("#ipc-landing-headline").should('contain', 'The first distributed cloud unsealing your data.');
cy.get("#ipc-landing-subHeadline").should('contain', 'Build on top of Aleph, the next generation network of distributed big data applications.');
cy.get("#ipc-landing-services-title").should('contain', 'Inter Planetary Cloud offers two services');
cy.get("#ipc-landing-features-title").should('contain', 'Our Features');
})

it('Good text for features cards', () => {
cy.get("#ipc-landing-feature-upload-files").should('contain', 'Upload & Download Files');
cy.get("#ipc-landing-folder-management").should('contain', 'Folder Management');
cy.get("#ipc-landing-share-files").should('contain', 'Share Files');
cy.get("#ipc-landing-programs").should('contain', 'Upload & Run Programs');
cy.get("#ipc-landing-contact-management").should('contain', 'Contact Management');
})

it('Good text for services cards', () => {
cy.get("#ipc-landing-services-cloud-storage-title").should('contain', 'Cloud Storage');
cy.get("#ipc-landing-services-cloud-storage-description").should('contain', 'A distributed personal file storage and management system platform, protecting your data.');
cy.get('#ipc-landing-services-cloud-computing-title').should('contain', 'Cloud Computing');
cy.get('#ipc-landing-services-cloud-computing-description').should('contain', 'A distributed personal cloud computing platform for HTTP servers.');
});

it('Good text for start buttons', () => {
cy.get("#ipc-landing-heading-start-button").should('contain', 'Start the experiment');
cy.get("#ipc-landing-features-start-button").should('contain', 'Start the experiment');
})

it('Good number of elements', () => {
cy.get("button").should('have.length', 2);
cy.get('img').should('have.length', 7);
cy.get('svg').should('have.length', 14);
cy.get('#ipc-landing-services-cloud-storage').should('have.length', 1);
cy.get('#ipc-landing-services-cloud-computing').should('have.length', 1);
})
});

describe('Good redirect for Landing', () => {
beforeEach(() => {
cy.visit('');
});

it('Good redirection for heading button', () => {
cy.get("#ipc-landing-heading-start-button").click().url().should('eq', `${Cypress.config().baseUrl}/connection`);
});

it('Good redirection for features button', () => {
cy.get("#ipc-landing-features-start-button").click().url().should('eq', `${Cypress.config().baseUrl}/connection`);
});
});
describe('Good front for Landing', () => {
it('Go to landing', () => {
cy.visit('');
});

it('Good text', () => {
cy.get('#ipc-landing-navigation-name').should('contain', 'Inter Planetary Cloud');
cy.get('#ipc-landing-headline').should('contain', 'The first distributed cloud unsealing your data.');
cy.get('#ipc-landing-subHeadline').should(
'contain',
'Build on top of Aleph, the next generation network of distributed big data applications.',
);
cy.get('#ipc-landing-services-title').should('contain', 'Inter Planetary Cloud offers two services');
cy.get('#ipc-landing-features-title').should('contain', 'Our Features');
});

it('Good text for features cards', () => {
cy.get('#ipc-landing-feature-upload-files').should('contain', 'Upload & Download Files');
cy.get('#ipc-landing-folder-management').should('contain', 'Folder Management');
cy.get('#ipc-landing-share-files').should('contain', 'Share Files');
cy.get('#ipc-landing-programs').should('contain', 'Upload & Run Programs');
cy.get('#ipc-landing-contact-management').should('contain', 'Contact Management');
});

it('Good text for services cards', () => {
cy.get('#ipc-landing-services-cloud-storage-title').should('contain', 'Cloud Storage');
cy.get('#ipc-landing-services-cloud-storage-description').should(
'contain',
'A distributed personal file storage and management system platform, protecting your data.',
);
cy.get('#ipc-landing-services-cloud-computing-title').should('contain', 'Cloud Computing');
cy.get('#ipc-landing-services-cloud-computing-description').should(
'contain',
'A distributed personal cloud computing platform for HTTP servers.',
);
});

it('Good text for start buttons', () => {
cy.get('#ipc-landing-heading-start-button').should('contain', 'Start the experiment');
cy.get('#ipc-landing-features-start-button').should('contain', 'Start the experiment');
});

it('Good number of elements', () => {
cy.get('button').should('have.length', 2);
cy.get('img').should('have.length', 7);
cy.get('svg').should('have.length', 14);
cy.get('#ipc-landing-services-cloud-storage').should('have.length', 1);
cy.get('#ipc-landing-services-cloud-computing').should('have.length', 1);
});
});

describe('Good redirect for Landing', () => {
beforeEach(() => {
cy.visit('');
});

it('Good redirection for heading button', () => {
cy.get('#ipc-landing-heading-start-button').click().url().should('eq', `${Cypress.config().baseUrl}/connection`);
});

it('Good redirection for features button', () => {
cy.get('#ipc-landing-features-start-button').click().url().should('eq', `${Cypress.config().baseUrl}/connection`);
});
});
2 changes: 1 addition & 1 deletion cypress/e2e/front/signup.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('Good front for Signup', () => {

it('Good name for go to dashboard button', () => {
cy.get('#ipc-signup-go-to-dashboard-button').should('contain', 'Go to my dashboard');
})
});
});

describe('Signup with credentials Button for Signup', () => {
Expand Down
3 changes: 2 additions & 1 deletion pages/drive/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const Dashboard = (): JSX.Element => {
const { setConfig } = useConfigContext();
const { colorMode, toggleColorMode } = useColorMode();

const { path, folders, files, setFiles, setFolders, setContacts, setPrograms, setSharedFiles, setSharedPrograms } = useDriveContext();
const { path, folders, files, setFiles, setFolders, setContacts, setPrograms, setSharedFiles, setSharedPrograms } =
useDriveContext();

useEffect(() => {
(async () => {
Expand Down
5 changes: 1 addition & 4 deletions pages/drive/shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ const Shared = (): JSX.Element => {
<Navigation>
<VStack w="100%" spacing="48px" align="start">
<LabelBadge label="Share with me" />
<DriveCards
files={sharedFiles.filter((elem) => !elem.deletedAt)}
programs={sharedPrograms}
/>
<DriveCards files={sharedFiles.filter((elem) => !elem.deletedAt)} programs={sharedPrograms} />
</VStack>
</Navigation>
);
Expand Down
2 changes: 1 addition & 1 deletion pages/drive/trash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Navigation from 'components/navigation/Navigation';
import { useDriveContext } from 'contexts/drive';

const Trash = (): JSX.Element => {
const { path, files, folders, sharedFiles} = useDriveContext();
const { path, files, folders, sharedFiles } = useDriveContext();

const deletedFiles = files.filter((elem) => elem.path === path && elem.deletedAt !== null);
const deletedFolders = folders.filter((elem) => elem.path === path);
Expand Down

0 comments on commit 632b642

Please sign in to comment.