test: refs #6695 e2e front use dockerfile.e2e
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
gitea/salix-front/pipeline/pr-dev There was a failure building this commit
Details
This commit is contained in:
parent
1ee6469ef7
commit
fdb6e6c105
|
@ -2,9 +2,9 @@ FROM node:lts-bookworm
|
||||||
ENV SHELL bash
|
ENV SHELL bash
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
|
|
||||||
RUN npm install -g pnpm@8.15.1 && \
|
RUN npm install -g pnpm@8.15.1 && \
|
||||||
pnpm setup
|
pnpm setup && \
|
||||||
|
pnpm install -g @quasar/cli@2.2.1
|
||||||
|
|
||||||
RUN apt-get -y --fix-missing update && \
|
RUN apt-get -y --fix-missing update && \
|
||||||
apt-get -y --fix-missing upgrade && \
|
apt-get -y --fix-missing upgrade && \
|
||||||
|
@ -32,7 +32,6 @@ COPY \
|
||||||
pnpm-lock.yaml \
|
pnpm-lock.yaml \
|
||||||
./
|
./
|
||||||
|
|
||||||
# Verifica si node_modules existe; si no, instala dependencias
|
|
||||||
RUN if [ ! -d "node_modules" ]; then \
|
RUN if [ ! -d "node_modules" ]; then \
|
||||||
pnpm install; \
|
pnpm install; \
|
||||||
fi && \
|
fi && \
|
||||||
|
@ -40,13 +39,17 @@ RUN if [ ! -d "node_modules" ]; then \
|
||||||
npx cypress install
|
npx cypress install
|
||||||
|
|
||||||
COPY \
|
COPY \
|
||||||
|
quasar.config.js \
|
||||||
|
index.html \
|
||||||
jsconfig.json \
|
jsconfig.json \
|
||||||
quasar.extensions.json \
|
quasar.extensions.json \
|
||||||
|
# .eslintignore \
|
||||||
|
# .eslintrc.js \
|
||||||
postcss.config.js \
|
postcss.config.js \
|
||||||
cypress.config.js \
|
cypress.config.js \
|
||||||
./
|
./
|
||||||
|
|
||||||
|
COPY src src
|
||||||
COPY test/cypress test/cypress
|
COPY test/cypress test/cypress
|
||||||
|
COPY public public
|
||||||
|
|
||||||
ENV CYPRESS_BROWSER=chrome
|
|
||||||
ENV CHROME_BIN=/usr/bin/chromium
|
|
||||||
|
|
|
@ -120,15 +120,15 @@ pipeline {
|
||||||
}
|
}
|
||||||
stage('Frontend') {
|
stage('Frontend') {
|
||||||
steps {
|
steps {
|
||||||
sh 'quasar build' // Use quasar prod version
|
// sh 'quasar build' // Use quasar prod version
|
||||||
sh 'docker-compose -f docker-compose.e2e.yml up -d --build front'
|
sh 'docker-compose -f docker-compose.e2e.yml up -d --build front'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Build Cypress') {
|
// stage('Build Cypress') {
|
||||||
steps {
|
// steps {
|
||||||
sh 'docker-compose -f docker-compose.e2e.yml build e2e'
|
// sh 'docker-compose -f docker-compose.e2e.yml build e2e'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Run E2E') {
|
stage('Run E2E') {
|
||||||
|
|
|
@ -18,7 +18,18 @@ export default defineConfig({
|
||||||
videosFolder: 'test/cypress/videos',
|
videosFolder: 'test/cypress/videos',
|
||||||
downloadsFolder: 'test/cypress/downloads',
|
downloadsFolder: 'test/cypress/downloads',
|
||||||
video: false,
|
video: false,
|
||||||
specPattern: 'test/cypress/integration/**/*.spec.js',
|
specPattern: [
|
||||||
|
'test/cypress/integration/entry/stockBought.spec.js',
|
||||||
|
'test/cypress/integration/invoiceOut/invoiceOutNegativeBases.js',
|
||||||
|
'test/cypress/integration/invoiceOut/invoiceOutMakeInvoice.spec.js',
|
||||||
|
'test/cypress/integration/item/itemTag.spec.js',
|
||||||
|
'test/cypress/integration/route/routeList.spec.js',
|
||||||
|
'test/cypress/integration/ticket/ticketList.spec.js',
|
||||||
|
'test/cypress/integration/ticket/ticketSale.spec.js',
|
||||||
|
'test/cypress/integration/vnComponent/UserPanel.spec.js',
|
||||||
|
'test/cypress/integration/vnComponent/VnLocation.spec.js',
|
||||||
|
'test/cypress/integration/worker/workerNotificationsManager.spec.js',
|
||||||
|
],
|
||||||
experimentalRunAllSpecs: true,
|
experimentalRunAllSpecs: true,
|
||||||
watchForFileChanges: true,
|
watchForFileChanges: true,
|
||||||
reporter: 'cypress-mochawesome-reporter',
|
reporter: 'cypress-mochawesome-reporter',
|
||||||
|
|
|
@ -5,8 +5,10 @@ services:
|
||||||
command: npx quasar serve --history --proxy ./proxy.mjs --hostname 127.0.0.1 --port 9000
|
command: npx quasar serve --history --proxy ./proxy.mjs --hostname 127.0.0.1 --port 9000
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./Dockerfile
|
dockerfile: ./Dockerfile.e2e
|
||||||
network_mode: host
|
network_mode: host
|
||||||
|
volumes:
|
||||||
|
- ./node_modules:/app/node_modules
|
||||||
e2e:
|
e2e:
|
||||||
command: npx cypress run --browser chromium
|
command: npx cypress run --browser chromium
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -76,7 +76,10 @@ describe('TicketSale', () => {
|
||||||
selectFirstRow();
|
selectFirstRow();
|
||||||
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
||||||
cy.waitForElement('[data-cy="markAsReservedItem"]');
|
cy.waitForElement('[data-cy="markAsReservedItem"]');
|
||||||
|
cy.intercept('POST', '/Sales/reserve').as('reserveRequest');
|
||||||
cy.dataCy('markAsReservedItem').click();
|
cy.dataCy('markAsReservedItem').click();
|
||||||
|
cy.wait('@reserveRequest').its('response.statusCode').should('eq', 200);
|
||||||
|
|
||||||
cy.dataCy('ticketSaleReservedIcon').should('exist');
|
cy.dataCy('ticketSaleReservedIcon').should('exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -84,7 +87,10 @@ describe('TicketSale', () => {
|
||||||
selectFirstRow();
|
selectFirstRow();
|
||||||
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
||||||
cy.waitForElement('[data-cy="unmarkAsReservedItem"]');
|
cy.waitForElement('[data-cy="unmarkAsReservedItem"]');
|
||||||
|
cy.intercept('POST', '/Sales/reserve').as('reserveRequest');
|
||||||
cy.dataCy('unmarkAsReservedItem').click();
|
cy.dataCy('unmarkAsReservedItem').click();
|
||||||
|
cy.wait('@reserveRequest').its('response.statusCode').should('eq', 200);
|
||||||
|
|
||||||
cy.dataCy('ticketSaleReservedIcon').should('not.exist');
|
cy.dataCy('ticketSaleReservedIcon').should('not.exist');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue