Skip to content

Instantly share code, notes, and snippets.

@leopic
Last active December 10, 2015 21:48
Show Gist options
  • Save leopic/4497712 to your computer and use it in GitHub Desktop.
Save leopic/4497712 to your computer and use it in GitHub Desktop.
diff --git a/modules/Store/j2ee-apps/Store/Store.war/catalog/include/productBuyBox.jsp b/modules/Store/j2ee-apps/Store/Store.war/catalog/include/productBuyBox.jsp
index 51e60f6..ac53bf5 100644
--- a/modules/Store/j2ee-apps/Store/Store.war/catalog/include/productBuyBox.jsp
+++ b/modules/Store/j2ee-apps/Store/Store.war/catalog/include/productBuyBox.jsp
@@ -135,7 +135,7 @@
<dsp:param name="productPriceInfo" param="productPriceInfo" />
</dsp:include>
</c:if>
- <p><bc:message key="label.toos.item.availability" /></p>
+ <p class="qa-item-availability"><bc:message key="label.toos.item.availability" /></p>
<%-- Don't show this part of the breadcrumb for GWP (Gift with product) items --%>
<dsp:droplet name="IsEmpty">
<dsp:param name="value" param="product.parentCategory" />
diff --git a/qa-automation-tests/src/main/java/com/backcountry/component/retail/ProductDetailsPage.java b/qa-automation-tests/src/main/java/com/backcountry/component/retail/ProductDetailsPage.java
index 1dde242..6116175 100644
--- a/qa-automation-tests/src/main/java/com/backcountry/component/retail/ProductDetailsPage.java
+++ b/qa-automation-tests/src/main/java/com/backcountry/component/retail/ProductDetailsPage.java
@@ -671,15 +671,15 @@ public class ProductDetailsPage extends BaseComponent {
public boolean isToos(){
- return checkIfElementFound(".toos-label.header-2");
+ return checkIfElementFound(".toos-label");
}
public String getToosLabel() {
- return getText(".toos-label.header-2");
+ return getText(".toos-label");
}
- public String getToosBummedText(){
- return getText("#product-buy-box > p:nth-child(4)");
+ public String getToosBummedText() {
+ return getText(".qa-item-availability");
}
diff --git a/qa-automation-tests/src/test/java/com/backcountry/tests/retail/pdp/toos/SpecificContentTest.java b/qa-automation-tests/src/test/java/com/backcountry/tests/retail/pdp/toos/SpecificContentTest.java
index de5dac8..483d252 100644
--- a/qa-automation-tests/src/test/java/com/backcountry/tests/retail/pdp/toos/SpecificContentTest.java
+++ b/qa-automation-tests/src/test/java/com/backcountry/tests/retail/pdp/toos/SpecificContentTest.java
@@ -3,6 +3,8 @@ package com.backcountry.tests.retail.pdp.toos;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
+import com.backcountry.util.DataProviderArguments;
+import com.backcountry.util.FileDataProvider;
import org.testng.annotations.Test;
import com.backcountry.component.retail.ProductDetailsPage;
@@ -13,9 +15,10 @@ public class SpecificContentTest extends RetailBaseTestCase {
private static final String DONT_GET_TOO_BUMMED = "Don't get too bummed. This item is on the "
+ "way and will be available for purchase as soon as it rolls into the warehouse.";
- @Test
- public void verifyContent() {
- helperFactory().navigationTestHelper().navigateToTOOSPage();
+ @Test(dataProvider = "getTestData", dataProviderClass = FileDataProvider.class)
+ @DataProviderArguments("dataFilePrefix=testdata/retail/%s/PdpTest tableName=TOOSProductData")
+ public void verifyContent(String productId) {
+ helperFactory().navigationTestHelper().navigateToTOOSPage(productId);
ProductDetailsPage productPage = withPage().productDetailsPage();
// Verify Sku is displayed
diff --git a/qa-automation-tests/src/test/java/com/backcountry/util/helper/tests/NavigationTestHelper.java b/qa-automation-tests/src/test/java/com/backcountry/util/helper/tests/NavigationTestHelper.java
index 586450c..8f4baf7 100644
--- a/qa-automation-tests/src/test/java/com/backcountry/util/helper/tests/NavigationTestHelper.java
+++ b/qa-automation-tests/src/test/java/com/backcountry/util/helper/tests/NavigationTestHelper.java
@@ -305,7 +305,11 @@ public class NavigationTestHelper extends BaseTestHelper {
public void navigateToTOOSPage() {
// TODO: Multisite
- navigationHelper.goToPage("/abs-avalancherescue-devices-vario-15-backpack");
+ navigationHelper.goToProductPage("ABS0001"); // BCS
+ }
+
+ public void navigateToTOOSPage(String productId) {
+ navigationHelper.goToProductPage(productId);
}
public void navigateToRandomCategory(){
diff --git a/qa-automation-tests/testdata/retail/csv/PdpTest/backcountry/TOOSProductData.csv b/qa-automation-tests/testdata/retail/csv/PdpTest/backcountry/TOOSProductData.csv
index 83e45c9..a695b28 100644
--- a/qa-automation-tests/testdata/retail/csv/PdpTest/backcountry/TOOSProductData.csv
+++ b/qa-automation-tests/testdata/retail/csv/PdpTest/backcountry/TOOSProductData.csv
@@ -1,2 +1,2 @@
-productUrl
-/abs-avalancherescue-devices-vario-15-backpack
+productId
+ABS0001
diff --git a/qa-automation-tests/testdata/retail/csv/PdpTest/competitivecyclist/TOOSProductData.csv b/qa-automation-tests/testdata/retail/csv/PdpTest/competitivecyclist/TOOSProductData.csv
index fa208ed..e045b7e 100644
--- a/qa-automation-tests/testdata/retail/csv/PdpTest/competitivecyclist/TOOSProductData.csv
+++ b/qa-automation-tests/testdata/retail/csv/PdpTest/competitivecyclist/TOOSProductData.csv
@@ -1,2 +1,2 @@
-productUrl
-/salomon-xt-wings-tight-mens
+productId
+SAL1882
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment