about/AboutDialog: fix failing test when $REACT_APP_NAME set

When the `REACT_APP_NAME` environment variable is set to something other
that "Pybricks Code", it caused the test to fail.
This commit is contained in:
David Lechner
2021-06-23 15:12:07 -05:00
parent c108fe8ecc
commit ab0ddd04b5
+12 -6
View File
@@ -53,9 +53,12 @@ it('should manage license dialog open/close', async () => {
userEvent.click(screen.getByText('Software Licenses'));
expect(
screen.getByText('Pybricks Code is built on open source software.', {
exact: false,
}),
screen.getByText(
`${process.env.REACT_APP_NAME} is built on open source software.`,
{
exact: false,
},
),
).toBeInTheDocument();
const licenseDialog = document.querySelector(
@@ -64,8 +67,11 @@ it('should manage license dialog open/close', async () => {
userEvent.click(getByLabelText(licenseDialog, 'Close'));
await waitForElementToBeRemoved(() =>
screen.queryByText('Pybricks Code is built on open source software.', {
exact: false,
}),
screen.queryByText(
`${process.env.REACT_APP_NAME} is built on open source software.`,
{
exact: false,
},
),
);
});