mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
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:
@@ -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,
|
||||
},
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user