Skip to content

Commit

Permalink
feat: remove mock data (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtiti authored Sep 4, 2024
1 parent ca2eb24 commit 4418f69
Show file tree
Hide file tree
Showing 20 changed files with 10,101 additions and 7,013 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
NEXT_PUBLIC_API_BASE_URL= # Example: https://api.example.com
NEXT_PUBLIC_PROJECT_ID= # ProjectID from WalletConnect
NEXT_PUBLIC_TESTNET_MODE= # true or false
NEXT_PUBLIC_TESTNET_MODE= # true or false
NEXT_PUBLIC_TESTING_MODE= # true or false
6 changes: 3 additions & 3 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9.5.0

- name: Install Node
uses: actions/setup-node@v4
Expand All @@ -37,7 +37,7 @@ jobs:
cache: 'pnpm'

- name: Install project dependencies
run: pnpm install --frozen-lockfile --prefer-frozen-lockfile
run: pnpm install

- name: Run Prettier
run: pnpm prettier
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
with:
version: 8
version: 9.5.0

- name: Create env file
run: |
touch .env
echo "NEXT_PUBLIC_PROJECT_ID=${{ secrets.NEXT_PUBLIC_PROJECT_ID }}" >> .env
echo "NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}" >> .env
echo "NEXT_PUBLIC_API_BASE_URL=${{ secrets.NEXT_PUBLIC_API_BASE_URL }}" >> .env
echo "NEXT_PUBLIC_TESTING_MODE=${{ secrets.NEXT_PUBLIC_TESTING_MODE }}" >> .env
- name: run Cypress and Jest
uses: cypress-io/github-action@v6
Expand Down
4 changes: 4 additions & 0 deletions cypress/cypress.env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"NEXT_PUBLIC_API_BASE_URL": "http://mock-api:3000",
"NEXT_PUBLIC_TESTING_MODE": "true"
}
3 changes: 3 additions & 0 deletions cypress/e2e/navigation.cy.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
describe('Navigation tests', () => {
beforeEach(() => {
Cypress.env('NEXT_PUBLIC_API_BASE_URL', 'NEXT_PUBLIC_TESTING_MODE');
cy.visit('/');
});

Expand All @@ -16,6 +17,8 @@ describe('Navigation tests', () => {

cy.getByTestId('search-bar').find('input').type('324');
cy.getByTestId('chain-row').should('be.visible').click();

cy.getByTestId('chain-id').should('be.visible').and('contain', '324');
cy.url().should('include', '/324');

cy.getByTestId('home-breadcrumb').click();
Expand Down
Loading

0 comments on commit 4418f69

Please sign in to comment.