From 9e79ad907b3fdb61f5331febe5ff70151e459c3e Mon Sep 17 00:00:00 2001 From: carlosjr Date: Tue, 15 Mar 2022 15:39:04 +0100 Subject: [PATCH] removed sample code --- src/components/QuasarButton.vue | 12 ---- src/components/QuasarDialog.vue | 65 ------------------- src/components/QuasarDrawer.vue | 33 ---------- src/components/QuasarPageSticky.vue | 21 ------ src/components/QuasarTooltip.vue | 21 ------ .../__tests__/QuasarButton.e2e.spec.js | 42 ------------ src/components/__tests__/QuasarDialog.spec.js | 24 ------- src/components/__tests__/QuasarDrawer.spec.js | 15 ----- .../__tests__/QuasarPageSticky.spec.js | 22 ------- .../__tests__/QuasarTooltip.spec.js | 11 ---- 10 files changed, 266 deletions(-) delete mode 100644 src/components/QuasarButton.vue delete mode 100644 src/components/QuasarDialog.vue delete mode 100644 src/components/QuasarDrawer.vue delete mode 100644 src/components/QuasarPageSticky.vue delete mode 100644 src/components/QuasarTooltip.vue delete mode 100644 src/components/__tests__/QuasarButton.e2e.spec.js delete mode 100644 src/components/__tests__/QuasarDialog.spec.js delete mode 100644 src/components/__tests__/QuasarDrawer.spec.js delete mode 100644 src/components/__tests__/QuasarPageSticky.spec.js delete mode 100644 src/components/__tests__/QuasarTooltip.spec.js diff --git a/src/components/QuasarButton.vue b/src/components/QuasarButton.vue deleted file mode 100644 index 8e2e33ce8..000000000 --- a/src/components/QuasarButton.vue +++ /dev/null @@ -1,12 +0,0 @@ - - - diff --git a/src/components/QuasarDialog.vue b/src/components/QuasarDialog.vue deleted file mode 100644 index 770dc3789..000000000 --- a/src/components/QuasarDialog.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - diff --git a/src/components/QuasarDrawer.vue b/src/components/QuasarDrawer.vue deleted file mode 100644 index 5d85f72b4..000000000 --- a/src/components/QuasarDrawer.vue +++ /dev/null @@ -1,33 +0,0 @@ - - - diff --git a/src/components/QuasarPageSticky.vue b/src/components/QuasarPageSticky.vue deleted file mode 100644 index f281a973a..000000000 --- a/src/components/QuasarPageSticky.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/src/components/QuasarTooltip.vue b/src/components/QuasarTooltip.vue deleted file mode 100644 index c4905667c..000000000 --- a/src/components/QuasarTooltip.vue +++ /dev/null @@ -1,21 +0,0 @@ - - - diff --git a/src/components/__tests__/QuasarButton.e2e.spec.js b/src/components/__tests__/QuasarButton.e2e.spec.js deleted file mode 100644 index aabc1cf61..000000000 --- a/src/components/__tests__/QuasarButton.e2e.spec.js +++ /dev/null @@ -1,42 +0,0 @@ -import { mount } from '@cypress/vue'; -import QuasarButton from '../QuasarButton.vue'; - -describe('QuasarButton', () => { - it('renders a message', () => { - const label = 'Hello there'; - mount(QuasarButton, { - props: { - label, - }, - }); - - cy.dataCy('button').should('contain', label); - }); - - it('renders another message', () => { - const label = 'Will this work?'; - mount(QuasarButton, { - props: { - label, - }, - }); - - cy.dataCy('button').should('contain', label); - }); - - it('should have a `positive` color', () => { - mount(QuasarButton); - - cy.dataCy('button').should('have.backgroundColor', 'var(--q-positive)').should('have.color', 'white'); - }); - - it('should emit `test` upon click', () => { - mount(QuasarButton); - - cy.dataCy('button') - .click() - .should(() => { - expect(Cypress.vueWrapper.emitted('test')).to.have.length(1); - }); - }); -}); diff --git a/src/components/__tests__/QuasarDialog.spec.js b/src/components/__tests__/QuasarDialog.spec.js deleted file mode 100644 index 931e2916c..000000000 --- a/src/components/__tests__/QuasarDialog.spec.js +++ /dev/null @@ -1,24 +0,0 @@ -import { mount } from '@cypress/vue'; -import DialogWrapper from 'app/test/cypress/wrappers/DialogWrapper.vue'; -import QuasarDialog from '../QuasarDialog.vue'; - -describe('QuasarDialog', () => { - it('should show a dialog with a message', () => { - const message = 'Hello, I am a dialog'; - mount(DialogWrapper, { - props: { - component: QuasarDialog, - componentProps: { - message, - }, - }, - }); - cy.dataCy('dialog').should('exist').should('contain', message); - }); - - it('should close a dialog when clikcing ok', () => { - // The dialog is still visible from the previous test - cy.dataCy('dialog').should('exist').dataCy('ok-button').click(); - cy.dataCy('dialog').should('not.exist'); - }); -}); diff --git a/src/components/__tests__/QuasarDrawer.spec.js b/src/components/__tests__/QuasarDrawer.spec.js deleted file mode 100644 index e6bbcc984..000000000 --- a/src/components/__tests__/QuasarDrawer.spec.js +++ /dev/null @@ -1,15 +0,0 @@ -import { mount } from '@cypress/vue'; -import LayoutContainer from 'app/test/cypress/wrappers/LayoutContainer.vue'; -import QuasarDrawer from '../QuasarDrawer.vue'; - -describe('QuasarDrawer', () => { - it('should show a drawer', () => { - mount(LayoutContainer, { - props: { - component: QuasarDrawer, - }, - }); - cy.dataCy('drawer').should('exist').dataCy('button').should('not.be.visible'); - cy.get('.q-scrollarea .scroll').scrollTo('bottom', { duration: 500 }).dataCy('button').should('be.visible'); - }); -}); diff --git a/src/components/__tests__/QuasarPageSticky.spec.js b/src/components/__tests__/QuasarPageSticky.spec.js deleted file mode 100644 index 2e989a597..000000000 --- a/src/components/__tests__/QuasarPageSticky.spec.js +++ /dev/null @@ -1,22 +0,0 @@ -import { mount } from '@cypress/vue'; -import LayoutContainer from 'app/test/cypress/wrappers/LayoutContainer.vue'; -import QuasarPageSticky from '../QuasarPageSticky.vue'; - -describe('QuasarPageSticky', () => { - it('should show a sticky at the bottom-right of the page', () => { - mount(LayoutContainer, { - props: { - component: QuasarPageSticky, - title: 'Test', - }, - }); - - cy.dataCy('button') - .should('be.visible') - .should(($el) => { - const rect = $el[0].getBoundingClientRect(); - expect(rect.bottom).to.equal(window.innerHeight - 18); - expect(rect.right).to.equal(window.innerWidth - 18); - }); - }); -}); diff --git a/src/components/__tests__/QuasarTooltip.spec.js b/src/components/__tests__/QuasarTooltip.spec.js deleted file mode 100644 index f5941a31e..000000000 --- a/src/components/__tests__/QuasarTooltip.spec.js +++ /dev/null @@ -1,11 +0,0 @@ -import { mount } from '@cypress/vue'; -import QuasarTooltip from '../QuasarTooltip.vue'; - -describe('QuasarTooltip', () => { - it('should show a tooltip', () => { - mount(QuasarTooltip); - - cy.dataCy('button').trigger('mouseover'); - cy.dataCy('tooltip').contains('Here I am!'); - }); -});