Skip to content

Commit

Permalink
fix dimensions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xAlec committed Aug 14, 2024
1 parent 0ba3f3c commit 07d4bf3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/wallet/utils/getWindowDimensions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,33 +20,33 @@ describe('getWindowDimensions', () => {
window.innerWidth = 300;
window.innerHeight = 400;

const result = getWindowDimensions('s');
const result = getWindowDimensions('sm');
expect(result).toEqual({ width: 270, height: 350 });
});

it('should calculate correct dimensions for medium size', () => {
const result = getWindowDimensions('m');
const result = getWindowDimensions('md');
expect(result).toEqual({ width: 290, height: 363 });
});

it('should calculate correct dimensions for large size', () => {
const result = getWindowDimensions('l');
const result = getWindowDimensions('lg');
expect(result).toEqual({ width: 350, height: 438 });
});

it('should limit dimensions to 35vw for large viewport', () => {
window.innerWidth = 2000;
window.innerHeight = 1500;

const result = getWindowDimensions('l');
const result = getWindowDimensions('lg');
expect(result).toEqual({ width: 700, height: 875 });
});

it('should handle different aspect ratios', () => {
window.innerWidth = 1920;
window.innerHeight = 1080;

const result = getWindowDimensions('m');
const result = getWindowDimensions('md');
expect(result).toEqual({ width: 557, height: 696 });
});
});

0 comments on commit 07d4bf3

Please sign in to comment.