Remove using <Animated /> to help with determinism

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton committed 2022-05-02 11:45:05 -04:00
1 parent 89d9f397c7
commit 4d57bcaf9a
2 files changed
+8 -9

No files matched your search

@@ -78,9 +78,8 @@ exports[`kube-object-menu given kube object when removing kube object renders 1`
</div> </div>
</div> </div>
<div <div
class="Animate opacity-scale Dialog flex center ConfirmDialog modal enter" class="Dialog flex center ConfirmDialog modal"
data-testid="confirmation-dialog" data-testid="confirmation-dialog"
style="--enter-duration: 100ms; --leave-duration: 100ms;"
> >
<div <div
class="box" class="box"
@@ -173,9 +172,8 @@ exports[`kube-object-menu given kube object with namespace when removing kube ob
</div> </div>
</div> </div>
<div <div
class="Animate opacity-scale Dialog flex center ConfirmDialog modal" class="Dialog flex center ConfirmDialog modal"
data-testid="confirmation-dialog" data-testid="confirmation-dialog"
style="--enter-duration: 100ms; --leave-duration: 100ms;"
> >
<div <div
class="box" class="box"
@@ -268,9 +266,8 @@ exports[`kube-object-menu given kube object without namespace when removing kube
</div> </div>
</div> </div>
<div <div
class="Animate opacity-scale Dialog flex center ConfirmDialog modal" class="Dialog flex center ConfirmDialog modal"
data-testid="confirmation-dialog" data-testid="confirmation-dialog"
style="--enter-duration: 100ms; --leave-duration: 100ms;"
> >
<div <div
class="box" class="box"
@@ -30,6 +30,8 @@ import createEditResourceTabInjectable from "../dock/edit-resource/edit-resource
// TODO: Make tooltips free of side effects by making it deterministic // TODO: Make tooltips free of side effects by making it deterministic
jest.mock("../tooltip"); jest.mock("../tooltip");
// TODO: make `animated={false}` not required to make tests deterministic
class SomeTestExtension extends LensRendererExtension { class SomeTestExtension extends LensRendererExtension {
constructor( constructor(
kubeObjectMenuItems: KubeObjectMenuRegistration[], kubeObjectMenuItems: KubeObjectMenuRegistration[],
@@ -144,7 +146,7 @@ describe("kube-object-menu", () => {
({ baseElement } = render( ({ baseElement } = render(
<div> <div>
<ConfirmDialog /> <ConfirmDialog animated={false} />
<KubeObjectMenu <KubeObjectMenu
object={objectStub} object={objectStub}
@@ -215,7 +217,7 @@ describe("kube-object-menu", () => {
({ baseElement } = render( ({ baseElement } = render(
<div> <div>
<ConfirmDialog /> <ConfirmDialog animated={false} />
<KubeObjectMenu <KubeObjectMenu
object={objectStub} object={objectStub}
@@ -252,7 +254,7 @@ describe("kube-object-menu", () => {
({ baseElement } = render( ({ baseElement } = render(
<div> <div>
<ConfirmDialog /> <ConfirmDialog animated={false} />
<KubeObjectMenu <KubeObjectMenu
object={objectStub} object={objectStub}