Skip to content

Commit

Permalink
test: api base url set up
Browse files Browse the repository at this point in the history
  • Loading branch information
0xtiti committed Sep 3, 2024
1 parent c5b0645 commit 619f701
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Create env file
run: |
touch .env
echo "NEXT_PUBLIC_API_URL=http://mock-api:3000" >> .env
echo "NEXT_PUBLIC_API_BASE_URL=${{ secrets.NEXT_PUBLIC_API_BASE_URL }}" >> .env
- name: run Cypress and Jest
uses: cypress-io/github-action@v6
Expand Down
4 changes: 0 additions & 4 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@ import { defineConfig } from 'cypress';
export default defineConfig({
e2e: {
baseUrl: 'http://localhost:5173',
setupNodeEvents() {},
env: {
NEXT_PUBLIC_API_BASE_URL: 'http://mock-api:3000',
},
},
});
6 changes: 3 additions & 3 deletions cypress/e2e/navigation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('Navigation tests', () => {
cy.visit('/');
});

it.skip('should navigate to search page, type a query, navigate to chain details, and go back to home on breadcrumb', () => {
it('should navigate to search page, type a query, navigate to chain details, and go back to home on breadcrumb', () => {
cy.getByTestId('search-bar').click();
cy.url().should('include', '/search');

Expand All @@ -33,15 +33,15 @@ describe('Navigation tests', () => {
// cy.getByTestId('search-bar').find('input').should('have.value', '');
});

it.skip('should navigate to tokens page, on all tokens button click', () => {
it('should navigate to tokens page, on all tokens button click', () => {
cy.getByTestId('all-tokens-button').click();
cy.url().should('include', '/tokens');

cy.getByTestId('tokens-title').should('be.visible');
cy.getByTestId('tokens-row').should('be.visible');
});

it.skip('should navigate to chain page by clicking on dashboard chain row', () => {
it('should navigate to chain page by clicking on dashboard chain row', () => {
cy.getByTestId('chains-dashboard').should('be.visible');
cy.getByTestId('chain-row').first().click();
cy.url().should('include', '/324');
Expand Down

0 comments on commit 619f701

Please sign in to comment.