Skip to content

Commit

Permalink
final change
Browse files Browse the repository at this point in the history
  • Loading branch information
gurramkarthiknetha committed Dec 19, 2024
1 parent 4f1c19e commit 5da0561
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
11 changes: 5 additions & 6 deletions src/components/OrganizationScreen/OrganizationScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,15 @@ describe('Testing OrganizationScreen', () => {
const closeButton = screen.getByTestId('closeMenu');
fireEvent.click(closeButton);

// Check for contract class after closing
expect(screen.getByTestId('mainpageright')).toHaveClass('_expand_ccl5z_8');
// Check for a class indicating the drawer is contracted (use stringContaining in the class)
const mainPageElement = screen.getByTestId('mainpageright');
expect(mainPageElement.className).toMatch('_expand'); // Simply check if _expand exists

const openButton = screen.getByTestId('openMenu');
fireEvent.click(openButton);

// Check for expand class after opening
expect(screen.getByTestId('mainpageright')).toHaveClass(
'_contract_ccl5z_61',
);
// Check for a class indicating the drawer is expanded
expect(mainPageElement.className).toMatch('_contract');
});

test('handles window resize', () => {
Expand Down
5 changes: 4 additions & 1 deletion src/screens/UserPortal/Posts/Posts.test.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { act } from 'react';
import { MockedProvider } from '@apollo/react-testing';
import type { RenderResult } from '@testing-library/react';
import { render, screen, waitFor, within } from '@testing-library/react';
import { render, screen, within } from '@testing-library/react';
import { I18nextProvider } from 'react-i18next';
import userEvent from '@testing-library/user-event';
import {
Expand Down Expand Up @@ -395,5 +395,8 @@ describe('HomeScreen with invalid orgId', () => {
);
const homeEl = await screen.findByTestId('homeEl');
expect(homeEl).toBeInTheDocument();

const postCardContainers = screen.queryAllByTestId('postCardContainer');
expect(postCardContainers).toHaveLength(0);
});
});
2 changes: 1 addition & 1 deletion src/setupTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jestPreviewConfigure({
autoPreview: true,
});

jest.setTimeout(15000);
jest.setTimeout(100000);

0 comments on commit 5da0561

Please sign in to comment.