Hi All,
Can anyone help me with an issue i am having please?
After i have hit an endpoint, the response body will render some HTML.
Inside the Test tab i am running
pm.test("Confirm Expected Item Details are on Page : X", function(){
pm.expect(pm.response.text()).to.include("itemA");
});
However, i wanted to do an OR like statement, and item can change at different points so could be itemA, itemB or itemC.
So i did some googling, and have still come up short. Iβve tried:
pm.test("Confirm Expected Item Details are on Page : X", function(){
pm.expect(pm.response.text()).to.include.oneOf(['itemA','itemB']);
});
pm.test("Confirm Expected Item Details are on Page : X", function(){
pm.expect(pm.response.text()).to.include("itemA") || pm.response.text()).to.include("itemb");
});
None of these work. What am i doing wrong?