Skip to content

cy.setCookie is broken with chrome 77 #5142

Description

@bryant-slack

Current behavior:

image

Desired behavior:

image

Steps to reproduce: (app code and test code)

run the following test: it will fail:

/// <reference types="Cypress" />

context('Window', () => {
  beforeEach(() => {
    cy.visit('http://google.com')
  })

  it('cy.window() - can set cookies', () => {
    // https://on.cypress.io/window
    cy.setCookie('cookieKey', 'angelfoobar', {
  		domain: '.google.com',
  		path: '/',
  		httpOnly: true,
  		secure: true,
  	});
  })

})

If you remove the domain it works:

/// <reference types="Cypress" />

context('Window', () => {
  beforeEach(() => {
    cy.visit('http://google.com')
  })

  it('cy.window() - can set cookies', () => {
    // https://on.cypress.io/window
    cy.setCookie('cookieKey', 'angelfoobar', {
  		path: '/',
  		httpOnly: true,
  		secure: true,
  	});
  })

})

NOTE: this works fine on chrome 76. it broke with chrome 77 upgrade.

Versions

Max OS 10.14.6
Chrome 77
Cypress 3.4.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions