Skip to content

Commit 84a0320

Browse files
committed
Revert "fix: encode fix for integration tests"
This reverts commit e724029. Signed-off-by: Sujith <[email protected]>
1 parent a7f8edc commit 84a0320

File tree

17 files changed

+51
-39
lines changed

17 files changed

+51
-39
lines changed

apps/reaction/tests/integration/api/mutations/archiveProducts/archiveProducts.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jest.setTimeout(300000);
99

1010
const internalShopId = "123";
1111
const internalProductId = "999";
12-
const opaqueShopId = "123";
13-
const opaqueProductId = "999";
12+
const opaqueProductId = "cmVhY3Rpb24vcHJvZHVjdDo5OTk="; // reaction/product:999
13+
const opaqueShopId = "cmVhY3Rpb24vc2hvcDoxMjM="; // reaction/shop:123
1414
const internalVariantIds = ["875", "874", "925"];
1515

1616
const shopName = "Test Shop";

apps/reaction/tests/integration/api/mutations/cloneProductVariants/cloneProductVariants.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jest.setTimeout(300000);
99

1010
const internalShopId = "123";
1111
const internalProductId = "999";
12-
const opaqueShopId = "123";
12+
const opaqueShopId = "cmVhY3Rpb24vc2hvcDoxMjM="; // reaction/shop:123
1313
const internalVariantIds = ["875", "874", "925"];
14-
const opaqueVariantIdOne = "875";
14+
const opaqueVariantIdOne = "cmVhY3Rpb24vcHJvZHVjdDo4NzU="; // reaction/product:875
1515

1616
const shopName = "Test Shop";
1717

apps/reaction/tests/integration/api/mutations/cloneProducts/cloneProducts.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jest.setTimeout(300000);
99

1010
const internalShopId = "123";
1111
const internalProductId = "999";
12-
const opaqueShopId = "123";
13-
const opaqueProductId = "999";
12+
const opaqueProductId = "cmVhY3Rpb24vcHJvZHVjdDo5OTk="; // reaction/product:999
13+
const opaqueShopId = "cmVhY3Rpb24vc2hvcDoxMjM="; // reaction/shop:123
1414
const internalVariantIds = ["875", "874", "925"];
1515

1616
const shopName = "Test Shop";

apps/reaction/tests/integration/api/mutations/createProduct/createProduct.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const CreateProductMutation = importAsString("./createProduct.graphql");
88
jest.setTimeout(300000);
99

1010
const internalShopId = "123";
11-
const opaqueShopId = "123";
11+
const opaqueShopId = "cmVhY3Rpb24vc2hvcDoxMjM="; // reaction/shop:123
1212

1313
const shopName = "Test Shop";
1414

