Skip to content

Commit

Permalink
added script to obtain inventory details (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
akashbalhara committed May 3, 2023
2 parents 5e75049 + b426237 commit 2ccf92a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/inventory.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// @ts-check
import {test, expect} from '@playwright/test'

test("Get inventory details", async({request, baseURL}) => {

const response = await request.get(`${baseURL}store/inventory`);

// getting and saving the inventory details
const inventory = await response.json();

// assert that the api is working as expected
expect(response.ok()).toBeTruthy();
expect(response.status()).toBe(200);

});

0 comments on commit 2ccf92a

Please sign in to comment.