-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This updates the CodecovCLI page in the FailedTestsTab to use the FrameworkTabsCard. This also reorders the steps on the CodecovCLI page such that the JUnit XML generation step comes first for consistency with the other page.
- Loading branch information
1 parent
e1e65bb
commit 674db3d
Showing
10 changed files
with
93 additions
and
98 deletions.
There are no files selected for viewing
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
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
File renamed without changes.
42 changes: 42 additions & 0 deletions
42
src/pages/RepoPage/FailedTestsTab/FrameworkTabsCard/FrameworkTabsCard.spec.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,42 @@ | ||
import { render, screen } from '@testing-library/react' | ||
import userEvent from '@testing-library/user-event' | ||
|
||
import { FrameworkTabsCard } from './FrameworkTabsCard' | ||
|
||
jest.mock('./FrameworkTabs', () => ({ | ||
__esModule: true, | ||
FrameworkTabs: () => 'FrameworkTabs', | ||
})) | ||
|
||
describe('FrameworkTabsCard', () => { | ||
function setup() { | ||
const user = userEvent.setup() | ||
return { user } | ||
} | ||
|
||
it('renders title of card', () => { | ||
setup() | ||
render(<FrameworkTabsCard />) | ||
|
||
const title = screen.getByText('Step 1: Output a JUnit XML file in your CI') | ||
expect(title).toBeInTheDocument() | ||
}) | ||
|
||
it('renders content of card', () => { | ||
setup() | ||
render(<FrameworkTabsCard />) | ||
|
||
const content = screen.getByText( | ||
/Select the framework below to generate a JUnit XM/ | ||
) | ||
expect(content).toBeInTheDocument() | ||
}) | ||
|
||
it('renders framework tabs', () => { | ||
setup() | ||
render(<FrameworkTabsCard />) | ||
|
||
const frameworkTabs = screen.getByText('FrameworkTabs') | ||
expect(frameworkTabs).toBeInTheDocument() | ||
}) | ||
}) |
22 changes: 22 additions & 0 deletions
22
src/pages/RepoPage/FailedTestsTab/FrameworkTabsCard/FrameworkTabsCard.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,22 @@ | ||
import { Card } from 'ui/Card' | ||
|
||
import { FrameworkTabs } from './FrameworkTabs' | ||
|
||
export function FrameworkTabsCard() { | ||
return ( | ||
<Card> | ||
<Card.Header> | ||
<Card.Title size="base"> | ||
Step 1: Output a JUnit XML file in your CI | ||
</Card.Title> | ||
</Card.Header> | ||
<Card.Content className="flex flex-col gap-4"> | ||
<p> | ||
Select the framework below to generate a JUnit XML file that contains | ||
the results of your test run. | ||
</p> | ||
<FrameworkTabs /> | ||
</Card.Content> | ||
</Card> | ||
) | ||
} |
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 @@ | ||
export { FrameworkTabsCard } from './FrameworkTabsCard' |
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