From a1fce133d90b6985fcfb7501c283e3939611b1af Mon Sep 17 00:00:00 2001 From: Evan Purkhiser Date: Thu, 15 Jun 2023 15:19:15 -0700 Subject: [PATCH] ref(js): Convert access.spec to tsx --- .../acl/{access.spec.jsx => access.spec.tsx} | 32 +++++++++++-------- 1 file changed, 18 insertions(+), 14 deletions(-) rename static/app/components/acl/{access.spec.jsx => access.spec.tsx} (91%) diff --git a/static/app/components/acl/access.spec.jsx b/static/app/components/acl/access.spec.tsx similarity index 91% rename from static/app/components/acl/access.spec.jsx rename to static/app/components/acl/access.spec.tsx index 62a85cfb348783..af4a430a26ecfa 100644 --- a/static/app/components/acl/access.spec.jsx +++ b/static/app/components/acl/access.spec.tsx @@ -128,9 +128,9 @@ describe('Access', function () { it('handles no user', function () { // Regression test for the share sheet. - ConfigStore.config = { + ConfigStore.config = TestStubs.Config({ user: null, - }; + }); render({childrenMock}, {context: routerContext, organization}); @@ -141,9 +141,10 @@ describe('Access', function () { }); it('is superuser', function () { - ConfigStore.config = { - user: {isSuperuser: true}, - }; + ConfigStore.config = TestStubs.Config({ + user: TestStubs.User({isSuperuser: true}), + }); + render({childrenMock}, { context: routerContext, organization, @@ -156,9 +157,10 @@ describe('Access', function () { }); it('is not superuser', function () { - ConfigStore.config = { - user: {isSuperuser: false}, - }; + ConfigStore.config = TestStubs.Config({ + user: TestStubs.User({isSuperuser: false}), + }); + render({childrenMock}, { context: routerContext, organization, @@ -195,9 +197,10 @@ describe('Access', function () { }); it('has superuser', function () { - ConfigStore.config = { - user: {isSuperuser: true}, - }; + ConfigStore.config = TestStubs.Config({ + user: TestStubs.User({isSuperuser: true}), + }); + render(

The Child

@@ -209,9 +212,10 @@ describe('Access', function () { }); it('has no superuser', function () { - ConfigStore.config = { - user: {isSuperuser: false}, - }; + ConfigStore.config = TestStubs.Config({ + user: TestStubs.User({isSuperuser: false}), + }); + render(

The Child