Complete the code to mount a React component for isolated testing.
cy.[1](<MyComponent />);Use mount to render a component in isolation for testing.
Complete the code to stub a child component during component testing.
cy.mount(<ParentComponent childComponent=[1] />);Props and components in React are case-sensitive. The child component should be passed as ChildComponent.
Fix the error in the test code to isolate the UI unit correctly.
cy.mount(<MyComponent />).[1]('.submit-button').click();
Use find to select elements within the mounted component in Cypress.
Fill both blanks to stub a network request and isolate the component from backend calls.
cy.intercept('[1]', [2]).as('getData');
Intercept the API endpoint /api/data and respond with fixture data to isolate the component.
Fill all three blanks to assert the component renders isolated UI text correctly.
cy.get('[1]').should('[2]', '[3]');
Select the element with class .title, assert it contains the text Welcome to the app.