Skip to content

Commit

Permalink
e2e tests - remove shop info request (#4358)
Browse files Browse the repository at this point in the history
* remove shop info request

* remove shop info request function

* update changeset
  • Loading branch information
wojteknowacki authored Oct 20, 2023
1 parent 282c09b commit dcb3ebb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 35 deletions.
5 changes: 5 additions & 0 deletions .changeset/proud-shirts-hammer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": minor
---

Removed unused get info request
9 changes: 1 addition & 8 deletions cypress/e2e/configuration/siteSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@

import { BUTTON_SELECTORS } from "../../elements/shared/button-selectors";
import { urlList } from "../../fixtures/urlList";
import {
getShopInfo,
updateShopAddress,
} from "../../support/api/requests/ShopSettings";
import { updateShopAddress } from "../../support/api/requests/ShopSettings";

describe("Tests for site settings", () => {
let address;
Expand All @@ -32,10 +29,6 @@ describe("Tests for site settings", () => {
.get(BUTTON_SELECTORS.confirm)
.click()
.confirmationMessageShouldDisappear();
getShopInfo().then(({ companyAddress }) => {
expect(companyAddress.companyName).to.eq(address.companyName);
cy.expectCorrectBasicAddress(companyAddress, address);
});
},
);
});
27 changes: 0 additions & 27 deletions cypress/support/api/requests/ShopSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,30 +54,3 @@ export function updateShopAddress(address) {
}`;
return cy.sendRequestWithQuery(mutation);
}

export function getShopInfo() {
const query = `query{
shop{
name
version
domain{
host
}
description
companyAddress{
companyName
streetAddress1
streetAddress2
city
cityArea
postalCode
country{
code
}
countryArea
phone
}
}
}`;
return cy.sendRequestWithQuery(query).its("body.data.shop");
}

0 comments on commit dcb3ebb

Please sign in to comment.