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