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

after:screenshot NodeEvent is missing specName #26598

Open
emilyrohrbough opened this issue Apr 26, 2023 · 3 comments
Open

after:screenshot NodeEvent is missing specName #26598

emilyrohrbough opened this issue Apr 26, 2023 · 3 comments
Labels
E2E Issue related to end-to-end testing good first issue Good for newcomers Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. type: bug type: regression A bug that didn't appear until a specific Cy version release v10.0.0 🐛 Issue present since 10.0.0

Comments

@emilyrohrbough
Copy link
Member

Example details object with missing specName value (empty string) logged to terminal from setupNodeEvents.

{
  testAttemptIndex: 0,
  size: 319081,
  takenAt: '2023-03-15T20:03:35.940Z',
  dimensions: { width: 1000, height: 4913 },
  multipart: true,
  pixelRatio: 1,
  specName: '',
  path: '/Users/marknoonan/Sites/examples/cy-validators-example/cypress/screenshots/the homepage -- renders error if a query param is passed.png',
  scaled: false,
  blackout: [],
  duration: 1713
}

test code:

    it('renders error if a query param is passed', () => {
        cy.visit('https://example.cypress.io')
        cy.screenshot()
    })

cypress.config.js

const { defineConfig } = require("cypress");

module.exports = defineConfig({
    'e2e': {
        setupNodeEvents(on) {
            on('after:screenshot', (details) => {
              console.log(details)
            })
    }
});

Originally posted by @marktnoonan in #24052 (comment)

@emilyrohrbough emilyrohrbough added type: bug type: regression A bug that didn't appear until a specific Cy version release v10.0.0 🐛 Issue present since 10.0.0 E2E Issue related to end-to-end testing Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. labels Apr 26, 2023
@emilyrohrbough emilyrohrbough changed the title Example details object with missing specName value (empty string) logged to terminal from setupNodeEvents. after:screenshot NodeEvent is missing specName Apr 26, 2023
@jennifer-shehane jennifer-shehane added good first issue Good for newcomers and removed help wanted labels Oct 4, 2023
@jlittlewood-scottlogic
Copy link

Is anyone already working on this issue or would I be able to take a look?

@emilyrohrbough
Copy link
Member Author

@jlittlewood-scottlogic Please feel free to pick this up!

@0v00
Copy link

0v00 commented Feb 28, 2024

ran some quick tests and this no longer seems to be an issue (at least in cypress 13.6.4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E2E Issue related to end-to-end testing good first issue Good for newcomers Triaged Issue has been routed to backlog. This is not a commitment to have it prioritized by the team. type: bug type: regression A bug that didn't appear until a specific Cy version release v10.0.0 🐛 Issue present since 10.0.0
Projects
None yet
Development

No branches or pull requests

4 participants