Skip to content

Prompt: Handle intercept / wait of requests in cy.prompt #33063

@hassaanmasood

Description

@hassaanmasood

Current behavior

Whenever I ask cy.prompt to intercept any backend call that will be sent on click of a button, it keeps asking me to improve or provide more information for the prompt.

Desired behavior

No response

Test code to reproduce

 cy.prompt(['Visit the application at https://10.32.241.226:32000/',
    'Ensure that Username and Password field is enabled',
    'Enter \'test@abc.com\' in username field',
    'Enter {{password}} in password field',
    'Ensure that Login button is enabled',
    "Put on intercept on the backend login request",
    "Click Login button.",
    "Expect response of the intercepted login request to contain a token field which should not be null or empty",
    'After login is successful, verify that \'My Engines\' section is visible on the landing page.',
    'Click on the first engine in the \'My Engines\' section.'], { placeholders: { password: 'Admin@123' } }).then((responses) => {
      // You can log the responses to see what the AI returned
      cy.log('AI Responses:', responses);
    });

Cypress Version

15.7.1

Debug Logs

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions