Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix tests
  • Loading branch information
Kateryna Kodonenko
Kateryna Kodonenko committed Jan 3, 2025
commit 7ff1895a83173633910a5dfcb3aa8722a719dbbe
13 changes: 0 additions & 13 deletions src/components/tests/content-tab-sync.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,19 +87,6 @@ describe( 'ContentTabSync', () => {
expect( getIpcApi().openURL ).toHaveBeenCalled();
} );

it( 'displays create new site button to authenticated user', () => {
( useAuth as jest.Mock ).mockReturnValue( { isAuthenticated: true, authenticate: jest.fn() } );
renderWithProvider( <ContentTabSync selectedSite={ selectedSite } /> );
const createSiteButton = screen.getByRole( 'button', { name: /Create new site/i } );
fireEvent.click( createSiteButton );

expect( screen.getByText( 'Sync with' ) ).toBeInTheDocument();
expect( createSiteButton ).toBeInTheDocument();
expect( getIpcApi().openURL ).toHaveBeenCalledWith(
'https://wordpress.com/setup/new-hosted-site?ref=studio&section=studio-sync&studioSiteId=site-id'
);
} );

it( 'displays connect site button to authenticated user', () => {
( useAuth as jest.Mock ).mockReturnValue( { isAuthenticated: true, authenticate: jest.fn() } );
renderWithProvider( <ContentTabSync selectedSite={ selectedSite } /> );
Expand Down