https://cypress.io logo
Hello, I have a test: ```js it('Should open widget...
# e2e-testing
f
Hello, I have a test:
Copy code
js
it('Should open widget with loading state', () => {
    cy.get('[data-cy="twilio-widget"]').click({ force: true })
    cy.get('[data-cy="call-button"]').should('exist')
  })
I would like to when I press the button, pass in the prop state of Loading to be true, so I can see the loading modal instead of my default one.
Copy code
js
  if (isLoading) {
    return (
      <Modal
        isOpen={isOpen}
        onClose={onClose}
        size="xl"
        cy-data="modal-loading"
      >
        <Flex direction="column" m={4}>
          <Skeleton height="30px" />
          <SkeletonText mt={4} />
          <Skeleton height="50px" mt={4} />
          <Flex justify="center" mt={4}>
            <Skeleton height="50px" width="120px" />
          </Flex>
        </Flex>
      </Modal>
    )
  }
Anyone know how to do that with cypress?