Skip to content

Commit

Permalink
fix settings test
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Feb 7, 2023
1 parent 0b48b52 commit b354770
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 4 deletions.
9 changes: 9 additions & 0 deletions src/test/Settings/Settings.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ jest.mock('@app/Settings/AutomatedAnalysisConfig', () => ({
} as UserSetting,
}));

jest.mock('@app/Settings/ChartCardsConfig', () => ({
ChartCardsConfig: {
titleKey: 'SETTINGS.CHARTS_CONFIG.TITLE',
descConstruct: 'SETTINGS.CHARTS_CONFIG.DESCRIPTION',
category: 'SETTINGS.CATEGORIES.DASHBOARD',
content: () => <Text>Chart Cards Config Component</Text>,
} as UserSetting,
}));

jest.mock('@app/Settings/CredentialsStorage', () => ({
CredentialsStorage: {
titleKey: 'SETTINGS.CREDENTIALS_STORAGE.TITLE',
Expand Down
59 changes: 55 additions & 4 deletions src/test/Settings/__snapshots__/Settings.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,57 @@ exports[`<Settings/> renders correctly 1`] = `
</p>
</div>
</div>
<div
className="pf-c-form__group"
>
<div
className="pf-c-form__group-label"
>
<label
className="pf-c-form__label"
>
<span
className="pf-c-form__label-text"
>
<h2
className="pf-c-title pf-m-lg"
data-ouia-component-id="OUIA-Generated-Title-7"
data-ouia-component-type="PF4/Title"
data-ouia-safe={true}
>
Dashboard Metrics Configuration
</h2>
</span>
</label>
</div>
<div
className="pf-c-form__group-control"
>
<div
className="pf-c-helper-text"
>
<div
className="pf-c-helper-text__item"
>
<span
className="pf-c-helper-text__item-text"
>
Set configuration options for the behaviour of Metrics cards on the Dashboard.
</span>
</div>
</div>
<p
className=""
data-ouia-component-id="OUIA-Generated-Text-7"
data-ouia-component-type="PF4/Text"
data-ouia-safe={true}
data-pf-content={true}
>
Chart Cards Config Component
</p>
</div>
</div>
</form>
</div>
<div
Expand All @@ -540,7 +591,7 @@ exports[`<Settings/> renders correctly 1`] = `
>
<h2
className="pf-c-title pf-m-lg"
data-ouia-component-id="OUIA-Generated-Title-7"
data-ouia-component-id="OUIA-Generated-Title-8"
data-ouia-component-type="PF4/Title"
data-ouia-safe={true}
>
Expand Down Expand Up @@ -570,7 +621,7 @@ exports[`<Settings/> renders correctly 1`] = `
</div>
<p
className=""
data-ouia-component-id="OUIA-Generated-Text-7"
data-ouia-component-id="OUIA-Generated-Text-8"
data-ouia-component-type="PF4/Text"
data-ouia-safe={true}
data-pf-content={true}
Expand All @@ -593,7 +644,7 @@ exports[`<Settings/> renders correctly 1`] = `
>
<h2
className="pf-c-title pf-m-lg"
data-ouia-component-id="OUIA-Generated-Title-8"
data-ouia-component-id="OUIA-Generated-Title-9"
data-ouia-component-type="PF4/Title"
data-ouia-safe={true}
>
Expand Down Expand Up @@ -621,7 +672,7 @@ exports[`<Settings/> renders correctly 1`] = `
</div>
<p
className=""
data-ouia-component-id="OUIA-Generated-Text-8"
data-ouia-component-id="OUIA-Generated-Text-9"
data-ouia-component-type="PF4/Text"
data-ouia-safe={true}
data-pf-content={true}
Expand Down

0 comments on commit b354770

Please sign in to comment.