Skip to content
This repository has been archived by the owner on Feb 4, 2019. It is now read-only.

Commit

Permalink
core-1652 debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
stereomon committed Aug 3, 2017
1 parent 0185796 commit f3fc2a2
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,26 @@ public function testCheckoutItemWithAvailability(AvailabilityPresentationTester
$zedTester = $i->haveFriend('zedTester', ZedAvailabilityPresentationTester::class);

$zedTester->does(function (ZedAvailabilityPresentationTester $i) {
$i->amZed();
$i->amLoggedInUser();

$idProductFujitsu = 118;

$i->amOnPage(sprintf(AvailabilityViewPage::VIEW_PRODUCT_AVAILABILITY_URL, $idProductFujitsu));

$i->waitForElementVisible('//*[@id="page-wrapper"]/div[3]/div[2]/div/div/div[2]/div/div[5]/p[2]');

$reservedProductsBefore = $i->grabTextFrom('//*[@id="page-wrapper"]/div[3]/div[2]/div/div/div[2]/div/div[5]/p[2]');

codecept_debug('Reserved Products before: ' . $reservedProductsBefore);

$i->amOnPage(OrderListPage::ORDER_LIST_URL);
$i->wait(2);

$idSalesOrder = $i->grabTextFrom('//*[@class="dataTables_scrollBody"]/table/tbody/tr[1]/td[1]');

codecept_debug('ID Sales order: ' . $idSalesOrder);

$i->amOnPage(sprintf(OrderDetailPage::ORDER_DETAIL_PAGE_URL, $idSalesOrder));

$i->click(sprintf(OrderDetailPage::OMS_EVENT_TRIGGER_XPATH, 'pay'));
Expand All @@ -72,7 +81,6 @@ public function testCheckoutItemWithAvailability(AvailabilityPresentationTester
$reservedProductsAfter = $i->grabTextFrom('//*[@id="page-wrapper"]/div[3]/div[2]/div/div/div[2]/div/div[5]/p[2]');

$i->assertEquals($reservedProductsAfter, $reservedProductsBefore - 1); //Reserved item returned back

});

$zedTester->leave();
Expand Down

0 comments on commit f3fc2a2

Please sign in to comment.