From 3aa2777a0b824e41e304602213b2d67dd3cf46f8 Mon Sep 17 00:00:00 2001 From: Nisanthan Nanthakumar Date: Mon, 20 Sep 2021 12:26:15 -0700 Subject: [PATCH] update tests --- tests/js/spec/views/projectOwnership.spec.jsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tests/js/spec/views/projectOwnership.spec.jsx b/tests/js/spec/views/projectOwnership.spec.jsx index ddc238659daa78..fe7f8ab915f365 100644 --- a/tests/js/spec/views/projectOwnership.spec.jsx +++ b/tests/js/spec/views/projectOwnership.spec.jsx @@ -60,7 +60,7 @@ describe('Project Ownership', function () { it('renders button', function () { org = TestStubs.Organization({ features: ['integrations-codeowners'], - access: ['project:write'], + access: ['org:integrations'], }); const wrapper = mountWithTheme( @@ -76,6 +76,10 @@ describe('Project Ownership', function () { }); it('clicking button opens modal', async function () { + org = TestStubs.Organization({ + features: ['integrations-codeowners'], + access: ['org:integrations'], + }); const wrapper = mountWithTheme( , TestStubs.routerContext([{organization: org}]) ); - - expect(wrapper.find('CodeOwnerButton').exists()).toBe(false); + expect( + wrapper.find('[data-test-id="add-codeowner-request-button"] button').exists() + ).toBe(true); }); }); });