Skip to content

Commit

Permalink
add functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitgupta274509 committed Nov 30, 2022
1 parent 80028d3 commit d1ee597
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 29 deletions.
2 changes: 1 addition & 1 deletion deploy-app.ps1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mvn -f application/backend/pom.xml clean install -P autoInstallBundle
./mvnw -f application/backend/pom.xml clean install -P autoInstallBundle
2 changes: 1 addition & 1 deletion deploy-content-tests.ps1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mvn -f tests/content/pom.xml clean install -P autoInstallPackage
./mvnw -f tests/content/pom.xml clean install -P autoInstallPackage
2 changes: 1 addition & 1 deletion deploy-content.ps1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
mvn -f content/pom.xml clean install -P autoInstallPackage
./mvnw -f content/pom.xml clean install -P autoInstallPackage
Original file line number Diff line number Diff line change
@@ -1,31 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:ws="http://ds.pl/websight" xmlns:sling="http://sling.apache.org/jcr/sling/1.0"
jcr:primaryType="ws:Page">
<jcr:content
jcr:primaryType="ws:PageContent"
jcr:title="Title"
sling:resourceType="typerefinery/components/structure/page"
ws:template="/apps/typerefinery/templates/page">
<rootcontainer
jcr:primaryType="nt:unstructured"
sling:resourceType="typerefinery/components/structure/rootcontainer/fixedrootcontainer">
<header
jcr:primaryType="nt:unstructured"
sling:resourceType="typerefinery/components/structure/headerreference"/>
<maincontainer
jcr:primaryType="nt:unstructured"
sling:resourceType="typerefinery/components/structure/maincontainer">
<pagesection
jcr:primaryType="nt:unstructured"
sling:resourceType="typerefinery/components/structure/pagesection">
<title
jcr:primaryType="nt:unstructured"
sling:resourceType="typerefinery/components/content/title"/>
<jcr:root xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
xmlns:ws="http://ds.pl/websight"
xmlns:sling="http://sling.apache.org/jcr/sling/1.0" jcr:primaryType="ws:Page">
<jcr:content jcr:primaryType="ws:PageContent" jcr:title="Title" sling:resourceType="typerefinery/components/structure/page" ws:template="/apps/typerefinery/templates/page">
<rootcontainer jcr:primaryType="nt:unstructured" sling:resourceType="typerefinery/components/structure/rootcontainer/fixedrootcontainer">
<header jcr:primaryType="nt:unstructured" sling:resourceType="typerefinery/components/structure/headerreference"/>
<maincontainer jcr:primaryType="nt:unstructured" sling:resourceType="typerefinery/components/structure/maincontainer">
<pagesection jcr:primaryType="nt:unstructured" sling:resourceType="typerefinery/components/structure/pagesection">
<title jcr:primaryType="nt:unstructured" sling:resourceType="typerefinery/components/content/title"/>
</pagesection>
<pagesection1 jcr:primaryType="nt:unstructured" sling:resourceType="typerefinery/components/structure/pagesection">
<title jcr:primaryType="nt:unstructured" title="test1" sling:resourceType="typerefinery/components/content/title"/>
</pagesection1>
</maincontainer>
<footer
jcr:primaryType="nt:unstructured"
sling:resourceType="typerefinery/components/structure/footer"/>
<footer jcr:primaryType="nt:unstructured" sling:resourceType="typerefinery/components/structure/footer"/>
</rootcontainer>
</jcr:content>
</jcr:root>
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<richtext
jcr:primaryType="nt:unstructured"
sling:resourceType="howlite/components/richtext"
text="&lt;p>Luna Soleste® pear-shaped halo engagement ring with a diamond platinum band.&lt;br>&lt;br>&lt;/p>&lt;p>&lt;strong>From $7,900&lt;/strong>&lt;/p>"/>
text="&lt;p>Lun Soleste® pear-shaped halo engagement ring with a diamond platinum band.&lt;br>&lt;br>&lt;/p>&lt;p>&lt;strong>From $7,900&lt;/strong>&lt;/p>"/>
<ctaslist
jcr:primaryType="nt:unstructured"
sling:resourceType="howlite/components/ctaslist">
Expand Down
30 changes: 30 additions & 0 deletions tests/end-to-end/tests/title.cy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (C) 2022 Typerefinery.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

describe('Typerefinery Title', function () {
beforeEach(() => {
cy.login();
});

it('renders correctly in preview mode', function () {
cy.visit('/content/typerefinery-showcase/pages/components/content/title.html');

cy.get(".hl-title__heading.hl-title__heading--size-4")
.should('have.text', 'Add your heading heretest1')
});
});


0 comments on commit d1ee597

Please sign in to comment.