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

Figma: Refactoring Events Dashboard / Detail Screens #3346

Conversation

aadhil2k4
Copy link
Contributor

@aadhil2k4 aadhil2k4 commented Jan 18, 2025

What kind of change does this PR introduce?

Refactoring, testing

Issue Number:

Fixes #3182

Snapshots/Videos:

EventManagementDashboard.mp4

Does this PR introduce a breaking change?

No

Checklist

CodeRabbit AI Review

  • I have reviewed and addressed all critical issues flagged by CodeRabbit AI
  • I have implemented or provided justification for each non-critical suggestion
  • I have documented my reasoning in the PR comments where CodeRabbit AI suggestions were not implemented

Test Coverage

  • I have written tests for all new changes/features
  • I have verified that test coverage meets or exceeds 95%
  • I have run the test suite locally and all tests pass

Other information

Agendas screen was not loading. So didnt make any changes to it.

Have you read the contributing guide?

Yes

Summary by CodeRabbit

Release Notes

  • Style Improvements

    • Enhanced visual styling for various components across the application.
    • Updated button, table header, and radio button styles.
    • Refined color schemes and added consistent margin classes.
  • Test Coverage

    • Added comprehensive CSS styling tests for multiple components.
    • Improved visual and accessibility testing for event management and volunteer screens.
  • User Interface

    • Refined button appearances and layout spacing.
    • Improved visual consistency across event management and volunteer screens.

Sorry, something went wrong.

Copy link
Contributor

coderabbitai bot commented Jan 18, 2025

Warning

Rate limit exceeded

@aadhil2k4 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 25 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between aaa7c58 and 56c6031.

📒 Files selected for processing (1)
  • src/components/EventManagement/EventAttendance/EventAttendance.tsx (5 hunks)

Walkthrough

This pull request focuses on enhancing the CSS styling and test coverage across multiple components in the Talawa Admin application. The changes primarily involve adding styling tests, updating class names, and consolidating CSS into the global app.module.css file. The modifications span components like CheckInWrapper, EventDashboard, EventAttendance, EventRegistrants, EventManagement, Requests, VolunteerGroups, and Volunteers, with a consistent approach to improving visual presentation and accessibility.

Changes

File Path Change Summary
src/components/CheckIn/CheckInWrapper.spec.tsx Added CSS styling tests for button classes and layout
src/components/CheckIn/CheckInWrapper.tsx Updated button class to include mt-4 margin
src/components/EventManagement/Dashboard/EventDashboard.spec.tsx Added CSS styling tests for various dashboard elements
src/components/EventManagement/Dashboard/EventDashboard.tsx Modified div class to include mt-4 margin
src/components/EventManagement/EventAttendance/EventAttendance.spec.tsx Added CSS styling tests for various component elements
src/components/EventManagement/EventAttendance/EventAttendance.tsx Updated button classes to use styles.regularBtn
src/components/EventManagement/EventRegistrant/EventRegistrants.spec.tsx Added CSS styling and accessibility tests
src/components/EventManagement/EventRegistrant/EventRegistrants.tsx Updated button and table header classes
src/screens/EventManagement/EventManagement.tsx Modified tab button styling and content container classes
src/screens/EventVolunteers/Requests/Requests.spec.tsx Added CSS styling tests for various component elements
src/screens/EventVolunteers/Requests/Requests.tsx Updated search button class to include styles.regularBtn
src/screens/EventVolunteers/VolunteerGroups/VolunteerGroups.tsx Updated search and create button classes
src/screens/EventVolunteers/Volunteers/Volunteers.tsx Updated search and add volunteer button classes
src/style/app.module.css Updated CSS classes for table headers, toggle buttons, and radio buttons

Assessment against linked issues

