Skip to content

Commit 20dfd7e

Browse files
committed
Include Section block to e2e
1 parent 8915e63 commit 20dfd7e

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

cypress/e2e/test_otter_background_lazyload.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,67 @@ describe("Check Otter Background Lazyload", function () {
22
it("successfully loads", function () {
33
cy.visit("/otter/background-lazyload/");
44
});
5+
56
it("Otter Flip block front should have background lazyloaded", function () {
67
cy.get(".wp-block-themeisle-blocks-flip")
78
.find(".o-flip-front")
89
.eq(0)
910
.should("have.attr", "class")
1011
.and("include", "optml-bg-lazyloaded");
1112
});
13+
1214
it("Otter Flip block front should have background image url optimized (ie. external css is processed)", function () {
1315
cy.get(".wp-block-themeisle-blocks-flip")
1416
.find(".o-flip-front")
1517
.eq(0)
1618
.should("have.css", "background-image")
1719
.and("match", /url\(.*\.i\.optimole\.com.*\)/);
1820
});
21+
1922
it("Otter Flip block back should have background lazyloaded", function () {
2023
cy.get(".wp-block-themeisle-blocks-flip")
2124
.find(".o-flip-back")
2225
.eq(0)
2326
.should("have.attr", "class")
2427
.and("include", "optml-bg-lazyloaded");
2528
});
29+
2630
it("Otter Flip block back should have background image url optimized (ie. external css is processed)", function () {
2731
cy.get(".wp-block-themeisle-blocks-flip")
2832
.find(".o-flip-back")
2933
.eq(0)
3034
.should("have.css", "background-image")
3135
.and("match", /url\(.*\.i\.optimole\.com.*\)/);
3236
});
37+
38+
it("Otter Section Block should have background lazyloaded", function () {
39+
cy.get(".#wp-block-themeisle-blocks-advanced-columns-e62611eb")
40+
.eq(0)
41+
.should("have.attr", "class")
42+
.and("include", "optml-bg-lazyloaded");
43+
});
44+
45+
it("Otter Section Block should have background image url optimized (ie. external css is processed)", function () {
46+
cy.get("#wp-block-themeisle-blocks-advanced-columns-e62611eb")
47+
.eq(0)
48+
.should("have.css", "background-image")
49+
.and("match", /url\(.*\.i\.optimole\.com.*\)/);
50+
});
51+
52+
it("Otter Section Block's Overlay should have background lazyloaded", function () {
53+
cy.get(".#wp-block-themeisle-blocks-advanced-columns-e62611eb")
54+
.find(".wp-block-themeisle-blocks-advanced-columns-overlay")
55+
.eq(0)
56+
.should("have.attr", "class")
57+
.and("include", "optml-bg-lazyloaded");
58+
});
59+
60+
it("Otter Section Block's Overlay should have background image url optimized (ie. external css is processed)", function () {
61+
cy.get("#wp-block-themeisle-blocks-advanced-columns-e62611eb")
62+
.find(".wp-block-themeisle-blocks-advanced-columns-overlay")
63+
.eq(0)
64+
.should("have.css", "background-image")
65+
.and("match", /url\(.*\.i\.optimole\.com.*\)/);
66+
});
3367
});
3468

0 commit comments

Comments
 (0)