Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gRoussac committed Jan 30, 2024
1 parent b4311c5 commit ca55751
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 91 deletions.
6 changes: 3 additions & 3 deletions www/apps/frontend-e2e/src/e2e/app.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ describe('deployer', () => {

beforeEach(() => {
cy.intercept('/api/users').as('getUsers');
cy.intercept(/\/api\/deployer\/status\?apiUrl=http:\/\/.+\/rpc/).as('getStatus');
cy.intercept(/\/api\/deployer\/peers\?apiUrl=http:\/\/.+\/rpc/).as('getPeers');
cy.intercept(/\/api\/deployer\/getStateRootHash\?apiUrl=http:\/\/.+\/rpc/).as('getStateRootHash');
cy.intercept(/\/api\/deployer\/status\?apiUrl=http:\/\/.+/).as('getStatus');
cy.intercept(/\/api\/deployer\/peers\?apiUrl=http:\/\/.+/).as('getPeers');
cy.intercept(/\/api\/deployer\/getStateRootHash\?apiUrl=http:\/\/.+/).as('getStateRootHash');
cy.visit('/');
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { ArgBuilderComponent } from './arg-builder.component';
import { DeployerService } from '@casper-data/data-access-deployer';

describe('ArgBuilderComponent', () => {
let component: ArgBuilderComponent;
let fixture: ComponentFixture<ArgBuilderComponent>;

const getState = jest.fn().mockReturnValue({ subscribe: jest.fn() });

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [ArgBuilderComponent],
providers: [
{
provide: DeployerService, useValue: {
getState,
}
},
]
}).compileComponents();

fixture = TestBed.createComponent(ArgBuilderComponent);
Expand Down
Loading

0 comments on commit ca55751

Please sign in to comment.