-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,148 additions
and
1 deletion.
There are no files selected for viewing
53 changes: 53 additions & 0 deletions
53
aemdesign-testing/src/test/groovy/specs/component/forms/button/ButtonAuthorSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package specs.component.forms.button | ||
|
||
import spock.lang.Stepwise | ||
import support.ComponentSpec | ||
import support.page.ui.touch.TouchUIEditor | ||
|
||
@Stepwise | ||
class ButtonAuthorSpec extends ComponentSpec { | ||
|
||
String pathPage = "component/forms/button" | ||
String pathSite = "content/aemdesign-showcase" | ||
String language = "au/en" | ||
String componentPath = "jcr:content/article/par/contentblock1/par/button" | ||
|
||
def setupSpec() { | ||
loginAsAdmin() | ||
} | ||
|
||
def cleanupSpec() { | ||
analyzeLog() | ||
} | ||
|
||
def "Authoring of Component"() { | ||
|
||
given: "Component has already been inserted" | ||
def selector = "#button1" | ||
|
||
when: "I am on the Component showcase page" | ||
TouchUIEditor page = waitForTouchUIPage(language) | ||
|
||
then: "The component should be on showcase page" | ||
waitFor { withFrame(TouchUIEditor.PAGE_FRAME_CONTENT) { $(selector) } } | ||
|
||
and: "All dialogs are closed" | ||
page.Editor.isDialogOpen(compileComponentPath()) == false | ||
report("All dialogs are closed") | ||
|
||
and: "I open the dialog box" | ||
page.Editor.showDialog(compileComponentPath()) | ||
|
||
then: "I should be able to see component author dialog" | ||
page.Editor.isDialogOpen(compileComponentPath()) == true | ||
report("I should be able to see component author dialog") | ||
|
||
when: "I close the dialog box" | ||
page.Editor.closeDialog(compileComponentPath()) | ||
|
||
then: "I should be able to close component author dialog" | ||
page.Editor.isDialogOpen(compileComponentPath()) == false | ||
report("I should be able to close component author dialog") | ||
} | ||
|
||
} |
66 changes: 66 additions & 0 deletions
66
aemdesign-testing/src/test/groovy/specs/component/forms/button/ButtonPublishSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package specs.component.forms.button | ||
|
||
import spock.lang.Stepwise | ||
import spock.lang.Unroll | ||
import support.ComponentSpec | ||
|
||
@Stepwise | ||
class ButtonPublishSpec extends ComponentSpec { | ||
|
||
String pathPage = "component/forms/button" | ||
String pathSite = "content/aemdesign-showcase" | ||
String language = "au/en" | ||
String componentPath = "jcr:content/article/par/contentblock1/par/button" | ||
|
||
def setupSpec() { | ||
loginAsAdmin() | ||
} | ||
|
||
@Unroll("Functionality of Component Variant: Default in #viewport.label") | ||
def "Functionality of Component Variant: Default"() { | ||
|
||
given: '>the page hierarchy is created as "Components" > "Forms" > "Button"' | ||
and: '>I am in the component showcase page' | ||
and: '>the component is on the showcase page' | ||
def selector = "#button1" | ||
|
||
when: "I am on the component showcase page" | ||
setWindowSize(viewport) | ||
waitForAuthorPreviewPage() | ||
|
||
then: "The component should be on the page" | ||
def component = waitForComponent(selector) | ||
|
||
and: "Should have sample content" | ||
assert compareInnerTextIgnoreCase("${selector}","Submit") | ||
takeScreenshot($(selector).firstElement(), "Should have sample content Submit") | ||
|
||
where: | ||
viewport << getViewPorts() | ||
} | ||
|
||
@Unroll("Functionality of Component Variant: Button in #viewport.label") | ||
def "Functionality of Component Variant: Button"() { | ||
|
||
given: '>the page hierarchy is created as "Components" > "Forms" > "Button"' | ||
and: '>I am in the component showcase page' | ||
and: '>the component is on the showcase page' | ||
def selector = "#button2" | ||
|
||
when: "I am on the component showcase page" | ||
setWindowSize(viewport) | ||
waitForAuthorPreviewPage() | ||
|
||
then: "The component should be on the page" | ||
def component = waitForComponent(selector) | ||
|
||
and: "Should have sample content" | ||
assert compareInnerTextIgnoreCase("${selector}","Button") | ||
takeScreenshot($(selector).firstElement(), "Should have sample content Button") | ||
|
||
where: | ||
viewport << getViewPorts() | ||
} | ||
|
||
|
||
} |
63 changes: 63 additions & 0 deletions
63
aemdesign-testing/src/test/groovy/specs/component/forms/button/ButtonScreenshotSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package specs.component.forms.button | ||
|
||
import spock.lang.Stepwise | ||
import spock.lang.Unroll | ||
import support.ComponentSpec | ||
|
||
@Stepwise | ||
class ButtonScreenshotSpec extends ComponentSpec { | ||
|
||
String pathPage = "component/forms/button" | ||
String pathSite = "content/aemdesign-showcase" | ||
String language = "au/en" | ||
String componentPath = "jcr:content/article/par/contentblock1/par/button" | ||
|
||
def setupSpec() { | ||
loginAsAdmin() | ||
} | ||
|
||
@Unroll("Appearance of Component Variant: Default in #viewport.label") | ||
def "Appearance of Component Variant: Default"() { | ||
|
||
given: '>I am in the component showcase page' | ||
and: '>the component is on the showcase page' | ||
def selector = "#button1" | ||
|
||
when: 'I am in the component showcase page' | ||
setWindowSize(viewport) | ||
waitForAuthorPreviewPage() | ||
|
||
then: 'The component should appear on the page' | ||
def component = waitForComponent(selector) | ||
|
||
then: "It should match the #viewport.width and height: #viewport.height reference image." | ||
designRef(selector) | ||
|
||
where: | ||
viewport << getViewPorts() | ||
|
||
} | ||
|
||
@Unroll("Appearance of Component Variant: Button in #viewport.label") | ||
def "Appearance of Component Variant: Button"() { | ||
|
||
given: '>I am in the component showcase page' | ||
and: '>the component is on the showcase page' | ||
def selector = "#button2" | ||
|
||
when: 'I am in the component showcase page' | ||
setWindowSize(viewport) | ||
waitForAuthorPreviewPage() | ||
|
||
then: 'The component should appear on the page' | ||
def component = waitForComponent(selector) | ||
|
||
then: "It should match the #viewport.width and height: #viewport.height reference image." | ||
designRef(selector) | ||
|
||
where: | ||
viewport << getViewPorts() | ||
|
||
} | ||
|
||
} |
53 changes: 53 additions & 0 deletions
53
aemdesign-testing/src/test/groovy/specs/component/forms/form/FormAuthorSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package specs.component.forms.form | ||
|
||
import spock.lang.Stepwise | ||
import support.ComponentSpec | ||
import support.page.ui.touch.TouchUIEditor | ||
|
||
@Stepwise | ||
class FormAuthorSpec extends ComponentSpec { | ||
|
||
String pathPage = "component/forms/form" | ||
String pathSite = "content/aemdesign-showcase" | ||
String language = "au/en" | ||
String componentPath = "jcr:content/article/par/contentblock1/par/form" | ||
|
||
def setupSpec() { | ||
loginAsAdmin() | ||
} | ||
|
||
def cleanupSpec() { | ||
analyzeLog() | ||
} | ||
|
||
def "Authoring of Component"() { | ||
|
||
given: "Component has already been inserted" | ||
def selector = "#form1" | ||
|
||
when: "I am on the Component showcase page" | ||
TouchUIEditor page = waitForTouchUIPage(language) | ||
|
||
then: "The component should be on showcase page" | ||
waitFor { withFrame(TouchUIEditor.PAGE_FRAME_CONTENT) { $(selector) } } | ||
|
||
and: "All dialogs are closed" | ||
page.Editor.isDialogOpen(compileComponentPath()) == false | ||
report("All dialogs are closed") | ||
|
||
and: "I open the dialog box" | ||
page.Editor.showDialog(compileComponentPath()) | ||
|
||
then: "I should be able to see component author dialog" | ||
page.Editor.isDialogOpen(compileComponentPath()) == true | ||
report("I should be able to see component author dialog") | ||
|
||
when: "I close the dialog box" | ||
page.Editor.closeDialog(compileComponentPath()) | ||
|
||
then: "I should be able to close component author dialog" | ||
page.Editor.isDialogOpen(compileComponentPath()) == false | ||
report("I should be able to close component author dialog") | ||
} | ||
|
||
} |
42 changes: 42 additions & 0 deletions
42
aemdesign-testing/src/test/groovy/specs/component/forms/form/FormPublishSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package specs.component.forms.form | ||
|
||
import spock.lang.Stepwise | ||
import spock.lang.Unroll | ||
import support.ComponentSpec | ||
|
||
@Stepwise | ||
class FormPublishSpec extends ComponentSpec { | ||
|
||
String pathPage = "component/forms/form" | ||
String pathSite = "content/aemdesign-showcase" | ||
String language = "au/en" | ||
String componentPath = "jcr:content/article/par/contentblock1/par/form" | ||
|
||
def setupSpec() { | ||
loginAsAdmin() | ||
} | ||
|
||
@Unroll("Functionality of Component Variant: Default in #viewport.label") | ||
def "Functionality of Component Variant: Default"() { | ||
|
||
given: '>the page hierarchy is created as "Components" > "Forms" > "Form"' | ||
and: '>I am in the component showcase page' | ||
and: '>the component is on the showcase page' | ||
def selector = "#form1" | ||
|
||
when: "I am on the component showcase page" | ||
setWindowSize(viewport) | ||
waitForAuthorPreviewPage() | ||
|
||
then: "The component should be on the page" | ||
def component = waitForComponent(selector) | ||
|
||
and: "Should have default fields" | ||
assert $(selector).children().size() == 2 | ||
|
||
where: | ||
viewport << getViewPorts() | ||
} | ||
|
||
|
||
} |
43 changes: 43 additions & 0 deletions
43
aemdesign-testing/src/test/groovy/specs/component/forms/form/FormScreenshotSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package specs.component.forms.form | ||
|
||
import spock.lang.Ignore | ||
import spock.lang.Stepwise | ||
import spock.lang.Unroll | ||
import support.ComponentSpec | ||
|
||
@Stepwise | ||
class FormScreenshotSpec extends ComponentSpec { | ||
|
||
String pathPage = "component/forms/form" | ||
String pathSite = "content/aemdesign-showcase" | ||
String language = "au/en" | ||
String componentPath = "jcr:content/article/par/contentblock1/par/form" | ||
|
||
def setupSpec() { | ||
loginAsAdmin() | ||
} | ||
|
||
@Ignore | ||
@Unroll("Appearance of Component Variant: Default in #viewport.label") | ||
def "Appearance of Component Variant: Default"() { | ||
|
||
given: '>I am in the component showcase page' | ||
and: '>the component is on the showcase page' | ||
def selector = "#form1" | ||
|
||
when: 'I am in the component showcase page' | ||
setWindowSize(viewport) | ||
waitForAuthorPreviewPage() | ||
|
||
then: 'The component should appear on the page' | ||
def component = waitForComponent(selector) | ||
|
||
then: "It should match the #viewport.width and height: #viewport.height reference image." | ||
designRef(selector) | ||
|
||
where: | ||
viewport << getViewPorts() | ||
|
||
} | ||
|
||
} |
53 changes: 53 additions & 0 deletions
53
aemdesign-testing/src/test/groovy/specs/component/forms/hidden/HiddenAuthorSpec.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package specs.component.forms.hidden | ||
|
||
import spock.lang.Stepwise | ||
import support.ComponentSpec | ||
import support.page.ui.touch.TouchUIEditor | ||
|
||
@Stepwise | ||
class HiddenAuthorSpec extends ComponentSpec { | ||
|
||
String pathPage = "component/forms/hidden" | ||
String pathSite = "content/aemdesign-showcase" | ||
String language = "au/en" | ||
String componentPath = "jcr:content/article/par/contentblock1/par/hidden" | ||
|
||
def setupSpec() { | ||
loginAsAdmin() | ||
} | ||
|
||
def cleanupSpec() { | ||
analyzeLog() | ||
} | ||
|
||
def "Authoring of Component"() { | ||
|
||
given: "Component has already been inserted" | ||
def selector = "#hidden1" | ||
|
||
when: "I am on the Component showcase page" | ||
TouchUIEditor page = waitForTouchUIPage(language) | ||
|
||
then: "The component should be on showcase page" | ||
waitFor { withFrame(TouchUIEditor.PAGE_FRAME_CONTENT) { $(selector) } } | ||
|
||
and: "All dialogs are closed" | ||
page.Editor.isDialogOpen(compileComponentPath()) == false | ||
report("All dialogs are closed") | ||
|
||
and: "I open the dialog box" | ||
page.Editor.showDialog(compileComponentPath()) | ||
|
||
then: "I should be able to see component author dialog" | ||
page.Editor.isDialogOpen(compileComponentPath()) == true | ||
report("I should be able to see component author dialog") | ||
|
||
when: "I close the dialog box" | ||
page.Editor.closeDialog(compileComponentPath()) | ||
|
||
then: "I should be able to close component author dialog" | ||
page.Editor.isDialogOpen(compileComponentPath()) == false | ||
report("I should be able to close component author dialog") | ||
} | ||
|
||
} |
Oops, something went wrong.