Objective Addressed Explanation
Conform to Figma Style Guide [#3182]
Consolidate CSS into app.module.css [#3182]
Migrate away from green theme [#3182]
Use descriptive color variables [#3182]

Possibly related issues

Possibly related PRs

Suggested labels

test, ignore-sensitive-files-pr

Suggested reviewers

  • palisadoes
  • AVtheking

Poem

🐰 Styling rabbits hop with glee,
CSS classes, now set free!
From green to blue, a colorful dance,
Figma's guide, we now enhance.
Hop, hop, hurray for clean design! 🎨


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Our Pull Request Approval Process

Thanks for contributing!

Testing Your Code

Remember, your PRs won't be reviewed until these criteria are met:

  1. We don't merge PRs with poor code quality.
    1. Follow coding best practices such that CodeRabbit.ai approves your PR.
  2. We don't merge PRs with failed tests.
    1. When tests fail, click on the Details link to learn more.
    2. Write sufficient tests for your changes (CodeCov Patch Test). Your testing level must be better than the target threshold of the repository
    3. Tests may fail if you edit sensitive files. Ask to add the ignore-sensitive-files-pr label if the edits are necessary.
  3. We cannot merge PRs with conflicting files. These must be fixed.

Our policies make our code better.

Reviewers

Do not assign reviewers. Our Queue Monitors will review your PR and assign them.
When your PR has been assigned reviewers contact them to get your code reviewed and approved via:

  1. comments in this PR or
  2. our slack channel

Reviewing Your Code

Your reviewer(s) will have the following roles:

  1. arbitrators of future discussions with other contributors about the validity of your changes
  2. point of contact for evaluating the validity of your work
  3. person who verifies matching issues by others that should be closed.
  4. person who gives general guidance in fixing your tests

CONTRIBUTING.md

Read our CONTRIBUTING.md file. Most importantly:

  1. PRs with issues not assigned to you will be closed by the reviewer
  2. Fix the first comment in the PR so that each issue listed automatically closes

Other

  1. 🎯 Please be considerate of our volunteers' time. Contacting the person who assigned the reviewers is not advised unless they ask for your input. Do not @ the person who did the assignment otherwise.
  2. Read the CONTRIBUTING.md file make

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🔭 Outside diff range comments (1)
src/screens/EventManagement/EventManagement.tsx (1)

Line range hint 224-281: Extract repeated container styling.

The same className is repeated across all tab containers. Consider extracting it to a constant or CSS module class.

+    const tabContainerClass = "mx-4 bg-white p-4 pt-2 rounded-4 shadow";
+
     {(() => {
       switch (tab) {
         case 'dashboard':
           return (
             <div
               data-testid="eventDashboardTab"
-              className="mx-4 bg-white p-4 pt-2 rounded-4 shadow"
+              className={tabContainerClass}
             >
               <EventDashboard eventId={eventId} />
             </div>
           );
         // Apply similar changes to other cases
🧹 Nitpick comments (9)
src/components/CheckIn/CheckInWrapper.spec.tsx (2)

98-117: Consider using more reliable style testing approaches.

The computed style test may be flaky as it depends on browser rendering. Instead of checking the computed marginTop value, consider:

  1. Verifying the presence of utility classes that define the margin
  2. Using snapshot testing for style verification
-    const styles = window.getComputedStyle(button);
-    expect(button).toHaveClass('mt-4');
-    expect(styles.marginTop).not.toBe('0px');
+    expect(button).toHaveClass('mt-4');

119-142: Improve layout testing reliability.

The current approach of using string index comparison for layout verification is fragile. Consider using DOM traversal methods or test-ids for more reliable layout testing.

-    expect(
-      button.innerHTML.indexOf('Sort') <
-        button.innerHTML.indexOf('Check In Registrants'),
-    ).toBe(true);
+    const buttonContent = Array.from(button.childNodes);
+    const imageIndex = buttonContent.findIndex(node => 
+      node.nodeName === 'IMG' && node.getAttribute('alt') === 'Sort'
+    );
+    const textIndex = buttonContent.findIndex(node => 
+      node.textContent?.includes('Check In Registrants')
+    );
+    expect(imageIndex).toBeLessThan(textIndex);
src/components/EventManagement/Dashboard/EventDashboard.spec.tsx (2)

116-117: Improve type safety in cards query.

The querySelectorAll result needs type assertion for better type safety.

-    const cards = statsSection.querySelectorAll(`.${styles.ctacards}`);
+    const cards = Array.from(statsSection.querySelectorAll<HTMLElement>(`.${styles.ctacards}`));
     expect(cards).toHaveLength(3);

189-191: Enhance color verification.

Instead of just checking for the presence of text-success class, consider verifying the computed color value for more robust testing.

     const statusText = recurringStatus.querySelector('.text-success');
     expect(statusText).toBeInTheDocument();
-    expect(statusText).toHaveClass('ml-2');
+    expect(statusText).toHaveClass('text-success', 'ml-2');
+    // Optional: Verify the actual color if critical
+    // const computedStyle = window.getComputedStyle(statusText as HTMLElement);
+    // expect(computedStyle.color).toBe('rgb(25, 135, 84)'); // Bootstrap success color
src/screens/EventManagement/EventManagement.tsx (1)

138-144: Simplify button styling logic.

The conditional class name assignment could be simplified using template literals and optional classes.

-    const variant = selected ? 'secondary' : 'light';
-    const className = selected
-      ? `px-4 d-flex align-items-center rounded-3 shadow-sm ${styles.createButton}`
-      : 'text-secondary bg-white px-4 d-flex align-items-center rounded-3 shadow-sm';
+    const baseClasses = 'px-4 d-flex align-items-center rounded-3 shadow-sm';
+    const variant = selected ? 'secondary' : 'light';
+    const className = `${baseClasses} ${selected ? styles.createButton : 'text-secondary bg-white'}`;
src/style/app.module.css (1)

1881-1883: Consider removing commented code.

The commented-out hover state for radio buttons should either be:

  • Removed if no longer needed
  • Uncommented if still required
  • Documented if kept for future reference
src/components/EventManagement/EventRegistrant/EventRegistrants.spec.tsx (3)

266-283: Consider enhancing the filter button styling test.

While the test covers class name verification, consider these improvements:

  1. Add async/await pattern as the component performs async operations
  2. Add actual CSS property verification using getComputedStyle
  3. Consider adding a snapshot test for style changes
-  test('Filter button has correct styling classes', () => {
+  test('Filter button has correct styling classes', async () => {
     render(
       <MockedProvider addTypename={false} link={link}>
         <BrowserRouter>
           <Provider store={store}>
             <I18nextProvider i18n={i18n}>
               <EventRegistrants />
             </I18nextProvider>
           </Provider>
         </BrowserRouter>
       </MockedProvider>,
     );
+    await wait();
     const filterButton = screen.getByTestId('filter-button');
     expect(filterButton).toHaveClass('border-1');
     expect(filterButton).toHaveClass('mx-4');
     expect(filterButton).toHaveClass('mt-4');
     expect(filterButton).toHaveClass(styles.createButton);
+    
+    // Verify actual styling properties
+    const computedStyle = window.getComputedStyle(filterButton);
+    expect(computedStyle.marginTop).toBe('1rem');
+    expect(computedStyle.borderWidth).toBe('1px');
   });

302-318: Enhance custom cell styling test coverage.

Consider improving the test by:

  1. Adding async/await pattern
  2. Verifying specific header cells
  3. Checking actual styling properties
-  test('Table cells have custom cell styling', () => {
+  test('Table cells have custom cell styling', async () => {
     render(
       <MockedProvider addTypename={false} link={link}>
         <BrowserRouter>
           <Provider store={store}>
             <I18nextProvider i18n={i18n}>
               <EventRegistrants />
             </I18nextProvider>
           </Provider>
         </BrowserRouter>
       </MockedProvider>,
     );
+    await wait();
     const headerCells = screen.getAllByRole('columnheader');
+    const expectedHeaders = ['Serial', 'Registrant', 'Created At', 'Add Registrant'];
+    
+    // Verify specific headers
+    headerCells.forEach((cell, index) => {
+      expect(cell).toHaveTextContent(expectedHeaders[index]);
+      expect(cell).toHaveClass(styles.customcell);
+      
+      // Verify actual styling
+      const computedStyle = window.getComputedStyle(cell);
+      expect(computedStyle.padding).toBeDefined();
+    });
-    headerCells.forEach((cell) => {
-      expect(cell).toHaveClass(styles.customcell);
-    });
   });

265-336: Overall feedback on new test additions.

The new tests are valuable additions that verify styling and accessibility requirements. However, there are consistent patterns that could be improved across all tests:

  1. Add async/await patterns for component rendering
  2. Verify actual CSS properties using getComputedStyle
  3. Enhance accessibility testing coverage
  4. Use more robust selectors

These improvements will make the tests more reliable and comprehensive.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between df11029 and f2f0196.

⛔ Files ignored due to path filters (4)
  • public/images/svg/attendees.svg is excluded by !**/*.svg
  • public/images/svg/feedback.svg is excluded by !**/*.svg
  • public/images/svg/options-outline.svg is excluded by !**/*.svg
  • public/images/svg/organization.svg is excluded by !**/*.svg
📒 Files selected for processing (14)
  • src/components/CheckIn/CheckInWrapper.spec.tsx (1 hunks)
  • src/components/CheckIn/CheckInWrapper.tsx (1 hunks)
  • src/components/EventManagement/Dashboard/EventDashboard.spec.tsx (2 hunks)
  • src/components/EventManagement/Dashboard/EventDashboard.tsx (1 hunks)
  • src/components/EventManagement/EventAttendance/EventAttendance.spec.tsx (2 hunks)
  • src/components/EventManagement/EventAttendance/EventAttendance.tsx (2 hunks)
  • src/components/EventManagement/EventRegistrant/EventRegistrants.spec.tsx (2 hunks)
  • src/components/EventManagement/EventRegistrant/EventRegistrants.tsx (2 hunks)
  • src/screens/EventManagement/EventManagement.tsx (4 hunks)
  • src/screens/EventVolunteers/Requests/Requests.spec.tsx (2 hunks)
  • src/screens/EventVolunteers/Requests/Requests.tsx (1 hunks)
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroups.tsx (2 hunks)
  • src/screens/EventVolunteers/Volunteers/Volunteers.tsx (2 hunks)
  • src/style/app.module.css (3 hunks)
✅ Files skipped from review due to trivial changes (7)
  • src/components/CheckIn/CheckInWrapper.tsx
  • src/components/EventManagement/Dashboard/EventDashboard.tsx
  • src/screens/EventVolunteers/Requests/Requests.tsx
  • src/components/EventManagement/EventRegistrant/EventRegistrants.tsx
  • src/screens/EventVolunteers/Volunteers/Volunteers.tsx
  • src/components/EventManagement/EventAttendance/EventAttendance.tsx
  • src/screens/EventVolunteers/VolunteerGroups/VolunteerGroups.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyse Code With CodeQL (javascript)
🔇 Additional comments (4)
src/screens/EventVolunteers/Requests/Requests.spec.tsx (1)

240-304: Well-structured test suite for styling!

The new test suite for styling verification is well-organized with:

  • Reusable component rendering logic
  • Clear test cases for each styled element
  • Specific assertions for CSS classes and styles
src/style/app.module.css (2)

823-824: Consistent color scheme updates for interactive elements.

The color scheme changes for toggle buttons and radio buttons maintain consistency by:

  • Using shared color variables (--search-button-bg, --blue-primary)
  • Applying consistent border styles
  • Maintaining visual hierarchy through color contrast

Also applies to: 871-872, 1876-1878


1809-1810: Consistent table header styling.

The table header styling aligns with the application's color scheme by using the search button background color and maintaining readability with black text.

src/components/EventManagement/EventRegistrant/EventRegistrants.spec.tsx (1)

16-16: LGTM! Import statement aligns with CSS consolidation strategy.

The import of styles from the global CSS module aligns with the project's strategy of consolidating styles into app.module.css.

Comment on lines +162 to +177
const searchContainer = screen.getByTestId('searchByName').parentElement;
expect(searchContainer).toHaveClass(styles.input, 'me-3');

const searchInput = screen.getByTestId('searchByName');
expect(searchInput).toHaveClass('bg-white', 'border');

const searchButton = searchContainer?.querySelector('button');
expect(searchButton).toHaveClass(
'position-absolute',
'z-10',
'bottom-0',
'end-0',
'h-100',
styles.regularBtn,
);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add null checks for element queries.

The parent element and button queries could return null. Add appropriate null checks to prevent potential runtime errors.

     const searchContainer = screen.getByTestId('searchByName').parentElement;
+    expect(searchContainer).not.toBeNull();
     expect(searchContainer).toHaveClass(styles.input, 'me-3');

     const searchInput = screen.getByTestId('searchByName');
     expect(searchInput).toHaveClass('bg-white', 'border');

     const searchButton = searchContainer?.querySelector('button');
+    expect(searchButton).not.toBeNull();
     expect(searchButton).toHaveClass(
       'position-absolute',
       'z-10',
       'bottom-0',
       'end-0',
       'h-100',
       styles.regularBtn,
     );
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const searchContainer = screen.getByTestId('searchByName').parentElement;
expect(searchContainer).toHaveClass(styles.input, 'me-3');
const searchInput = screen.getByTestId('searchByName');
expect(searchInput).toHaveClass('bg-white', 'border');
const searchButton = searchContainer?.querySelector('button');
expect(searchButton).toHaveClass(
'position-absolute',
'z-10',
'bottom-0',
'end-0',
'h-100',
styles.regularBtn,
);
});
const searchContainer = screen.getByTestId('searchByName').parentElement;
expect(searchContainer).not.toBeNull();
expect(searchContainer).toHaveClass(styles.input, 'me-3');
const searchInput = screen.getByTestId('searchByName');
expect(searchInput).toHaveClass('bg-white', 'border');
const searchButton = searchContainer?.querySelector('button');
expect(searchButton).not.toBeNull();
expect(searchButton).toHaveClass(
'position-absolute',
'z-10',
'bottom-0',
'end-0',
'h-100',
styles.regularBtn,
);
});

Comment on lines +285 to +300
test('Table container has correct styling', () => {
render(
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
<Provider store={store}>
<I18nextProvider i18n={i18n}>
<EventRegistrants />
</I18nextProvider>
</Provider>
</BrowserRouter>
</MockedProvider>,
);
const tableContainer = screen.getByRole('grid').closest('.mt-4');
expect(tableContainer).toHaveClass('mt-4');
expect(tableContainer).toHaveClass(styles.tableHead);
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Improve robustness of table container styling test.

The current implementation has some potential issues:

  1. Using closest('.mt-4') is fragile and could break if class names change
  2. Missing async/await pattern for component rendering
  3. No verification of actual margin-top styling
-  test('Table container has correct styling', () => {
+  test('Table container has correct styling', async () => {
     render(
       <MockedProvider addTypename={false} link={link}>
         <BrowserRouter>
           <Provider store={store}>
             <I18nextProvider i18n={i18n}>
               <EventRegistrants />
             </I18nextProvider>
           </Provider>
         </BrowserRouter>
       </MockedProvider>,
     );
+    await wait();
-    const tableContainer = screen.getByRole('grid').closest('.mt-4');
+    const tableContainer = screen.getByRole('grid').parentElement;
     expect(tableContainer).toHaveClass('mt-4');
     expect(tableContainer).toHaveClass(styles.tableHead);
+    
+    // Verify actual styling
+    const computedStyle = window.getComputedStyle(tableContainer);
+    expect(computedStyle.marginTop).toBe('1rem');
   });

Committable suggestion skipped: line range outside the PR's diff.

Comment on lines +320 to +336
test('Table has correct ARIA attributes', () => {
render(
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
<Provider store={store}>
<I18nextProvider i18n={i18n}>
<EventRegistrants />
</I18nextProvider>
</Provider>
</BrowserRouter>
</MockedProvider>,
);
const table = screen.getByRole('grid');
const firstHeaderCell = screen.getByTestId('table-header-serial');
expect(table).toHaveAttribute('aria-label');
expect(firstHeaderCell).toHaveAttribute('aria-sort', 'none');
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Enhance accessibility testing coverage.

While the test checks for ARIA attributes, consider these improvements:

  1. Add async/await pattern
  2. Verify the actual aria-label value
  3. Check aria-sort for all sortable columns
-  test('Table has correct ARIA attributes', () => {
+  test('Table has correct ARIA attributes', async () => {
     render(
       <MockedProvider addTypename={false} link={link}>
         <BrowserRouter>
           <Provider store={store}>
             <I18nextProvider i18n={i18n}>
               <EventRegistrants />
             </I18nextProvider>
           </Provider>
         </BrowserRouter>
       </MockedProvider>,
     );
+    await wait();
     const table = screen.getByRole('grid');
-    const firstHeaderCell = screen.getByTestId('table-header-serial');
-    expect(table).toHaveAttribute('aria-label');
-    expect(firstHeaderCell).toHaveAttribute('aria-sort', 'none');
+    expect(table).toHaveAttribute('aria-label', 'Event Registrants Table');
+    
+    // Check all sortable columns
+    const sortableHeaders = [
+      'table-header-serial',
+      'table-header-registrant',
+      'table-header-created-at'
+    ];
+    
+    sortableHeaders.forEach(headerId => {
+      const header = screen.getByTestId(headerId);
+      expect(header).toHaveAttribute('aria-sort', 'none');
+    });
   });

Committable suggestion skipped: line range outside the PR's diff.

aadhil2k4 and others added 3 commits January 19, 2025 00:31
….spec.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link

codecov bot commented Jan 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.87%. Comparing base (81e0755) to head (56c6031).
Report is 4 commits behind head on develop-postgres.

Additional details and impacted files
@@                  Coverage Diff                  @@
##           develop-postgres    #3346       +/-   ##
=====================================================
+ Coverage              8.43%   89.87%   +81.43%     
=====================================================
  Files                   310      331       +21     
  Lines                  8069     8583      +514     
  Branches               1792     1901      +109     
=====================================================
+ Hits                    681     7714     +7033     
+ Misses                 7311      608     -6703     
- Partials                 77      261      +184     
Flag Coverage Δ
combined 89.87% <100.00%> (?)
jest 8.42% <0.00%> (?)
vitest 89.87% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@palisadoes
Copy link
Contributor

All you have done is changed the colors without making your changes look exactly like Figma:

  1. Figma design
    image
  2. Figma design
    image

You have not read the issue requirements closely. Examples for every screen are provided.

  1. The foundational work for this was completed in this PR:
  2. When in doubt about colors, take cues from other similar elements in this file and the PR mentioned in the issue.
    1. https://www.figma.com/design/dmKt00m9GVSeA1nebnkxql/Untitled?node-id=0-1&node-type=canvas&t=TPzfh1DE9IxjzsEe-0
  3. The desired single CSS file is:
    1. src/style/app.module.css
      1. Convert all code files to use this file.
      2. Delete all CSS files in this code path and below mentioned in the title. The src/style/app.module.css file must be the only source of CSS
  4. Use no CSS in:
    1. assets/css/app.css
  5. Use variable names that describe the function of the color and not the color itself. This will help with future attempts to having Dark Mode.
    1. For example --search-button-bg is much better than --light-blue
    2. NoMongo: Fix Stylesheet in Anticipation of Dark Mode #3296
  6. When refactoring modals, please refer to this PR that has created a standardized design patter for them.
    1. Updating to NEW COLOR SCHEME #2984
  7. Remove all references to HTML color codes in the files you edit except in src/style/app.module.css
  8. Buttons, and dropdowns must only have shadows when there is a mouse hover. Their color must not change
  9. Search boxes must only have shadows when selected

I have to close this. Please try again.

@palisadoes palisadoes closed this Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants