generated from uc-cdis/commons-frontend-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(homepagePlaceholders): added unit tests
- Loading branch information
1 parent
a710c9a
commit 1e7f189
Showing
15 changed files
with
102 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
src/lib/home/Components/CarouselBanner/CarouselBanner.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
// ExampleComponent.test.tsx | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom'; | ||
import CarouselBanner from './CarouselBanner'; | ||
|
||
test('renders Example Component text', () => { | ||
render(<CarouselBanner />); | ||
|
||
// Check if the component renders the expected text | ||
const headingElement = screen.getByText(/Carousel Banner/i); | ||
expect(headingElement).toBeInTheDocument(); | ||
describe('CarouselBanner Component', () => { | ||
test('renders the CarouselBanner component', () => { | ||
render(<CarouselBanner />); | ||
const element = screen.getByTestId('carousel-banner'); | ||
expect(element).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/lib/home/Components/ContentSpotlight/ContentSpotlight.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom'; | ||
import ContentSpotlight from './ContentSpotlight'; | ||
|
||
describe('ContentSpotlight Component', () => { | ||
test('renders the CarouselBanner component', () => { | ||
render(<ContentSpotlight />); | ||
const element = screen.getByTestId('content-spotlight'); | ||
expect(element).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/lib/home/Components/PhotoDivider/PhotoDivider.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom'; | ||
import PhotoDivider from './PhotoDivider'; | ||
|
||
describe('PhotoDivider Component', () => { | ||
test('renders the PhotoDivider component', () => { | ||
render(<PhotoDivider />); | ||
const element = screen.getByTestId('photo-divider'); | ||
expect(element).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom'; | ||
import QuickLinks from './QuickLinks'; | ||
|
||
describe('PhotoDivider Component', () => { | ||
test('renders the PhotoDivider component', () => { | ||
render(<QuickLinks />); | ||
const element = screen.getByTestId('quick-links'); | ||
expect(element).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/lib/home/Components/QuoteSpotlight/QuoteSpotlight.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom'; | ||
import QuoteSpotlight from './QuoteSpotlight'; | ||
|
||
describe('PhotoDivider Component', () => { | ||
test('renders the PhotoDivider component', () => { | ||
render(<QuoteSpotlight />); | ||
const element = screen.getByTestId('quote-spotlight'); | ||
expect(element).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/lib/home/Components/ResourcesCallout/ResourcesCallout.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react'; | ||
import { render, screen } from '@testing-library/react'; | ||
import '@testing-library/jest-dom'; | ||
import ResourcesCallout from './ResourcesCallout'; | ||
|
||
describe('PhotoDivider Component', () => { | ||
test('renders the PhotoDivider component', () => { | ||
render(<ResourcesCallout />); | ||
const element = screen.getByTestId('resources-callout'); | ||
expect(element).toBeInTheDocument(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters