Fix cypress test for enable gift card (#2214)

* All specs has unique data

* All specs has unique data
This commit is contained in:
Karolina Rakoczy 2022-08-16 12:49:22 +02:00 committed by GitHub
parent f058f4d01f
commit 2c57de07e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 17 additions and 21 deletions

View file

@ -26,7 +26,7 @@ import {
} from "../../../support/pages/catalog/giftCardPage";
describe("As a admin I want to use enabled gift card in checkout", () => {
const startsWith = "GiftCardsCheckout";
const startsWith = "ActivateGiftCards";
const productPrice = 50;
const shippingPrice = 50;
const email = "example@example.com";
@ -72,7 +72,7 @@ describe("As a admin I want to use enabled gift card in checkout", () => {
it(
"should be able to enable gift card and use it in checkout. TC: SALEOR_1006",
{ tags: ["@giftCard", "@allEnv"] },
{ tags: ["@giftCard", "@allEnv", "@stable"] },
() => {
const expectedGiftCardBalance =
giftCardData.amount - productPrice - shippingPrice;

View file

@ -16,7 +16,7 @@ import {
} from "../../../support/pages/catalog/giftCardPage";
describe("As an admin I want to create gift card", () => {
const startsWith = "GiftCards";
const startsWith = "CreateGCards";
const amount = 50;
const currency = "USD";

View file

@ -14,7 +14,7 @@ import { deleteGiftCardsWithTagStartsWith } from "../../../support/api/utils/cat
import { formatDate } from "../../../support/formatData/formatDate";
describe("As an admin I want to update gift card", () => {
const startsWith = "GiftCards";
const startsWith = "updateGCard";
before(() => {
cy.clearSessionData().loginUserViaRequest();

View file

@ -30,7 +30,7 @@ import {
} from "../../support/pages/warehousePage";
describe("Warehouses in checkout", () => {
const startsWith = `CyWarehouseCheckout`;
const startsWith = `clickAndCollect`;
let defaultChannel;
let usAddress;
let secondUsAddress;

View file

@ -11,7 +11,6 @@ import {
createTypeAttributeAndCategoryForProduct,
deleteProductsStartsWith,
} from "../../../support/api/utils/products/productsUtils";
import filterTests from "../../../support/filterTests";
import { enterAttributeAndChanegeIsFilterableInDashbord } from "../../../support/pages/attributesPage";
import {
enterProductListPage,

View file

@ -20,7 +20,6 @@ import { createWarehouse as createWarehouseViaApi } from "../../../support/api/r
import { deleteChannelsStartsWith } from "../../../support/api/utils/channelsUtils";
import { deleteShippingStartsWith } from "../../../support/api/utils/shippingUtils";
import { deleteWarehouseStartsWith } from "../../../support/api/utils/warehouseUtils";
import { returnValueDependsOnShopVersion } from "../../../support/formatData/dataDependingOnVersion";
import { createChannelByView } from "../../../support/pages/channelsPage";
describe("Channels", () => {

View file

@ -25,9 +25,9 @@ import {
} from "../../../support/api/utils/shippingUtils";
describe("Adyen payments", () => {
const startsWith = "CyChannelInDraftOrders-";
const startsWith = "Adyen";
const name = startsWith + faker.datatype.number();
const email = `CyChannelInDraftOrders@example.com`;
const email = `example@example.com`;
let address;
let defaultChannel;

View file

@ -17,7 +17,7 @@ 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 = "productType";
const startsWith = "attrProdType";
let category;
let channel;
let attribute;

View file

@ -19,7 +19,7 @@ import {
} from "../../../support/api/utils/products/productsUtils";
describe("As an admin I want to manage product types", () => {
const startsWith = "productType";
const startsWith = "delProdType";
let category;
let channel;
let attribute;

View file

@ -17,7 +17,7 @@ import { fillUpShippingZoneData } from "../../../support/pages/shippingMethodPag
import { enterAndSelectShippings } from "../../../support/pages/shippingZones";
describe("As a user I should be able to update and delete shipping zone", () => {
const startsWith = "EditShipping-";
const startsWith = "EditShippingZ-";
const name = `${startsWith}${faker.datatype.number()}`;
let defaultChannel;

View file

@ -23,7 +23,7 @@ import {
} from "../../../support/pages/shippingMethodPage";
describe("As a user I want to create shipping method with postal codes", () => {
const startsWith = "CyShippingMethods-";
const startsWith = "postalCodes-";
const name = `${startsWith}${faker.datatype.number()}`;
const price = 10;

View file

@ -23,7 +23,7 @@ import {
} from "../../../../support/pages/shippingMethodPage";
describe("As a staff user I want to manage shipping weights", () => {
const startsWith = "CyWeightRates-";
const startsWith = "weightsLimits";
const name = `${startsWith}${faker.datatype.number()}`;
const price = 10;

View file

@ -22,7 +22,7 @@ import {
} from "../../support/pages/discounts/salesPage";
xdescribe("Sales discounts for products", () => {
const startsWith = "CySales-";
const startsWith = "SalesProd-";
let productType;
let attribute;

View file

@ -16,7 +16,7 @@ import {
} from "../../support/pages/discounts/salesPage";
xdescribe("Sales discounts for variant", () => {
const startsWith = "CySales-";
const startsWith = "SalesVar-";
let productType;
let attribute;

View file

@ -17,7 +17,7 @@ import {
} from "../../../support/pages/discounts/vouchersPage";
describe("As an admin I want to create voucher", () => {
const startsWith = "CyVou-";
const startsWith = "CyVouLimit-";
const productPrice = 100;
const shippingPrice = 100;

View file

@ -16,7 +16,7 @@ import { formatDate, formatTime } from "../../../support/formatData/formatDate";
import { setVoucherDate } from "../../../support/pages/discounts/vouchersPage";
describe("As an admin I want to update vouchers", () => {
const startsWith = "CyVou-";
const startsWith = "UpdateVou-";
const productPrice = 100;
const shippingPrice = 100;

View file

@ -3,7 +3,6 @@
import { LOGIN_SELECTORS } from "../elements/account/login-selectors";
import { urlList } from "../fixtures/urlList";
import filterTests from "../support/filterTests";
describe("User authorization", () => {
beforeEach(() => {

View file

@ -29,7 +29,7 @@ import {
import { selectChannelInDetailsPages } from "../../../support/pages/channelsPage";
describe("Creating variants", () => {
const startsWith = "CyCreateVariants-";
const startsWith = "CreateProdSku";
const attributeValues = ["value1", "value2"];
let defaultChannel;

View file

@ -14,7 +14,6 @@ import { updateTranslationToCategory } from "../support/pages/translationsPage";
xdescribe("As an admin I want to manage translations", () => {
const startsWith = "TestTranslations";
const randomNumber = faker.datatype.number();
const name = `${startsWith}${randomNumber}`;
let category;