saleor-dashboard/cypress/e2e/configuration/siteSettings.js
Ewa Czerniak cea3ead44b
Saleor 7913 fix tests for vouchers (#2242)
* refactor createVoucher tests

* fix for tests in updateVoucher folder

* fix for updateVouchers, createVouchersWithLimits and siteSettings

* remove already declared variable
2022-08-18 15:14:29 +02:00

40 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.clearSessionData().loginUserViaRequest();
cy.fixture("addresses").then(({ usAddress, plAddress }) => {
address = usAddress;
updateShopAddress(plAddress);
});
});
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);
});
},
);
});