question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DOM snapshots not displayed due to ad displayed.

See original GitHub issue
  • Operating System: Windows 7
  • Cypress Version: 2.1.0
  • Browser Version: Chrome 64

Is this a Feature or Bug?

Bug

Current behavior:

When I run my tests, at the end of the run, in the app preview section, where the DOM snapshots should be displayed, I just get an ad, as can be viewed in the attached screenshot. This ad is part of the webpage I am testing, but it is not displayed if I execute manually the same commands in the original website. This prevents me from viewing any DOM snapshot although all the test pass.

This issue doe not happen every single time, but occasionally.

Desired behavior:

Ad is not displyed and I can view the DOM snapshots of the run.

How to reproduce:

Run the code added to this issue. This issue happens when visiting the webpage: www.wordreference.com

Test code:

describe('A trial', function() {
    it ('Get any element by Cypress Selector Playground', function() {
    cy.visit('http://www.wordreference.com/')

    cy.get('#fSelect').select('English-German')

    cy.get('#si')
    .type('power')

    cy.contains('powerful').click() 

    cy.title().should('include', 'powerful')

})
})

Additional Info (images, stack traces, etc)

error

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
RandallKentcommented, Mar 2, 2018

@gpenafib - I’d recommend checking out blacklistHosts configuration option in the cypress.json to prevent the ad block from rendering.

0reactions
gpenafibcommented, Mar 3, 2018

I followed your last comment and it seems to be fixed now, many thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Problems getting data from Firestore to display in DOM
I'm creating a project with the use of Firebase and I'm having some issues with getting the data inside of my database to...
Read more >
Cypress DOM Snapshot To Static HTML File - YouTube
In this video, I show how to take DOM snapshots you can create using Cypress utility code, clean them up, and save them...
Read more >
Debugging SDKs - Percy Docs
If your snapshots are only of the visible viewport it likely means your page has CSS that is hiding the content overflow.
Read more >
What's wrong with snapshot tests. Since snapshot ... - Medium
Snapshots only verify that the component renders (meaning its HTML, not how it looks in the browser) the same thing, which is rarely...
Read more >
Cypress App
The flake indicator will display if any tests in the given spec have been ... the DOM of our application under test at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found