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 @@ + + + +
+ + +