https://cypress.io logo
You were missing the args parameters https://docs....
# e2e-testing
s
You were missing the args parameters https://docs.cypress.io/api/commands/origin#Usage
Copy code
describe('helping', () => {
  const clients = {
    urls: [
      {
        siteurl: 'https://www.acme.com',
        subpage: '/updates/',
      },
      {
        siteurl: 'https://www.google.co.uk',
        subpage: '/search?q=cypress+io',
      },
    ],
  };

  it('tests', () => {
    clients.urls.forEach(client => {
      cy.origin(client.siteurl, { args: { client } }, ({ client }) => {
        cy.visit(client.subpage);
      });
    })
  });
});