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 PNPM_HOME="/pnpm"
|
||||
ENV PATH="$PNPM_HOME:$PATH"
|
||||
|
||||
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 && \
|
||||
apt-get -y --fix-missing upgrade && \
|
||||
|
@ -32,7 +32,6 @@ COPY \
|
|||
pnpm-lock.yaml \
|
||||
./
|
||||
|
||||
# Verifica si node_modules existe; si no, instala dependencias
|
||||
RUN if [ ! -d "node_modules" ]; then \
|
||||
pnpm install; \
|
||||
fi && \
|
||||
|
@ -40,13 +39,17 @@ RUN if [ ! -d "node_modules" ]; then \
|
|||
npx cypress install
|
||||
|
||||
COPY \
|
||||
quasar.config.js \
|
||||
index.html \
|
||||
jsconfig.json \
|
||||
quasar.extensions.json \
|
||||
# .eslintignore \
|
||||
# .eslintrc.js \
|
||||
postcss.config.js \
|
||||
cypress.config.js \
|
||||
./
|
||||
|
||||
COPY src src
|
||||
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') {
|
||||
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'
|
||||
}
|
||||
}
|
||||
stage('Build Cypress') {
|
||||
steps {
|
||||
sh 'docker-compose -f docker-compose.e2e.yml build e2e'
|
||||
}
|
||||
}
|
||||
// stage('Build Cypress') {
|
||||
// steps {
|
||||
// sh 'docker-compose -f docker-compose.e2e.yml build e2e'
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
stage('Run E2E') {
|
||||
|
|
|
@ -18,7 +18,18 @@ export default defineConfig({
|
|||
videosFolder: 'test/cypress/videos',
|
||||
downloadsFolder: 'test/cypress/downloads',
|
||||
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,
|
||||
watchForFileChanges: true,
|
||||
reporter: 'cypress-mochawesome-reporter',
|
||||
|
|
|
@ -5,8 +5,10 @@ services:
|
|||
command: npx quasar serve --history --proxy ./proxy.mjs --hostname 127.0.0.1 --port 9000
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
dockerfile: ./Dockerfile.e2e
|
||||
network_mode: host
|
||||
volumes:
|
||||
- ./node_modules:/app/node_modules
|
||||
e2e:
|
||||
command: npx cypress run --browser chromium
|
||||
build:
|
||||
|
|
|
@ -76,7 +76,10 @@ describe('TicketSale', () => {
|
|||
selectFirstRow();
|
||||
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
||||
cy.waitForElement('[data-cy="markAsReservedItem"]');
|
||||
cy.intercept('POST', '/Sales/reserve').as('reserveRequest');
|
||||
cy.dataCy('markAsReservedItem').click();
|
||||
cy.wait('@reserveRequest').its('response.statusCode').should('eq', 200);
|
||||
|
||||
cy.dataCy('ticketSaleReservedIcon').should('exist');
|
||||
});
|
||||
|
||||
|
@ -84,7 +87,10 @@ describe('TicketSale', () => {
|
|||
selectFirstRow();
|
||||
cy.dataCy('ticketSaleMoreActionsDropdown').click();
|
||||
cy.waitForElement('[data-cy="unmarkAsReservedItem"]');
|
||||
cy.intercept('POST', '/Sales/reserve').as('reserveRequest');
|
||||
cy.dataCy('unmarkAsReservedItem').click();
|
||||
cy.wait('@reserveRequest').its('response.statusCode').should('eq', 200);
|
||||
|
||||
cy.dataCy('ticketSaleReservedIcon').should('not.exist');
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue