Good morning, I have a UI question -- I'm not sure...
# help
m
Good morning, I have a UI question -- I'm not sure what Cypress is trying to tell me. I'm running a test where I'm stubbing out a graphql endpoint, and my test seems to render okay. But it always hangs here at the end. What is this blue referring to? At first I thought the GraphQL request doesn't return and it's waiting, but I have
cy.wait('@GraphQL')
at the beginning of the test, and it moves past that just fine. It stays here forever and never moves onto the next test.
Here's the code:
Copy code
beforeEach(() => {
  cy.intercept('POST', '/v1/graphql', (req) => {
    if (req.body.operationName === 'UniqueListings') {
      req.reply({ fixture: 'blahblah-UniqueListings.json' });
    } else if (req.body.operationName === 'ProductForUid') {
      req.reply({ fixture: 'blahblah-ProductForUid.json' });
    }
  }).as('GraphQL');
});

afterEach(() => {
  cy.eyesClose();
});
and
Copy code
it('renders the womens collection', () => {
  cy.visit('http://localhost:3000/blahblah/collections/womens');
  cy.wait('@GraphQL', { timeout: 10000 });
  cy.eyesOpen({
    appName: 'Blahblah',
    testName: 'Womens Collection',
    browser: { width: 800, height: 600, displayName: 'Medium Desktop' },
    matchTimeout: 10000,
  });
  cy.get('img[alt="logo"]');

  cy.wait(1000);
  cy.eyesCheckWindow('Womens Collection');
});
I've integrated applitools for screenshot testing, which is what cy.eyes* is
I've integrated applitools for screenshot testing, which is what
cy.eyes*
is
f
If it had to guess, based on your code, neither the else condition if the else if condition are being met and therefore no response is being sent. So the request never resolves.