-
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: disable rest api replacement when we are in the edit context
- Loading branch information
Showing
3 changed files
with
34 additions
and
7 deletions.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
describe( 'Check Homepage', function () { | ||
it( 'successfully loads', function () { | ||
cy.visit( '/' ) | ||
} ); | ||
it( 'Header should not have lazyload applied', function () { | ||
cy.get( 'header img' ).should( 'not.have.attr', 'data-opt-src' ); | ||
} ); | ||
it( 'Elementor images should have replaced srcs', function () { | ||
cy.get( '.elementor-image > img' ).should( 'have.attr', 'src' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
it( 'Elementor images should data-opt-src attribute', function () { | ||
cy.get( '.elementor-image > img' ).should( 'have.attr', 'data-opt-src' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
it( 'Elementor images should have no script tag', function () { | ||
cy.get( '.elementor-image > noscript' ).should( 'exist' ); | ||
cy.get( '.elementor-image > noscript' ).should( 'contain', 'img' ).should( 'contain', 'i.optimole.com' ) | ||
} ); | ||
it( 'Custom crop should have rt fill resize', function () { | ||
|
||
cy.get( '.custom-crop .elementor-image > img' ).should( 'have.attr', 'data-opt-src' ).and( 'include', 'i.optimole.com' ).and( 'include', 'rt:fill' ); | ||
} ); | ||
|
||
it( 'Elementor gallery should be properly replaced', function () { | ||
cy.get( '.elementor-image-gallery a ' ).should( 'have.attr', 'href' ).and( 'include', 'i.optimole.com' ); | ||
cy.get( '.elementor-image-gallery a > img' ).should( 'have.attr', 'src' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
it( 'Elementor background image should be properly replaced', function () { | ||
cy.get( '.div-with-background .elementor-column-wrap ' ).should( 'have.css','background-image' ).and( 'include', 'i.optimole.com' ); | ||
} ); | ||
|
||
} ); |
This file was deleted.
Oops, something went wrong.
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