-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: compatibility with shortcode ultimate, adds more usecases to test
- Loading branch information
Showing
6 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ logs | |
dist | ||
artifact | ||
cypress/videos | ||
cypress/fixtures | ||
vendor | ||
code_quality | ||
build | ||
|
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,19 @@ | ||
describe( 'Check gutenberg page', function () { | ||
it( 'successfully loads', function () { | ||
cy.visit( '/gutenberg' ) | ||
} ); | ||
it( 'Gutenberg images should have replaced srcs', function () { | ||
cy.get( '.wp-block-image > img' ).should( 'have.attr', 'src' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
it( 'Gutenberg images should data-opt-src attribute', function () { | ||
cy.get( '.wp-block-image > img' ).should( 'have.attr', 'data-opt-src' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
it( 'Gutenberg images should have no script tag', function () { | ||
cy.get( '.wp-block-image > noscript' ).should( 'exist' ); | ||
cy.get( '.wp-block-image > noscript' ).should( 'contain', 'img' ).should( 'contain', 'i.optimole.com' ) | ||
} ); | ||
|
||
it( 'Gutenberg block cover background image should be properly replaced', function () { | ||
cy.get( '.wp-block-cover ' ).should( 'have.css','background-image' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
} ); |
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,14 @@ | ||
describe( 'Check Shortcode ultimate page', function () { | ||
it( 'successfully loads', function () { | ||
cy.visit( '/blog/test/' ) | ||
} ); | ||
it( 'Carousel should have proper resize type', function () { | ||
cy.get( '.su-carousel-slide img' ).should( 'have.attr', 'data-opt-src' ).and( 'include', 'i.optimole.com' ).and( 'include', 'rt:fill' ); | ||
} ); | ||
it( 'Slider should have proper resize type', function () { | ||
cy.get( '.su-slider img' ).should( 'have.attr', 'data-opt-src' ).and( 'include', 'i.optimole.com' ).and( 'include', 'rt:fill' ); | ||
} ); | ||
it( 'Gallery should have proper resize type', function () { | ||
cy.get( '.su-custom-gallery img' ).should( 'have.attr', 'data-opt-src' ).and( 'include', 'i.optimole.com' ).and( 'include', 'rt:fill' ); | ||
} ); | ||
} ); |
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,31 @@ | ||
describe( 'Check product page', function () { | ||
it( 'successfully loads', function () { | ||
cy.visit( '/product/test-product/' ) | ||
} ); | ||
it( 'Gallery wrapper should have proper data-thumb', function () { | ||
cy.get( '.woocommerce-product-gallery__wrapper > div' ).should( 'have.attr', 'data-thumb' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
it( 'Gallery wrapper link should have auto sizes', function () { | ||
cy.get( '.woocommerce-product-gallery__wrapper > div > a' ).should( 'have.attr', 'href' ).and( 'include', 'i.optimole.com' ).and( 'include', 'w:auto/h:auto' ); | ||
} ); | ||
it( 'Gallery wrapper image from link should have proper images', function () { | ||
cy.get( '.woocommerce-product-gallery__wrapper > div > a > img' ).should( 'have.attr', 'src' ).and( 'include', 'i.optimole.com' ); | ||
cy.get( '.woocommerce-product-gallery__wrapper > div > a > img' ).should( 'have.attr', 'data-src' ).and( 'include', 'i.optimole.com' ); | ||
cy.get( '.woocommerce-product-gallery__wrapper > div > a > img' ).should( 'have.attr', 'data-large_image' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
it( 'Zoom img should have auto size', function () { | ||
cy.get( '.woocommerce-product-gallery__wrapper .zoomImg' ).should( 'have.attr', 'src' ).and( 'include', 'i.optimole.com' ).and( 'include', 'w:auto/h:auto' ); | ||
} ); | ||
it( 'All images should have proper tags', function () { | ||
cy.get( 'img' ).should( 'have.attr', 'src' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
} ); | ||
describe( 'Test quick view', function () { | ||
it( 'successfully loads', function () { | ||
cy.visit( '/shop' ) | ||
cy.get( '.yith-wcqv-button:first' ).click(); | ||
} ); | ||
it( 'Quick view have optimole images', function () { | ||
cy.get( '#yith-quick-view-content .woocommerce-product-gallery__wrapper img' ).should( 'have.attr', 'src' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
} ); |
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
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