saleor-dashboard/cypress/e2e/configuration/siteSettings.js
wojteknowacki 1bd4aeadf1
tests - removing redundant session cleanup, navigator confirmation added (#4023)
* set notifiedAboutNavigator: true in local storage when logging in
2023-07-28 09:48:41 +02:00

41 lines
1.1 KiB
JavaScript

/// <reference types="cypress"/>
/// <reference types="../../support"/>
import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors";
import { urlList } from "../../fixtures/urlList";
import {
getShopInfo,
updateShopAddress,
} from "../../support/api/requests/ShopSettings";
describe("Tests for site settings", () => {
let address;
before(() => {
cy.loginUserViaRequest();
cy.fixture("addresses").then(({ usAddress, plAddress }) => {
address = usAddress;
updateShopAddress(plAddress);
cy.checkIfDataAreNotNull(address);
});
});
it(
"should change store address",
{ tags: ["@siteSettings", "@allEnv", "@stable"] },
() => {
cy.clearSessionData()
.loginUserViaRequest()
.visit(urlList.siteSettings)
.fillUpBasicAddress(address)
.get(BUTTON_SELECTORS.confirm)
.click()
.confirmationMessageShouldDisappear();
getShopInfo().then(({ companyAddress }) => {
expect(companyAddress.companyName).to.eq(address.companyName);
cy.expectCorrectBasicAddress(companyAddress, address);
});
},
);
});