fix: refs #6695 update Cypress cache handling and increase wait timeout for elements
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
416916a92b
commit
0f5f5b847e
|
@ -109,7 +109,7 @@ pipeline {
|
|||
-e CI=true
|
||||
-e CYPRESS_CACHE_FOLDER=/root/.cache/Cypress
|
||||
""".stripIndent()) {
|
||||
sh 'ls -la /root/.cache/Cypress' // Verificar que el binario está disponible
|
||||
sh 'ls -la /root/.cache/Cypress' // Debug opcional
|
||||
sh 'pnpm exec cypress run --browser chromium'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,16 +3,20 @@ FROM alexmorenovn/vndev:latest
|
|||
WORKDIR /app
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
|
||||
# Instalamos las dependencias y descargamos Cypress
|
||||
# Instalamos dependencias y Cypress
|
||||
RUN pnpm install --frozen-lockfile \
|
||||
&& CYPRESS_CACHE_FOLDER=/root/.cache/Cypress pnpm exec cypress install
|
||||
&& pnpm exec cypress install
|
||||
|
||||
# Movemos la caché de Cypress al directorio raíz para evitar problemas de permisos
|
||||
RUN mkdir -p /root/.cache/Cypress \
|
||||
&& cp -r /home/node/.cache/Cypress/* /root/.cache/Cypress/
|
||||
# Verificamos dónde está instalada la caché de Cypress
|
||||
RUN echo "Cypress cache directory: $(pnpm exec cypress cache path)" \
|
||||
&& ls -la $(pnpm exec cypress cache path) || true
|
||||
|
||||
# Configuramos variables de entorno
|
||||
# Aseguramos que la caché esté en un lugar accesible
|
||||
ENV CYPRESS_CACHE_FOLDER=/root/.cache/Cypress
|
||||
ENV PATH="/root/.cache/Cypress/${CYPRESS_VERSION}/Cypress:${PATH}"
|
||||
RUN mkdir -p ${CYPRESS_CACHE_FOLDER} \
|
||||
&& if [ -d "/home/node/.cache/Cypress" ]; then cp -r /home/node/.cache/Cypress/* ${CYPRESS_CACHE_FOLDER}/; fi
|
||||
|
||||
# Configuramos la variable de entorno y el PATH
|
||||
ENV PATH="${CYPRESS_CACHE_FOLDER}:${PATH}"
|
||||
|
||||
WORKDIR /app
|
||||
|
|
|
@ -59,7 +59,7 @@ Cypress.Commands.add('login', (user) => {
|
|||
Cypress.Commands.add('domContentLoad', (element, timeout = 5000) => {
|
||||
cy.waitUntil(() => cy.document().then((doc) => doc.readyState === 'complete'));
|
||||
});
|
||||
Cypress.Commands.add('waitForElement', (element, timeout = 5000) => {
|
||||
Cypress.Commands.add('waitForElement', (element, timeout = 10000) => {
|
||||
cy.get(element, { timeout }).should('be.visible').and('not.be.disabled');
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue