Skip to content

Commit

Permalink
Fix test regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
peterMuriuki committed Feb 16, 2024
1 parent 37afdff commit 4a736b2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const ViewDetailsWrapper = (props: ViewDetailsWrapperProps) => {
const FallbackImage = ({ active }: { active: boolean }) => {
return (
<Skeleton.Image
data-testid="fallback-img"
className="fallback-img"
style={{
height: '192px',
width: '192px',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,31 @@ exports[`renders correctly when listing resources 3`] = `
`;

exports[`renders correctly when listing resources 4`] = `
<div
class="singleKeyValue-pair"
>
<dt
class="singleKeyValue-pair__label"
>
<span
class="ant-typography ant-typography-secondary css-dev-only-do-not-override-k7429z"
>
Material Number
</span>
</dt>
<dd
class="singleKeyValue-pair__value"
>
<span
class="ant-typography css-dev-only-do-not-override-k7429z"
>
52cffa51-fa81-49aa-9944-5b45d9e4c117
</span>
</dd>
</div>
`;

exports[`renders correctly when listing resources 5`] = `
<div
class="singleKeyValue-pair"
>
Expand All @@ -50,7 +75,7 @@ exports[`renders correctly when listing resources 4`] = `
</div>
`;

exports[`renders correctly when listing resources 5`] = `
exports[`renders correctly when listing resources 6`] = `
<div
class="singleKeyValue-pair"
>
Expand All @@ -75,7 +100,7 @@ exports[`renders correctly when listing resources 5`] = `
</div>
`;

exports[`renders correctly when listing resources 6`] = `
exports[`renders correctly when listing resources 7`] = `
<div
class="singleKeyValue-pair"
>
Expand All @@ -100,7 +125,7 @@ exports[`renders correctly when listing resources 6`] = `
</div>
`;

exports[`renders correctly when listing resources 7`] = `
exports[`renders correctly when listing resources 8`] = `
<div
class="singleKeyValue-pair"
>
Expand All @@ -125,7 +150,7 @@ exports[`renders correctly when listing resources 7`] = `
</div>
`;

exports[`renders correctly when listing resources 8`] = `
exports[`renders correctly when listing resources 9`] = `
<div
class="singleKeyValue-pair"
>
Expand All @@ -150,7 +175,7 @@ exports[`renders correctly when listing resources 8`] = `
</div>
`;

exports[`renders correctly when listing resources 9`] = `
exports[`renders correctly when listing resources 10`] = `
<div
class="singleKeyValue-pair"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ test('test error on attached binary request', async () => {
);
expect(commodityValues).toEqual([
'Product Id52cffa51-fa81-49aa-9944-5b45d9e4c117',
'Material Number52cffa51-fa81-49aa-9944-5b45d9e4c117',
'NameBed nets',
'ActiveActive',
'Is it thereyes',
Expand All @@ -106,7 +107,7 @@ test('test error on attached binary request', async () => {
]);

// image section
screen.getByTestId('fallback-img');
expect(document.querySelector('.fallback-img')).toBeInTheDocument();

expect(nock.isDone()).toBeTruthy();
});
Expand All @@ -131,6 +132,7 @@ test('test missing binary in commodity', async () => {
);
expect(commodityValues).toEqual([
'Product Id52cffa51-fa81-49aa-9944-5b45d9e4c117',
'Material Number52cffa51-fa81-49aa-9944-5b45d9e4c117',
'NameBed nets',
'ActiveActive',
'Is it thereyes',
Expand All @@ -140,7 +142,7 @@ test('test missing binary in commodity', async () => {
]);

// image section
screen.getByTestId('fallback-img');
expect(document.querySelector('.fallback-img')).toBeInTheDocument();

expect(nock.isDone()).toBeTruthy();
});

0 comments on commit 4a736b2

Please sign in to comment.