Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cypress] Allow multiple elements in ignoreRegions #145

Merged
merged 2 commits into from
Oct 1, 2024

Conversation

omacranger
Copy link
Member

Description

Iterates over passed cypress chainables and yields the results in an array.

Example of multiple ignorables:

cy.sauceVisualCheck('Inventory Page', {
  captureDom: true,
  ignoredRegions: [
    cy.get('.inventory_item_price'),
    cy.get('.btn_inventory'),
    cy.get('.inventory_item_name'),
    cy.get('.bm-burger-button'),
    cy.get('img.inventory_item_img'),
    {
      x: 50,
      y: 50,
      width: 100,
      height: 100,
    }
  ],
});

Results in UI:

image

Types of Changes

What types of changes does your code introduce? Keep the ones that apply:

  • Bug fix (non-breaking change which fixes an issue)

@omacranger omacranger force-pushed the bugfix/cypress-ignore-regions branch from bb81ab0 to 1f267f4 Compare September 30, 2024 20:47
@omacranger omacranger merged commit 4d79c86 into main Oct 1, 2024
2 checks passed
@omacranger omacranger deleted the bugfix/cypress-ignore-regions branch October 1, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants