Skip to content

Commit

Permalink
chore: rebase issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dexturr committed Feb 6, 2024
1 parent 0f8cd07 commit d5364ff
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions frontend/routes/auth/settings/home/settings.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ jest.mock('./settings-form-elements/radio', () => ({
jest.mock('./sections/lock-section', () => ({
LockSection: () => <div data-testid="lock-section" />
}))
jest.mock('./sections/export-recovery-phrase', () => ({
ExportRecoveryPhraseSection: () => <div data-testid="export-recovery-phrase-section" />
}))
jest.mock('!/config', () => ({
...jest.requireActual('../../../../../config/test').default,
closeWindowOnPopupOpen: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@ describe('NetworkDetails', () => {
it('should render the details of the network in each section', () => {
renderComponent()
const sections = screen.getAllByTestId(vegaSectionLocators.vegaSection)
const [id, chainId, vegaUrls, ethereumExplorer, nodes] = sections
const [id, chainId, color, vegaUrls, ethereumExplorer, nodes] = sections
expect(within(id).getByTestId(vegaSubHeaderLocators.subHeader)).toHaveTextContent('Id')
expect(within(id).getByTestId(locators.networkId)).toHaveTextContent(testingNetwork.id)

expect(within(chainId).getByTestId(vegaSubHeaderLocators.subHeader)).toHaveTextContent('Chain id')
expect(within(chainId).getByTestId(locators.chainId)).toHaveTextContent(testingNetwork.chainId)

expect(within(color).getByTestId(vegaSubHeaderLocators.subHeader)).toHaveTextContent('Color')
expect(within(color).getByTestId(locators.color)).toHaveTextContent(testingNetwork.color)

expect(within(vegaUrls).getByTestId(vegaSubHeaderLocators.subHeader)).toHaveTextContent('Vega URLs')
const rows = within(vegaUrls).getAllByTestId(dataTableLocators.dataRow)
expect(rows[0]).toHaveTextContent('Console')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const locators = {
networkId: 'network-id',
chainId: 'chain-id',
ethereumExplorer: 'ethereum-explorer',
networkDetailsNode: 'network-details-node'
networkDetailsNode: 'network-details-node',
color: 'color'
}

export const NetworkDetails = () => {
Expand All @@ -41,7 +42,7 @@ export const NetworkDetails = () => {
</VegaSection>
<VegaSection>
<SubHeader content="Color" />
<div className="text-white mt-1 flex items-center" data-testid={locators.chainId}>
<div className="text-white mt-1 flex items-center" data-testid={locators.color}>
{network.color}{' '}
<div
className="border-1 border border-white rounded-sm ml-3 h-4 w-4"
Expand Down

0 comments on commit d5364ff

Please sign in to comment.