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

#800 Added IgBoSpeech to Navbar #804

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
11 changes: 7 additions & 4 deletions src/__tests__/Navbar/NavigationMenu.test.tsx
Copy link
Collaborator

Choose a reason for hiding this comment

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

This looks great! You don't need to change the imported component from NavigationMenu to NavigationOptions. We have another test file called NavigationOptions.test.tsx that you want to update.

Please revert these changes in this file and make these changes in NavigationOptions.test.tsx

Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import React from 'react';
import { render } from '@testing-library/react';
import TestContext from '../components/TestContext';
import NavigationMenu from '../../pages/components/Navbar/NavigationMenu';
import NavigationOptions from '../../pages/components/Navbar/NavigationOptions';
import { navigationLinks } from '../../shared/constants/navigationLinks';

describe('NavigationMenu', () => {
it('renders the navigation menu', async () => {
describe('NavigationOptions', () => {
it('renders the navigation options', async () => {
const { findByText } = render(
<TestContext>
<NavigationMenu />
<NavigationOptions />
</TestContext>
);

await Promise.all(navigationLinks.map(async ({ label }) => await findByText(label)));
const igboSpeechLabel = "IgboSpeech";
const label = await findByText(igboSpeechLabel);
expect(label).toHaveProperty('href', 'https://speech.igboapi.com/');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ describe('NavigationOptions', () => {
await findByText('Docs');
await findByText('Research');
await findByText('Log In');
await findByText('IgboSpeech');
});
});
4 changes: 4 additions & 0 deletions src/shared/constants/navigationLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ export const navigationLinks: { href: string, label: string }[] = [
href: 'https://huggingface.co/nkowaokwu',
label: 'Research',
},
{
href: 'https://speech.igboapi.com',
label: 'IgboSpeech',
},
{
href: '/signup',
label: 'Log In',
Expand Down
Loading