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

feat: remove mock data #49

Merged
merged 19 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 18 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
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
0xArdy marked this conversation as resolved.
Show resolved Hide resolved
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
Loading