Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: update Chat section title to 'Chats'
Browse files Browse the repository at this point in the history
Nivedita-Chhokar committed Jan 8, 2025
1 parent 1bc3c5e commit 7c7aa83
Showing 7 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions public/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -1262,6 +1262,7 @@
"endOfResults": "endOfResults"
},
"userChat": {
"title": "Chats",
"add": "Add",
"chat": "Chat",
"search": "Search",
1 change: 1 addition & 0 deletions public/locales/fr/translation.json
Original file line number Diff line number Diff line change
@@ -1262,6 +1262,7 @@
"endOfResults": "Fin des résultats"
},
"userChat": {
"title": "Discussions",
"add": "Ajouter",
"chat": "Chat",
"contacts": "Contacts",
1 change: 1 addition & 0 deletions public/locales/hi/translation.json
Original file line number Diff line number Diff line change
@@ -1262,6 +1262,7 @@
"endOfResults": "परिणाम समाप्त"
},
"userChat": {
"title": "चैट्स",
"add": "जोड़ें",
"chat": "बात करना",
"contacts": "संपर्क",
1 change: 1 addition & 0 deletions public/locales/sp/translation.json
Original file line number Diff line number Diff line change
@@ -1265,6 +1265,7 @@
"createAdvertisement": "Crear publicidad"
},
"userChat": {
"title": "Chats",
"add": "Agregar",
"chat": "Charlar",
"search": "Buscar",
1 change: 1 addition & 0 deletions public/locales/zh/translation.json
Original file line number Diff line number Diff line change
@@ -1262,6 +1262,7 @@
"endOfResults": "结果结束"
},
"userChat": {
"title": "聊天",
"add": "添加",
"chat": "聊天",
"contacts": "联系方式",
19 changes: 19 additions & 0 deletions src/screens/UserPortal/UserScreen/UserScreen.spec.tsx
Original file line number Diff line number Diff line change
@@ -130,6 +130,25 @@ describe('UserScreen tests with LeftDrawer functionality', () => {
expect(titleElement).toHaveTextContent('People');
});

it('renders the correct title for chat', () => {
mockLocation = '/user/chat/123';

render(
<MockedProvider addTypename={false} link={link}>
<BrowserRouter>
<Provider store={store}>
<I18nextProvider i18n={i18nForTest}>
<UserScreen />
</I18nextProvider>
</Provider>
</BrowserRouter>
</MockedProvider>,
);

const titleElement = screen.getByRole('heading', { level: 1 });
expect(titleElement).toHaveTextContent('Chats');
});

it('toggles LeftDrawer correctly based on window size and user interaction', () => {
render(
<MockedProvider addTypename={false} link={link}>
1 change: 1 addition & 0 deletions src/screens/UserPortal/UserScreen/UserScreen.tsx
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ const map: InterfaceMapType = {
people: 'people',
events: 'userEvents',
donate: 'donate',
chat: 'userChat',
campaigns: 'userCampaigns',
pledges: 'userPledges',
volunteer: 'userVolunteer',

0 comments on commit 7c7aa83

Please sign in to comment.