From b1a913e0c8eaeb38eb61889ccbf031144cbe19de Mon Sep 17 00:00:00 2001 From: Imran Hossain Date: Thu, 26 Dec 2024 19:01:37 +0600 Subject: [PATCH] Add tests for unattached domain manage button --- .../domain-overview-pane/test/index.test.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/client/my-sites/domains/domain-management/domain-overview-pane/test/index.test.tsx b/client/my-sites/domains/domain-management/domain-overview-pane/test/index.test.tsx index 922bcd802b7be..a2732813d8573 100644 --- a/client/my-sites/domains/domain-management/domain-overview-pane/test/index.test.tsx +++ b/client/my-sites/domains/domain-management/domain-overview-pane/test/index.test.tsx @@ -113,6 +113,21 @@ describe( 'DomainOverviewPane', () => { expect( screen.getByText( 'Manage site' ) ).toBeInTheDocument(); } ); + it( 'does not show Manage Site button when domain only and unattached', () => { + const siteProps = { + ...defaultProps, + site: { + ...defaultProps.site, + options: { + ...defaultProps.site.options, + is_domain_only: true, + }, + }, + }; + renderComponent( siteProps ); + expect( screen.queryByText( 'Manage site' ) ).not.toBeInTheDocument(); + } ); + it( 'handles tab switching', () => { renderComponent(); fireEvent.click( screen.getByText( 'Email' ) );