Skip to content

Commit 38a2379

Browse files
committed
Merge remote-tracking branch 'upstream/develop-postgres' into issue-2875
2 parents 61e3b00 + e3a2bdf commit 38a2379

File tree

92 files changed

+3028
-2051
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3028
-2051
lines changed

.github/workflows/scripts/code_coverage_disable_check.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,11 @@ def has_code_coverage_disable(file_path):
3838
otherwise.
3939
"""
4040
code_coverage_disable_pattern = re.compile(
41-
r"""//?\s*istanbul\s+ignore(?:\s+(?:next|-line))?[^\n]*|
42-
/\*\s*istanbul\s+ignore\s+(?:next|-line)\s*\*/""",
41+
r"/\*\s*istanbul\s+ignore.*?\*/|//?\s*istanbul\s+ignore(?:\s+(?:next|-line))?[^\n]*",
4342
re.IGNORECASE,
4443
)
44+
45+
4546
try:
4647
with open(file_path, "r", encoding="utf-8") as file:
4748
content = file.read()

.husky/pre-commit

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
31

42
npm run format:fix
53
# npm run lint:fix

jest.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ export default {
7272
],
7373
coverageThreshold: {
7474
global: {
75-
lines: 20,
76-
statements: 20,
75+
lines: 1,
76+
statements: 1,
7777
},
7878
},
7979
testPathIgnorePatterns: [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
"format:check": "prettier --check \"**/*.{ts,tsx,json,scss,css}\"",
8888
"check-tsdoc": "node .github/workflows/check-tsdoc.js",
8989
"typecheck": "tsc --project tsconfig.json --noEmit",
90-
"prepare": "husky install",
90+
"prepare": "husky",
9191
"jest-preview": "jest-preview",
9292
"update:toc": "node scripts/githooks/update-toc.js",
9393
"lint-staged": "lint-staged --concurrent false",

public/locales/en/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@
12621262
"endOfResults": "endOfResults"
12631263
},
12641264
"userChat": {
1265+
"title": "Chats",
12651266
"add": "Add",
12661267
"chat": "Chat",
12671268
"search": "Search",

public/locales/fr/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@
12621262
"endOfResults": "Fin des résultats"
12631263
},
12641264
"userChat": {
1265+
"title": "Discussions",
12651266
"add": "Ajouter",
12661267
"chat": "Chat",
12671268
"contacts": "Contacts",

public/locales/hi/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@
12621262
"endOfResults": "परिणाम समाप्त"
12631263
},
12641264
"userChat": {
1265+
"title": "चैट्स",
12651266
"add": "जोड़ें",
12661267
"chat": "बात करना",
12671268
"contacts": "संपर्क",

public/locales/sp/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,6 +1265,7 @@
12651265
"createAdvertisement": "Crear publicidad"
12661266
},
12671267
"userChat": {
1268+
"title": "Chats",
12681269
"add": "Agregar",
12691270
"chat": "Charlar",
12701271
"search": "Buscar",

public/locales/zh/translation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@
12621262
"endOfResults": "结果结束"
12631263
},
12641264
"userChat": {
1265+
"title": "聊天",
12651266
"add": "添加",
12661267
"chat": "聊天",
12671268
"contacts": "联系方式",

src/assets/css/app.css

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/EventCalendar/EventCalendar.module.css

Whitespace-only changes.

src/components/EventCalendar/EventHeader.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ describe('EventHeader Component', () => {
6969
fireEvent.click(getByTestId('eventType'));
7070

7171
await act(async () => {
72-
fireEvent.click(getByTestId('events'));
72+
fireEvent.click(getByTestId('Events'));
7373
});
7474

7575
expect(handleChangeView).toHaveBeenCalledTimes(1);

src/components/EventCalendar/EventHeader.tsx

Lines changed: 26 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React, { useState } from 'react';
2-
import { Button, Dropdown, Form } from 'react-bootstrap';
2+
import { Button, Form } from 'react-bootstrap';
33
import { Search } from '@mui/icons-material';
44
import styles from '../../style/app.module.css';
55
import { ViewType } from '../../screens/OrganizationEvents/OrganizationEvents';
66
import { useTranslation } from 'react-i18next';
7+
import SortingButton from 'subComponents/SortingButton';
78

89
/**
910
* Props for the EventHeader component.
@@ -63,56 +64,30 @@ function eventHeader({
6364
</div>
6465
<div className={styles.flex_grow}></div>
6566
<div className={styles.space}>
66-
<div>
67-
<Dropdown
68-
onSelect={handleChangeView}
69-
className={styles.selectTypeEventHeader}
70-
>
71-
<Dropdown.Toggle
72-
id="dropdown-basic"
73-
className={styles.dropdown}
74-
data-testid="selectViewType"
75-
>
76-
{viewType}
77-
</Dropdown.Toggle>
78-
<Dropdown.Menu>
79-
<Dropdown.Item
80-
eventKey={ViewType.MONTH}
81-
data-testid="selectMonth"
82-
>
83-
{ViewType.MONTH}
84-
</Dropdown.Item>
85-
<Dropdown.Item eventKey={ViewType.DAY} data-testid="selectDay">
86-
{ViewType.DAY}
87-
</Dropdown.Item>
88-
<Dropdown.Item
89-
eventKey={ViewType.YEAR}
90-
data-testid="selectYear"
91-
>
92-
{ViewType.YEAR}
93-
</Dropdown.Item>
94-
</Dropdown.Menu>
95-
</Dropdown>
96-
</div>
97-
<div>
98-
<Dropdown className={styles.selectTypeEventHeader}>
99-
<Dropdown.Toggle
100-
id="dropdown-basic"
101-
className={styles.dropdown}
102-
data-testid="eventType"
103-
>
104-
{t('eventType')}
105-
</Dropdown.Toggle>
106-
<Dropdown.Menu>
107-
<Dropdown.Item eventKey="Events" data-testid="events">
108-
Events
109-
</Dropdown.Item>
110-
<Dropdown.Item eventKey="Workshops" data-testid="workshop">
111-
Workshops
112-
</Dropdown.Item>
113-
</Dropdown.Menu>
114-
</Dropdown>
115-
</div>
67+
<SortingButton
68+
title={t('viewType')}
69+
sortingOptions={[
70+
{ label: ViewType.MONTH, value: 'selectMonth' },
71+
{ label: ViewType.DAY, value: 'selectDay' },
72+
{ label: ViewType.YEAR, value: 'selectYear' },
73+
]}
74+
selectedOption={viewType}
75+
onSortChange={handleChangeView}
76+
dataTestIdPrefix="selectViewType"
77+
className={styles.dropdown}
78+
/>
79+
<SortingButton
80+
title={t('eventType')}
81+
sortingOptions={[
82+
{ label: 'Events', value: 'Events' },
83+
{ label: 'Workshops', value: 'Workshops' },
84+
]}
85+
selectedOption={t('eventType')}
86+
onSortChange={(value) => console.log(`Selected: ${value}`)}
87+
dataTestIdPrefix="eventType"
88+
className={styles.dropdown}
89+
buttonLabel={t('eventType')}
90+
/>
11691
<Button
11792
variant="success"
11893
className={styles.createButtonEventHeader}

src/components/EventManagement/EventAttendance/EventAttendance.spec.tsx

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,14 @@ describe('Event Attendance Component', () => {
103103
await wait();
104104

105105
const sortDropdown = screen.getByTestId('sort-dropdown');
106-
userEvent.click(sortDropdown);
107-
userEvent.click(screen.getByText('Sort'));
106+
userEvent.click(sortDropdown); // Open the sort dropdown
107+
108+
const sortOption = screen.getByText('Ascending'); // Assuming 'Ascending' is the option you choose for sorting
109+
userEvent.click(sortOption);
108110

109111
await waitFor(() => {
110112
const attendees = screen.getAllByTestId('attendee-name-0');
113+
// Check if the first attendee is 'Bruce Garza' after sorting
111114
expect(attendees[0]).toHaveTextContent('Bruce Garza');
112115
});
113116
});
@@ -117,10 +120,14 @@ describe('Event Attendance Component', () => {
117120

118121
await wait();
119122

120-
userEvent.click(screen.getByText('Filter: All'));
121-
userEvent.click(screen.getByText('This Month'));
123+
const filterDropdown = screen.getByTestId('filter-dropdown');
124+
userEvent.click(filterDropdown); // Open the filter dropdown
125+
126+
const filterOption = screen.getByText('This Month'); // Assuming 'This Month' is the option you choose for filtering
127+
userEvent.click(filterOption);
122128

123129
await waitFor(() => {
130+
// Check if the message 'Attendees not Found' is displayed
124131
expect(screen.getByText('Attendees not Found')).toBeInTheDocument();
125132
});
126133
});

0 commit comments

Comments
 (0)