From 9114c8a065ca788d7b601fa95a46a67bd307fbcc Mon Sep 17 00:00:00 2001 From: Drashti Modasara Date: Tue, 12 Dec 2023 16:42:07 +0530 Subject: [PATCH] Fixing UTs --- .../genfill/genfill-interactive.test.js | 7 ++ test/features/genfill/mocks/genfill.html | 74 +++++++++---------- 2 files changed, 44 insertions(+), 37 deletions(-) diff --git a/test/features/genfill/genfill-interactive.test.js b/test/features/genfill/genfill-interactive.test.js index 8a863ad72..9b84f95cc 100644 --- a/test/features/genfill/genfill-interactive.test.js +++ b/test/features/genfill/genfill-interactive.test.js @@ -29,4 +29,11 @@ describe('genfill variant of interactive marquee', () => { expect(ent.querySelector('.enticement-text')).to.exist; expect(ent.querySelector('.enticement-arrow')).to.exist; }); + it('should implement click functionality', () => { + const a = im.querySelector('.desktop-only a'); + const img = a.querySelector('img'); + expect(img.alt.includes('Generate Jungle')).to.true; + a.click(); + expect(img.alt.includes('Generate Pond')).to.true; + }); }); diff --git a/test/features/genfill/mocks/genfill.html b/test/features/genfill/mocks/genfill.html index 60033175d..bc3bcfa78 100644 --- a/test/features/genfill/mocks/genfill.html +++ b/test/features/genfill/mocks/genfill.html @@ -1,8 +1,11 @@ -
+
- + + + +
@@ -10,7 +13,10 @@

- + + + + Photoshop

Edit photos online with Adobe Photoshop

@@ -22,64 +28,58 @@

Edit photos online with Adobe P

2000|0

- + + + + Generate Jungle

- + + + + Generate Pond

- + + + + Jaguar

- + + + + Rainforest Plant

- + + + + Toucan

- + + + + Butterfly

- - -

-

-
-

- - - -

-

- - - -

-

- - - -

-

- - - -

-

- - + + + + Over