From cb93dbea2ad0243e848bea15a003ad6089e151a6 Mon Sep 17 00:00:00 2001 From: Ewa Czerniak Date: Thu, 20 Oct 2022 07:36:49 +0200 Subject: [PATCH] Remove unused imports and variables (#2420) --- cypress/e2e/configuration/permissions.js | 1 - .../productTypes/attributesInProduductTypes.js | 6 ------ cypress/e2e/customerRegistration.js | 1 - cypress/e2e/discounts/sales/updateSales.js | 5 +---- .../products/productsWithoutSku/createProductWithoutSku.js | 5 +---- cypress/support/pages/catalog/collectionsPage.js | 1 - cypress/support/pages/catalog/seoComponent.js | 1 + 7 files changed, 3 insertions(+), 17 deletions(-) diff --git a/cypress/e2e/configuration/permissions.js b/cypress/e2e/configuration/permissions.js index a928ac34e..d0093999a 100644 --- a/cypress/e2e/configuration/permissions.js +++ b/cypress/e2e/configuration/permissions.js @@ -19,7 +19,6 @@ import { } from "../../support/api/requests/PermissionGroup.js"; import { getStaffMembersStartsWith } from "../../support/api/requests/StaffMembers"; import { deletePermissionGroupsStartsWith } from "../../support/api/utils/permissionGroupUtils.js"; -import filterTests from "../../support/filterTests.js"; describe("Permissions groups", () => { const startsWith = "CyPermissions-"; diff --git a/cypress/e2e/configuration/productTypes/attributesInProduductTypes.js b/cypress/e2e/configuration/productTypes/attributesInProduductTypes.js index 0c199cef3..fef5f7fa3 100644 --- a/cypress/e2e/configuration/productTypes/attributesInProduductTypes.js +++ b/cypress/e2e/configuration/productTypes/attributesInProduductTypes.js @@ -7,27 +7,21 @@ import { PRODUCT_TYPE_DETAILS } from "../../../elements/productTypes/productType import { BUTTON_SELECTORS } from "../../../elements/shared/button-selectors"; import { productTypeDetailsUrl } from "../../../fixtures/urlList"; import { createAttribute } from "../../../support/api/requests/Attribute"; -import { createCategory } from "../../../support/api/requests/Category"; import { assignAttribute, createTypeProduct, getProductType, } from "../../../support/api/requests/ProductType"; -import { getDefaultChannel } from "../../../support/api/utils/channelsUtils"; import { deleteProductsStartsWith } from "../../../support/api/utils/products/productsUtils"; describe("As an admin I want to manage attributes in product types", () => { const startsWith = "attrProdType"; - let category; - let channel; let attribute; before(() => { cy.clearSessionData().loginUserViaRequest(); deleteProductsStartsWith(startsWith); createAttribute({ name: startsWith }).then(resp => (attribute = resp)); - createCategory({ name: startsWith }).then(resp => (category = resp)); - getDefaultChannel().then(resp => (channel = resp)); }); beforeEach(() => { diff --git a/cypress/e2e/customerRegistration.js b/cypress/e2e/customerRegistration.js index 8ddd1bbac..b24c61279 100644 --- a/cypress/e2e/customerRegistration.js +++ b/cypress/e2e/customerRegistration.js @@ -13,7 +13,6 @@ import { } from "../support/api/requests/Customer"; import { getDefaultChannel } from "../support/api/utils/channelsUtils"; import { getMailActivationLinkForUser } from "../support/api/utils/users"; -import filterTests from "../support/filterTests"; describe("Tests for customer registration", () => { const startsWith = "Registration"; diff --git a/cypress/e2e/discounts/sales/updateSales.js b/cypress/e2e/discounts/sales/updateSales.js index ce3ec0251..591d8f276 100644 --- a/cypress/e2e/discounts/sales/updateSales.js +++ b/cypress/e2e/discounts/sales/updateSales.js @@ -7,10 +7,7 @@ import { SALES_SELECTORS } from "../../../elements/discounts/sales"; import { BUTTON_SELECTORS } from "../../../elements/shared/button-selectors"; import { SHARED_ELEMENTS } from "../../../elements/shared/sharedElements"; import { saleDetailsUrl } from "../../../fixtures/urlList"; -import { - getSales, - updateSale, -} from "../../../support/api/requests/Discounts/Sales"; +import { updateSale } from "../../../support/api/requests/Discounts/Sales"; import { getVariant } from "../../../support/api/requests/Product"; import { getDefaultChannel } from "../../../support/api/utils/channelsUtils"; import { diff --git a/cypress/e2e/products/productsWithoutSku/createProductWithoutSku.js b/cypress/e2e/products/productsWithoutSku/createProductWithoutSku.js index cf611e105..e89c0f829 100644 --- a/cypress/e2e/products/productsWithoutSku/createProductWithoutSku.js +++ b/cypress/e2e/products/productsWithoutSku/createProductWithoutSku.js @@ -22,10 +22,7 @@ import { createWaitingForCaptureOrder } from "../../../support/api/utils/ordersU import * as productUtils from "../../../support/api/utils/products/productsUtils"; import * as shippingUtils from "../../../support/api/utils/shippingUtils"; import { getProductVariants } from "../../../support/api/utils/storeFront/storeFrontProductUtils"; -import { - createFirstVariant, - createVariant, -} from "../../../support/pages/catalog/products/VariantsPage"; +import { createVariant } from "../../../support/pages/catalog/products/VariantsPage"; import { selectChannelInDetailsPages } from "../../../support/pages/channelsPage"; describe("Creating variants", () => { diff --git a/cypress/support/pages/catalog/collectionsPage.js b/cypress/support/pages/catalog/collectionsPage.js index a0efb05b5..698c08aad 100644 --- a/cypress/support/pages/catalog/collectionsPage.js +++ b/cypress/support/pages/catalog/collectionsPage.js @@ -3,7 +3,6 @@ import { AVAILABLE_CHANNELS_FORM } from "../../../elements/channels/available-ch import { SELECT_CHANNELS_TO_ASSIGN } from "../../../elements/channels/select-channels-to-assign"; import { ASSIGN_ELEMENTS_SELECTORS } from "../../../elements/shared/assign-elements-selectors"; import { BUTTON_SELECTORS } from "../../../elements/shared/button-selectors"; -import { SHARED_ELEMENTS } from "../../../elements/shared/sharedElements"; export function createCollection(collectionName, isPublished, channel) { const publishedSelector = isPublished diff --git a/cypress/support/pages/catalog/seoComponent.js b/cypress/support/pages/catalog/seoComponent.js index e71a156c8..672cce8de 100644 --- a/cypress/support/pages/catalog/seoComponent.js +++ b/cypress/support/pages/catalog/seoComponent.js @@ -1,4 +1,5 @@ import { SEO_FORM } from "../../../elements/shared/seo/seo-form-selectors"; + export function editSeoSettings({ slug, title, description }) { cy.get(SEO_FORM.editSeoSettings) .click()