-
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 #80 from PoCInnovation/dev
feat: Migration to Next and Aggregates
- Loading branch information
Showing
67 changed files
with
3,962 additions
and
12,268 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -5,10 +5,6 @@ | |
LICENSE | ||
README.md | ||
|
||
# Linter | ||
.prettierc | ||
.eslintrc.yaml | ||
|
||
# Node | ||
node_modules/ | ||
tests/ | ||
|
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 |
---|---|---|
@@ -1,2 +1 @@ | ||
REACT_APP_ALEPH_CHANNEL=TEST | ||
PORT=8080 | ||
NEXT_PUBLIC_ALEPH_CHANNEL=TEST |
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
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,13 @@ | ||
import { defineConfig } from 'cypress'; | ||
|
||
export default defineConfig({ | ||
watchForFileChanges: false, | ||
e2e: { | ||
// We've imported your old cypress plugins here. | ||
// You may want to clean this up later by importing these. | ||
setupNodeEvents(on, config) { | ||
return require('./cypress/plugins/index.js')(on, config) | ||
}, | ||
baseUrl: 'http://localhost:8080', | ||
}, | ||
}) |
This file was deleted.
Oops, something went wrong.
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,70 @@ | ||
let dashboardSpecMnemonic = ''; | ||
|
||
describe('Create account for File tests', () => { | ||
it('Connect', () => { | ||
cy.visit('/signup'); | ||
cy.get('#ipc-signup-credentials-signup-button').click(); | ||
cy.get('#ipc-signup-text-area') | ||
.invoke('val') | ||
.then((input) => { | ||
dashboardSpecMnemonic = input as string; | ||
}); | ||
cy.get('#ipc-modal-close-button').click(); | ||
}); | ||
}); | ||
|
||
describe('Upload a file modal in Dashboard', () => { | ||
const fixtureFile = 'upload_test_file.txt'; | ||
|
||
beforeEach(() => { | ||
cy.visit('/login'); | ||
cy.get('#ipc-login-text-area').click().type(dashboardSpecMnemonic); | ||
cy.get('#ipc-login-credentials-button').click(); | ||
cy.get('#ipc-dashboard-drawer-button').click({ force: true }); | ||
cy.get('#ipc-upload-button').click(); | ||
}); | ||
|
||
it('Good number of buttons after upload', () => { | ||
cy.get('#ipc-dashboard-upload-file').attachFile(fixtureFile); | ||
cy.get('#ipc-dashboard-upload-file-modal-button').click(); | ||
cy.wait(2000); | ||
cy.get('button').should('have.length', 12); | ||
}); | ||
|
||
it('Good number of buttons after closing modal', () => { | ||
cy.get('#ipc-modal-close-button').click(); | ||
cy.get('button').should('have.length', 12); | ||
}); | ||
}); | ||
|
||
describe('Upload an empty file in Dashboard', () => { | ||
const fixtureFile = 'upload_empty_file.txt'; | ||
|
||
beforeEach(() => { | ||
cy.visit('/login'); | ||
cy.get('#ipc-login-text-area').click().type(dashboardSpecMnemonic); | ||
cy.get('#ipc-login-credentials-button').click(); | ||
cy.get('#ipc-dashboard-drawer-button').click({ force: true }); | ||
cy.get('#ipc-upload-button').click(); | ||
}); | ||
|
||
it('Good number of buttons after failed upload', () => { | ||
cy.get('#ipc-dashboard-upload-file').attachFile(fixtureFile, { allowEmpty: true }); | ||
cy.get('#ipc-dashboard-upload-file-modal-button').click(); | ||
cy.wait(2000); | ||
cy.get('button').should('have.length', 12); | ||
}); | ||
}); | ||
|
||
describe('Download a file in Dashboard', () => { | ||
beforeEach(() => { | ||
cy.visit('/login'); | ||
cy.get('#ipc-login-text-area').click().type(dashboardSpecMnemonic); | ||
cy.get('#ipc-login-credentials-button').click(); | ||
cy.get('#ipc-dashboard-download-button').click(); | ||
}); | ||
|
||
it('Good content for downloaded file', () => { | ||
cy.readFile('./cypress/downloads/upload_test_file.txt').should('eq', 'This is an upload test file'); | ||
}); | ||
}); |
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,36 @@ | ||
describe('Create account for Dashboard tests', () => { | ||
it('Connect', () => { | ||
cy.visit('/signup'); | ||
cy.get('#ipc-signup-credentials-signup-button').click(); | ||
cy.get('#ipc-signup-text-area') | ||
.invoke('val') | ||
.then((input) => { | ||
dashboardSpecMnemonic = input as string; | ||
}); | ||
cy.get('#ipc-modal-close-button').click(); | ||
}); | ||
}); | ||
|
||
describe('Upload a program modal for Dashboard', () => { | ||
const fixtureFile = 'upload_test_program.zip'; | ||
|
||
beforeEach(() => { | ||
cy.visit('/login'); | ||
cy.get('#ipc-login-text-area').click().type(dashboardSpecMnemonic); | ||
cy.get('#ipc-login-credentials-button').click(); | ||
cy.get('#ipc-dashboard-drawer-button').click({ force: true }); | ||
cy.get('#ipc-deploy-button').click().wait(2500); | ||
}); | ||
|
||
it('Good number of buttons after upload', () => { | ||
cy.get('#ipc-dashboard-deploy-program').attachFile(fixtureFile); | ||
cy.get('#ipc-dashboard-deploy-program-modal-button').click(); | ||
cy.wait(2000); | ||
cy.get('button').should('have.length', 10); | ||
}); | ||
|
||
it('Good number of buttons after closing modal', () => { | ||
cy.get('#ipc-modal-close-button').click(); | ||
cy.get('button').should('have.length', 10); | ||
}); | ||
}); |
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,94 @@ | ||
describe('Create account for Dashboard tests', () => { | ||
it('Connect', () => { | ||
cy.visit('/signup'); | ||
cy.get('#ipc-signup-credentials-signup-button').click(); | ||
cy.get('#ipc-signup-text-area') | ||
.invoke('val') | ||
.then((input) => { | ||
dashboardSpecMnemonic = input as string; | ||
}); | ||
cy.get('#ipc-modal-close-button').click(); | ||
}); | ||
}); | ||
|
||
describe('Good front for Dashboard', () => { | ||
it('Go to dashboard', () => { | ||
cy.visit('/login'); | ||
cy.get('#ipc-login-text-area').click().type(dashboardSpecMnemonic); | ||
cy.get('#ipc-login-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-dashboard-drawer-button').click({ force: true }); | ||
cy.get('#ipc-upload-button').should('contain', 'Upload a file'); | ||
}); | ||
|
||
it('Good name for deploy button', () => { | ||
cy.get('#ipc-dashboard-drawer-button').click({ force: true }); | ||
cy.get('#ipc-deploy-button').should('contain', 'Deploy a program'); | ||
}); | ||
}); | ||
|
||
describe('Good Upload file modal front in Dashboard', () => { | ||
it('Go to upload modal into dashboard', () => { | ||
cy.visit('/login'); | ||
cy.get('#ipc-login-text-area').click().type(dashboardSpecMnemonic); | ||
cy.get('#ipc-login-credentials-button').click(); | ||
cy.get('#ipc-dashboard-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', 10); | ||
}); | ||
|
||
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-dashboard-upload-file-modal-button').should('contain', 'Upload file'); | ||
}); | ||
|
||
it('Good name for close button', () => { | ||
cy.get('#ipc-modal-close-button').should('contain', 'Close'); | ||
}); | ||
}); | ||
|
||
describe('Good Deploy program modal front in Dashboard', () => { | ||
it('Go to upload modal into dashboard', () => { | ||
cy.visit('/login'); | ||
cy.get('#ipc-login-text-area').click().type(dashboardSpecMnemonic); | ||
cy.get('#ipc-login-credentials-button').click(); | ||
cy.get('#ipc-dashboard-drawer-button').click({ force: true }); | ||
cy.get('#ipc-deploy-button').click(); | ||
}); | ||
|
||
it('Good header', () => { | ||
cy.get('header').should('contain', 'Deploy a program'); | ||
}); | ||
|
||
it('Good number of buttons', () => { | ||
cy.get('button').should('have.length', 10); | ||
}); | ||
|
||
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-dashboard-deploy-program-modal-button').should('contain', 'Deploy program'); | ||
}); | ||
|
||
it('Good name for close button', () => { | ||
cy.get('#ipc-modal-close-button').should('contain', 'Close'); | ||
}); | ||
}); |
Oops, something went wrong.