Skip to content

Instantly share code, notes, and snippets.

@jodyheavener
Created June 2, 2021 15:46
Show Gist options
  • Save jodyheavener/27d6fba9db9cc5749f3e322467cef73d to your computer and use it in GitHub Desktop.
Save jodyheavener/27d6fba9db9cc5749f3e322467cef73d to your computer and use it in GitHub Desktop.
diff --git a/app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/index.test.tsx b/app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/index.test.tsx
index a9dd3dc11..c4891e6d0 100644
--- a/app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/index.test.tsx
+++ b/app/experimenter/nimbus-ui/src/components/PageEditBranches/FormBranches/index.test.tsx
@@ -344,16 +344,16 @@ describe("FormBranches", () => {
}
const oldValue = featureConfigSelects[0].value;
- act(() => {
- fireEvent.change(featureConfigSelects[0], {
- target: { value: featureIdx },
- });
+ fireEvent.change(featureConfigSelects[0], {
+ target: { value: featureIdx },
});
// All selectors should have changed
for (const select of featureConfigSelects) {
- expect(select.value).toEqual(featureConfigSelects[0].value);
- expect(select.value).not.toEqual(oldValue);
+ await waitFor(() => {
+ expect(select.value).toEqual(featureConfigSelects[0].value);
+ expect(select.value).not.toEqual(oldValue);
+ });
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment