Hi guys Does anyone know how to unblock cookies in cypress . In my github Microsoft authentication page when i login by giving the below code It shows that Your browser is currently set to block cookies. Or any other solution to access the page would be helpful. Prefferably not with api requests .
describe("gitLogin with microsoft SSO", () => {
it("gitLogin with microsoft", () => {
cy.visit("https://github.com/login");
cy.get("[name='login']").type("user@web.net");
cy.get("[name='password']").type("password123");
cy.get("[name='commit']").click();
cy.get("[data-target='webauthn-get.button']").click();
cy.get("[class='dropdown-caret']").last().click();
cy.wait(3000);
cy.get("span:contains(projectName)").last().click();
cy.get("[type='submit']").click();
cy.origin("https://login.microsoftonline.com/", {
args: {
username: "user@web.net",
password: "password123",
ssoUsernameBox: "[name='loginfmt']",
nextButton: "[id='idSIButton9']",
ssoPasswordBox: "[name='passwd']",
},
},
({ username, password, ssoUsernameBox, ssoPasswordBox, nextButton }) => {
cy.log(username);
const uName = username;
cy.get(ssoUsernameBox).clear().type(uName);
cy.get(nextButton).click();
cy.wait(3000);
cy.get(ssoPasswordBox).type(password, { log: false }).should(el$ => {
if (el$.val() !== password) {
throw new Error('Different value of typed password');
}
});
cy.get(nextButton).click();
});
});
});