Skip to content

Some Secondary Origin Logs are Getting Too Many Screenshots #28609

Description

@emilyrohrbough

Current behavior

Logs that should create one snapshot when the log is created, like cy.clock() or expect(something).to.be(something) is incorrectly creating two logs when the logs originate from a secondary origin.

See some examples:

Primary Origin Secondary Origin
Screen Shot 2023-12-28 at 2 57 45 PM Screen Shot 2023-12-28 at 2 57 05 PM
Screen Shot 2023-12-28 at 2 58 08 PM Screen Shot 2023-12-28 at 2 58 51 PM

Desired behavior

Secondary origin logs should log the same attributes as a primary origin log.

Test code to reproduce

it('primary origin log', () => {
   cy.clock().tick()
   .then(() => {
        expect(true).to.be.true 
    })
})

it('secondary origin', () => {
   cy.origin('secondary', () => {
      cy.visit('secondary')
  })

   cy.clock().tick()
   .then(() => {
        expect(true).to.be.true 
    })
})

Cypress Version

13.6.2

Node version

16.16.0

Operating System

MacOS 12.5.1

Debug Logs

No response

Other

No response

Metadata

Metadata

Labels

topic: cy.originProblems or enhancements related to cy.origin commandtype: bug

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions