Skip to content

Commit

Permalink
e2e tests maintenance (#4500)
Browse files Browse the repository at this point in the history
* removed duplicated cypress tests, method name changed

* added missing import to warehouse tests

* Create thick-cheetahs-shave.md

* Trigger Build
  • Loading branch information
wojteknowacki committed Nov 28, 2023
1 parent d4b6ae5 commit c23e8bc
Show file tree
Hide file tree
Showing 15 changed files with 13 additions and 861 deletions.
5 changes: 5 additions & 0 deletions .changeset/thick-cheetahs-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"saleor-dashboard": minor
---

e2e tests maintenance - removed duplicated cypress tests since we have coverage in playwright
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import {
describe("As an admin I want to create product attribute", () => {
const startsWith = "AttrCreate" + Date.now();
const attributesTypes = [
{ type: "DROPDOWN", testCase: "SALEOR_0501" }, // migration in progress - to delete when done
{ type: "MULTISELECT", testCase: "SALEOR_0502" },
{ type: "RICH_TEXT", testCase: "SALEOR_0504" },
{ type: "BOOLEAN", testCase: "SALEOR_0505" },
Expand Down
40 changes: 0 additions & 40 deletions cypress/e2e/configuration/productTypes/createProductType.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,6 @@ describe("As an admin I want to create product types", () => {
.expectSkeletonIsVisible();
});

it(
"should be able to create product type without shipping required. TC: SALEOR_1501 - migration in progress - to delete when done",
{
tags: ["@productType", "@allEnv", "@stable", "@oldRelease", "@critical"],
},
() => {
const name = `${startsWith}${faker.datatype.number()}`;

createProductType({ name })
.then(productType => {
getProductType(productType.id);
})
.then(productType => {
expect(productType.name).to.be.eq(name);
expect(productType.isShippingRequired).to.be.false;
expect(productType.kind).to.be.eq("NORMAL");
});
},
);

it(
"should be able to create product type with shipping required. TC: SALEOR_1502 - migration in progress - to delete when done",
{ tags: ["@productType", "@allEnv", "@stable", "@critical"] },
() => {
const name = `${startsWith}${faker.datatype.number()}`;
const shippingWeight = 10;

createProductType({ name, shippingWeight })
.then(productType => {
getProductType(productType.id);
})
.then(productType => {
expect(productType.name).to.be.eq(name);
expect(productType.isShippingRequired).to.be.true;
expect(productType.weight.value).to.eq(shippingWeight);
expect(productType.kind).to.be.eq("NORMAL");
});
},
);

it(
"should be able to create product type with gift card kind. TC: SALEOR_1510 - migration in progress - to delete when done",
{ tags: ["@productType", "@allEnv", "@stable", "@critical"] },
Expand Down
50 changes: 0 additions & 50 deletions cypress/e2e/configuration/shippingMethods/createShippingMethod.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,56 +114,6 @@ describe("As a staff user I want to create shipping zone and rate", () => {
cy.loginUserViaRequest();
});

it(
"should be able to create price based shipping method and assign it to checkout. TC: SALEOR_0803 should not be migrated to playwright",
{ tags: ["@shipping", "@allEnv", "@stable", "@oldRelease", "@critical"] },
() => {
const shippingName = `${startsWith}${faker.datatype.number()}`;
cy.clearSessionData().loginUserViaRequest(
"auth",
ONE_PERMISSION_USERS.shipping,
);
cy.visit(urlList.shippingMethods);
createShippingZone(
shippingName,
warehouse.name,
address.countryFullName,
defaultChannel.name,
);
createShippingRate({
rateName: shippingName,
price,
priceLimits: { min: price, max: 100 },
rateOption: rateOptions.PRICE_OPTION,
deliveryTime,
});
createWaitingForCaptureOrder({
channelSlug: defaultChannel.slug,
email: "test@example.com",
variantsList,
address,
shippingMethodName: shippingName,
})
.then(({ order }) => {
expect(order.id).to.be.ok;
createCheckout({
channelSlug: defaultChannel.slug,
email: "test@example.com",
variantsList: secondVariantsList,
address,
auth: "token",
});
})
.then(({ checkout }) => {
const isShippingAvailable = isShippingAvailableInCheckout(
checkout,
shippingName,
);
expect(isShippingAvailable).to.be.false;
});
},
);

it(
"should be able to create weight based shipping method. TC: SALEOR_0804",
{ tags: ["@shipping", "@allEnv", "@stable"] },
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/configuration/warehouses/warehouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ describe("As an admin I want to manage warehouses", () => {
});

it(
"should be able to create warehouse. TC: SALEOR_1101 - migration in progress - to delete when done",
{ tags: ["@warehouse", "@allEnv", "@stable", "@oldRelease", "@critical"] },
"should be able to create warehouse. TC: SALEOR_1101",
{ tags: ["@warehouse", "@allEnv", "@stable", "@oldRelease"] },
() => {
const name = `${startsWith}${faker.datatype.number()}`;
cy.visit(urlList.warehouses)
Expand Down
30 changes: 0 additions & 30 deletions cypress/e2e/homePage/homePageAnalitics.js

This file was deleted.

Loading

0 comments on commit c23e8bc

Please sign in to comment.