Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor-CSS files in src/screens/LoginPage (fixes #2509) #2656

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/check-tsdoc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fs from 'fs/promises'; // Import fs.promises for async operations

Check warning on line 1 in .github/workflows/check-tsdoc.js

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

File ignored by default.

Check warning on line 1 in .github/workflows/check-tsdoc.js

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

File ignored by default.
import path from 'path';

// List of files to skip
Expand All @@ -23,7 +23,6 @@
} else if (
filePath.endsWith('.tsx') &&
!filePath.endsWith('.test.tsx') &&
!filePath.endsWith('.spec.tsx') &&
!filesToSkip.includes(path.relative(dir, filePath))
) {
results.push(filePath);
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
##############################################################################

Check warning on line 1 in .github/workflows/pull-request.yml

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

File ignored by default.

Check warning on line 1 in .github/workflows/pull-request.yml

View workflow job for this annotation

GitHub Actions / Performs linting, formatting, type-checking, checking for different source and target branch

File ignored by default.
##############################################################################
#
# NOTE!
Expand Down Expand Up @@ -49,7 +49,7 @@

- name: Run formatting if check fails
if: failure()
run: npm run format:fix
run: npm run format

- name: Check for type errors
if: steps.changed-files.outputs.only_changed != 'true'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
/**
* Testing component for managing and displaying Volunteer Membership requests for an event.
*
* This component allows users to view, filter, sort, and create action items. It also allows users to accept or reject volunteer membership requests.
*
*
*/
import React, { act } from 'react';
import { MockedProvider } from '@apollo/react-testing';
import { LocalizationProvider } from '@mui/x-date-pickers';
Expand All @@ -27,12 +20,11 @@ import {
UPDATE_ERROR_MOCKS,
} from './Requests.mocks';
import { toast } from 'react-toastify';
import { vi } from 'vitest';

vi.mock('react-toastify', () => ({
jest.mock('react-toastify', () => ({
toast: {
success: vi.fn(),
error: vi.fn(),
success: jest.fn(),
error: jest.fn(),
},
}));

Expand Down Expand Up @@ -82,14 +74,14 @@ const renderRequests = (link: ApolloLink): RenderResult => {

describe('Testing Requests Screen', () => {
beforeAll(() => {
vi.mock('react-router-dom', async () => ({
...(await vi.importActual('react-router-dom')),
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
useParams: () => ({ orgId: 'orgId', eventId: 'eventId' }),
}));
});

afterAll(() => {
vi.clearAllMocks();
jest.clearAllMocks();
});

it('should redirect to fallback URL if URL params are undefined', async () => {
Expand All @@ -110,7 +102,10 @@ describe('Testing Requests Screen', () => {
</MemoryRouter>
</MockedProvider>,
);
expect(window.location.pathname).toBe('/');

await waitFor(() => {
expect(screen.getByTestId('paramsError')).toBeInTheDocument();
});
});

it('should render Requests screen', async () => {
Expand Down
269 changes: 0 additions & 269 deletions src/screens/LoginPage/LoginPage.module.css

This file was deleted.

2 changes: 1 addition & 1 deletion src/screens/LoginPage/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import LoginPortalToggle from 'components/LoginPortalToggle/LoginPortalToggle';
import { errorHandler } from 'utils/errorHandler';
import useLocalStorage from 'utils/useLocalstorage';
import { socialMediaLinks } from '../../constants';
import styles from './LoginPage.module.css';
import styles from 'style/app.module.css';
import type { InterfaceQueryOrganizationListObject } from 'utils/interfaces';
import { Autocomplete, TextField } from '@mui/material';
import useSession from 'utils/useSession';
Expand Down
Loading
Loading