@@ -159,7 +159,7 @@ test("expect a product to be created with all product input", async () => {
159159

160160
test("non-opaque _id can be provided optionally", async () => {
161161
const id = "CUSTOM_ID";
162-
const encodedId = "CUSTOM_ID";
162+
const encodedId = "cmVhY3Rpb24vcHJvZHVjdDpDVVNUT01fSUQ="; // reaction/product:CUSTOM_ID
163163

164164
let result;
165165
try {

apps/reaction/tests/integration/api/mutations/createProductVariant/createProductVariant.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jest.setTimeout(300000);
99

1010
const internalShopId = "123";
1111
const internalProductId = "999";
12-
const opaqueShopId = "123";
13-
const opaqueProductId = "999";
12+
const opaqueProductId = "cmVhY3Rpb24vcHJvZHVjdDo5OTk="; // reaction/product:999
13+
const opaqueShopId = "cmVhY3Rpb24vc2hvcDoxMjM="; // reaction/shop:123
1414

1515
const shopName = "Test Shop";
1616

@@ -144,7 +144,7 @@ test("expect a variant to be created with all product variant input", async () =
144144

145145
test("non-opaque _id can be provided optionally", async () => {
146146
const id = "CUSTOM_VARIANT_ID";
147-
const encodedId = "CUSTOM_VARIANT_ID";
147+
const encodedId = "cmVhY3Rpb24vcHJvZHVjdDpDVVNUT01fVkFSSUFOVF9JRA=="; // reaction/product:CUSTOM_VARIANT_ID
148148

149149
let result;
150150
try {

apps/reaction/tests/integration/api/mutations/publishProductsToCatalog/publishProductsToCatalog.test.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,15 @@ jest.setTimeout(300000);
99

1010
const internalShopId = "123";
1111
const internalProductId = "999";
12-
const opaqueProductId = "999";
12+
const opaqueProductId = "cmVhY3Rpb24vcHJvZHVjdDo5OTk="; // reaction/product:999
1313
const internalTagIds = ["923", "924"];
1414
const internalVariantIds = ["875", "874", "925"];
1515

16-
const opaqueCatalogVariantIds = ["875", "874", "925"];
16+
const opaqueCatalogVariantIds = [
17+
"cmVhY3Rpb24vY2F0YWxvZ1Byb2R1Y3RWYXJpYW50Ojg3NQ==",
18+
"cmVhY3Rpb24vY2F0YWxvZ1Byb2R1Y3RWYXJpYW50Ojg3NA==",
19+
"cmVhY3Rpb24vY2F0YWxvZ1Byb2R1Y3RWYXJpYW50OjkyNQ=="
20+
]; // reaction/catalogProductVariant
1721

1822
const shopName = "Test Shop";
1923

apps/reaction/tests/integration/api/mutations/surcharges/createSurcharge.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const CreateSurchargeMutation = importAsString("./CreateSurchargeMutation.graphq
88
jest.setTimeout(300000);
99

1010
const internalShopId = "123";
11-
const opaqueShopId = "123";
11+
const opaqueShopId = "cmVhY3Rpb24vc2hvcDoxMjM="; // reaction/shop:123
1212
const shopName = "Test Shop";
1313
const surchargeAttributes = [
1414
{ property: "vendor", value: "reaction", propertyType: "string", operator: "eq" },

apps/reaction/tests/integration/api/mutations/surcharges/deleteSurcharge.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const DeleteSurchargeMutation = importAsString("./DeleteSurchargeMutation.graphq
99
jest.setTimeout(300000);
1010

1111
const internalShopId = "123";
12-
const opaqueShopId = "123";
12+
const opaqueShopId = "cmVhY3Rpb24vc2hvcDoxMjM="; // reaction/shop:123
1313
const shopName = "Test Shop";
1414
const surchargeAttributes = [
1515
{ property: "vendor", value: "reaction", propertyType: "string", operator: "eq" },

apps/reaction/tests/integration/api/mutations/surcharges/updateSurcharge.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const UpdateSurchargeMutation = importAsString("./UpdateSurchargeMutation.graphq
99
jest.setTimeout(300000);
1010

1111
const internalShopId = "123";
12-
const opaqueShopId = "123";
12+
const opaqueShopId = "cmVhY3Rpb24vc2hvcDoxMjM="; // reaction/shop:123
1313
const shopName = "Test Shop";
1414
const surchargeAttributes = [
1515
{ property: "vendor", value: "reaction", propertyType: "string", operator: "eq" },

apps/reaction/tests/integration/api/queries/account/account.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ const AccountFullQuery = importAsString("./AccountFullQuery.graphql");
77
jest.setTimeout(300000);
88

99
const internalNonAdminAccountId = "123";
10-
const opaqueNonAdminAccountId = "123";
10+
const opaqueNonAdminAccountId = "cmVhY3Rpb24vYWNjb3VudDoxMjM=";
1111
const internalAdminAccountId = "456";
1212
const internalOtherAccountId = "789";
13-
const opaqueOtherAccountId = "789";
13+
const opaqueOtherAccountId = "cmVhY3Rpb24vYWNjb3VudDo3ODk=";
1414
const internalGroupId = "mockCustomerGroup";
15-
const opaqueGroupId = "mockCustomerGroup";
15+
const opaqueGroupId = "cmVhY3Rpb24vZ3JvdXA6bW9ja0N1c3RvbWVyR3JvdXA=";
1616

1717
const mockCustomerGroup = {
1818
_id: internalGroupId,

0 commit comments

Comments
 (0)