Skip to content

Commit

Permalink
Create delegation-legacy.cs-e2e.ts (#1404)
Browse files Browse the repository at this point in the history
* Create delegation-legacy.cs-e2e.ts

* Update delegation-legacy.cs-e2e.ts
  • Loading branch information
cfaur09 authored Dec 3, 2024
1 parent 09c552e commit b729244
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/test/chain-simulator/delegation-legacy.cs-e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import axios from 'axios';
import { config } from "./config/env.config";
import { ChainSimulatorUtils } from "./utils/test.utils";

// TODO: Uncomment this test once the legacy delegation legacy contract is deployed
describe.skip('Delegation legacy e2e tests with chain simulator', () => {
beforeAll(async () => {
await ChainSimulatorUtils.waitForEpoch(2);
});

beforeEach(() => {
jest.clearAllMocks();
});

describe('GET /delegations-legacy', () => {
it('should return status code 200 and a delegation legacy object details', async () => {
const response = await axios.get(`${config.apiServiceUrl}/delegation-legacy`);
const properties = Object.keys(response.data);

expect(response.status).toBe(200);
const expectedProperties = [
'totalWithdrawOnlyStake',
'totalWaitingStake',
'totalActiveStake',
'totalUnstakedStake',
'totalDeferredPaymentStake',
'numUsers',
];

expect(properties).toEqual(expectedProperties);
});
});
});

0 comments on commit b729244

Please sign in to comment.