From 2b4c5895e78ba6aebb692234e93b8db616f07ad9 Mon Sep 17 00:00:00 2001 From: ExostFlash Date: Thu, 10 Jul 2025 14:10:13 +0200 Subject: [PATCH] smart-tag --- cypress/e2e/smart.cy.js | 18 ++++++++++++ smart-tag.html | 61 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+) create mode 100644 cypress/e2e/smart.cy.js create mode 100644 smart-tag.html diff --git a/cypress/e2e/smart.cy.js b/cypress/e2e/smart.cy.js new file mode 100644 index 0000000..1a9fd40 --- /dev/null +++ b/cypress/e2e/smart.cy.js @@ -0,0 +1,18 @@ +describe('template spec', () => { + beforeEach(() => { + cy.visit('./../smart-tag.html') + }) + + it('Affiche le tag au survol du bouton See more', () => { + cy.contains('See more').trigger('mouseover') + cy.get('div.absolute').should('not.have.attr', 'style') + }) + + it('Le tag disparaît à la sortie du survol du bouton See more', () => { + cy.contains('See more').trigger('mouseover') + cy.get('div.absolute').should('not.have.attr', 'style') + + cy.get('body').trigger('mousemove', 0, 0) + cy.get('div.absolute').should('have.attr', 'style') + }) +}) \ No newline at end of file diff --git a/smart-tag.html b/smart-tag.html new file mode 100644 index 0000000..83ed22f --- /dev/null +++ b/smart-tag.html @@ -0,0 +1,61 @@ + + + + + + + Smart tag with Tailwind CSS & AlpineJS + + + + + + + + + + + + + + + + + +
+
+ +

Smart tag

+

Alpine JS & Tailwind CSS

+ + +
+
+
+
+ See more +
+ +
+ Lorem ipsum dolor sit amet consectetur, adipisicing elit. Provident laboriosam magnam quod. In ipsum eius voluptatibus consequatur fugit? Fugit animi eos voluptatibus enim aspernatur culpa illo. Quidem ipsum hic eaque. +
+ +
+ +
+
+
+
+ + + \ No newline at end of file