Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
add pageExtensionSuffix to support sling suffix
  • Loading branch information
wildone committed Jan 10, 2021
1 parent 7f921cd commit 7767241
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions aemdesign-testing/src/test/groovy/support/ComponentSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,12 @@ abstract class ComponentSpec extends FunctionalSpec {
@Shared
def String componentDocs
@Shared
def String pageExtention = ".html"
def String pageExtension = ".html"
@Shared
def String pageSelectors = ""
@Shared
def String pageExtensionSuffix = ""
@Shared
def String pathPage
@Shared
def String pathSite
Expand Down Expand Up @@ -75,7 +77,7 @@ abstract class ComponentSpec extends FunctionalSpec {
inLanguage = language
}

def page = to ClassicUIEditor, page.AEMPage.toLanguage(pathSite, inLanguage, pathPage + pageSelectors + pageExtention)
def page = to ClassicUIEditor, page.AEMPage.toLanguage(pathSite, inLanguage, pathPage + pageSelectors + pageExtension + pageExtensionSuffix)
page.waitForSidekick()

return page
Expand All @@ -101,7 +103,7 @@ abstract class ComponentSpec extends FunctionalSpec {
inLanguage = language
}

String url = page.AEMPage.toMode(page.AEMPage.toLanguage(pathSite, inLanguage, pathPage + pageSelectors + pageExtention), AEMPage.WCMMODE.DISABLED)
String url = page.AEMPage.toMode(page.AEMPage.toLanguage(pathSite, inLanguage, pathPage + pageSelectors + pageExtension + pageExtensionSuffix), AEMPage.WCMMODE.DISABLED)

printDebug("URL", [url, driver.manage().window().getSize()])

Expand Down Expand Up @@ -140,7 +142,7 @@ abstract class ComponentSpec extends FunctionalSpec {
}

String url = page.AEMPage.toMode(
page.AEMPage.toLanguage(pathSite, inLanguage, pathPage + pageExtention),
page.AEMPage.toLanguage(pathSite, inLanguage, pathPage + pageExtension + pageExtensionSuffix),
AEMPage.WCMMODE.DISABLED)

url = "$url$queryString"
Expand Down Expand Up @@ -195,14 +197,18 @@ abstract class ComponentSpec extends FunctionalSpec {
}
}

def designRefFull(selector, prefix) {
def size = getWindowViewPort()
def designRefFull(String selector, String prefix = "") {
def size = driver.manage().window().getSize()

String componentName = prefix + selector + "-" + size.getWidth().toString() + "_" + size.getHeight().toString() + "-" + "0"

return designReferenceFull(compileComponentScreenshotFileNamePath2(
prefix + selector + size + "-" + "0",
String[] screenshotName = compileComponentScreenshotFileNamePath2(
componentName,
size.width,
size.height,
""))
"")

return designReferenceFull(screenshotName)
}

def designRef(String selector) {
Expand Down

0 comments on commit 7767241

Please sign in to comment.