Latest content changes

This commit is contained in:
Ryon Coleman 2025-01-14 12:09:45 -05:00 committed by Carlos Felix
commit 0e84cbac3a
35 changed files with 303 additions and 352 deletions

View file

@ -1,5 +1 @@
@use '../../styles/design-system.scss' as *;
.prioritizationCopy2Container{
@include u-padding-top(2);
}

View file

@ -1,5 +1,5 @@
import React from 'react';
import {render, screen} from '@testing-library/react';
import React from 'react';
import {LocalizedComponent} from '../../test/testHelpers';
import PrioritizationCopy2 from './PrioritizationCopy2';
@ -48,9 +48,7 @@ describe('rendering of PrioritizationCopy2 Component', () => {
);
expect(asFragment()).toMatchSnapshot();
screen.getByText((content, element) => {
return element?.tagName.toLowerCase() === 'div' && content.startsWith(testCase.para1);
});
screen.getByText((content) => content.startsWith(testCase.para1));
});
});
});

View file

@ -1,7 +1,5 @@
import React from 'react';
import * as styles from './PrioritizationCopy2.module.scss';
import * as EXPLORE_COPY from '../../data/copy/explore';
interface IPrioritizationCopy2 {
@ -40,8 +38,7 @@ const PrioritizationCopy2 =
tribalCountUS,
percentTractTribal,
}:IPrioritizationCopy2) => {
let prioCopy2Rendered = <></>;
let prioCopy2Rendered = null;
// if 1
if (
@ -165,13 +162,9 @@ const PrioritizationCopy2 =
(tribalCountAK !== null && tribalCountAK >= 1)
) {
prioCopy2Rendered = EXPLORE_COPY.getPrioANVCopy(tribalCountAK, false);
};
}
return (
<div className={prioCopy2Rendered !== <></> ? '' : styles.prioritizationCopy2Container}>
{prioCopy2Rendered}
</div>
);
return prioCopy2Rendered && <p>{prioCopy2Rendered}</p>;
};
export default PrioritizationCopy2;

View file

@ -2,20 +2,16 @@
exports[`rendering of PrioritizationCopy2 Component checks if component renders The lands of Federally Recognized Tribes that cover 2% of this tract are also considered disadvantaged. when totCats = 0, totBurds = 0, isAdj = true, isAdjLI = true, tribal % = 2, 1`] = `
<DocumentFragment>
<div
class=""
>
<p>
The lands of Federally Recognized Tribes that cover 2% of this tract are also considered disadvantaged.
</div>
</p>
</DocumentFragment>
`;
exports[`rendering of PrioritizationCopy2 Component checks if component renders The lands of Federally Recognized Tribes that cover 4% of this tract are also considered disadvantaged. when totCats = 0, totBurds = 1, isAdj = true, isAdjLI = true, tribal % = 4, 1`] = `
<DocumentFragment>
<div
class=""
>
<p>
The lands of Federally Recognized Tribes that cover 4% of this tract are also considered disadvantaged.
</div>
</p>
</DocumentFragment>
`;