Skip to content

Commit cc816f4

Browse files
committed
fix: lookup integration test
1 parent 6728182 commit cc816f4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/post-deploy.test.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,13 @@ describe('Post-Deploy Tests', () => {
112112
const lookupRes = await fetch(lookupOptions.url, lookupOptions);
113113
assert.strictEqual(lookupRes.status, 301, 'Lookup request should succeed');
114114

115-
const lookupProduct = await lookupRes.json();
115+
const lookupLocation = lookupRes.headers.get('Location');
116+
assert.strictEqual(lookupLocation, `https://adobe-commerce-api-ci.adobeaem.workers.dev/dylandepass/commerce-boilerplate/catalog/main_website_store/default/product/${testProduct.sku}`);
117+
118+
const lookupRes2 = await fetch(lookupLocation, lookupOptions);
119+
assert.strictEqual(lookupRes2.status, 200, 'Lookup request should succeed');
120+
121+
const lookupProduct = await lookupRes2.json();
116122
assert.strictEqual(lookupProduct.sku, testProduct.sku);
117123

118124
const deleteOptions = {

0 commit comments

Comments
 (0)