Studio: Automatically start site after import - #678
Conversation
sejas
left a comment
There was a problem hiding this comment.
Looks great! Thanks for the change.
I confirm that after importing a backup to a stopped site results in starting that site.
I left a suggestion to add a new check for this new behaviour.
m73fKd.mp4
| } ); | ||
| ( useSiteDetails as jest.Mock ).mockReturnValue( { | ||
| updateSite: jest.fn(), | ||
| startServer: jest.fn(), |
There was a problem hiding this comment.
What do you think if we add a new test or at least a new assert to check we called the startServer after an import?
Something like: expect( useSiteDetails().startServer ).toHaveBeenCalledTimes( 1 );
There was a problem hiding this comment.
Thanks for testing and reviewing the PR, Antonio!
What do you think if we add a new test or at least a new assert to check we called the startServer after an import?
Something like: expect( useSiteDetails().startServer ).toHaveBeenCalledTimes( 1 );
I like the idea! I have made a change in cd93a5f and also added testing whether startServer was called with the correct site ID.
Related issues
Proposed Changes
Testing Instructions
npm start.Pre-merge Checklist