You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi - we're seeing a consistent test failure in our CI pipelines where characters from the middle of a typed string are missing. The scenario is something like:
describe('my tests', () => {
function renderComponent() {
return render(
<SomeProvider>
<ComponentUnderTest />
</SomeProvider>
);
}
const user = userEvent.setup();
it("should clear 'Acct Code' when clear all is pressed", async () => {
const fieldName = 'Acct Code';
renderComponent();
const clearButton = await screen.findByLabelText('Clear All Filters');
const field = screen.getByLabelText(fieldName);
await user.click(field);
await user.keyboard(fieldName);
await waitFor(() => expect(field).toHaveValue(fieldName));
await user.click(clearButton);
await waitFor(() => expect(screen.getByLabelText(fieldName)).toHaveValue(''));
});
}
The type of failure we see is:
expect(element).toHaveValue(Acct Code)
Expected the element to have value:
Acct Code
Received:
Acct ode
We have similar test cases for 8 different fields and it's not the same test case that consistently fails.
another example failure:
expect(element).toHaveValue(GL Acct Name)
Expected the element to have value:
GL Acct Name
Received:
GL Acc Name
The failures only happen in our CI environment and not locally. Our CI environment is managed by another team but based on run history/timings, we suspect it has a lower resource allocation than our development environments and/or may be running more than one build agent. We often see test timeouts that pass on rerun and never occur locally.
Any ideas on why we'd see missing characters? Could we be using the library incorrectly?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi - we're seeing a consistent test failure in our CI pipelines where characters from the middle of a typed string are missing. The scenario is something like:
The type of failure we see is:
We have similar test cases for 8 different fields and it's not the same test case that consistently fails.
another example failure:
The failures only happen in our CI environment and not locally. Our CI environment is managed by another team but based on run history/timings, we suspect it has a lower resource allocation than our development environments and/or may be running more than one build agent. We often see test timeouts that pass on rerun and never occur locally.
Any ideas on why we'd see missing characters? Could we be using the library incorrectly?
Beta Was this translation helpful? Give feedback.
All reactions