Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a1555f1
fix(cypress): adjust task timeout and enhance logging for teardown pr…
martinjagodic Mar 5, 2026
3e8f9bc
Merge branch 'main' into cypress-teardown
yanthomasdev Mar 5, 2026
5f5cbb1
Apply suggestion from @yanthomasdev
martinjagodic Mar 6, 2026
75beb08
fix(cypress): enhance logging and improve API request timeouts in git…
martinjagodic Mar 6, 2026
0b1476a
fix(cypress): enhance logging for media upload and test setup processes
martinjagodic Mar 6, 2026
ff008ee
fix(cypress): adjust timeout settings and refine clock handling in tests
martinjagodic Mar 6, 2026
421a590
fix(cypress): remove unnecessary logging from uploadMediaFile and bef…
martinjagodic Mar 6, 2026
723b1ef
fix(cypress): remove unnecessary logging, fix format in media library…
martinjagodic Mar 6, 2026
b3052f3
fix(cypress): refactor API request handling and enhance logging in te…
martinjagodic Mar 6, 2026
d976e62
fix(cypress): streamline API calls by combining fetch functions
martinjagodic Mar 6, 2026
3dc3577
fix(cypress): increase retry delay in waitForDeploys function and imp…
martinjagodic Mar 6, 2026
a748cc1
fix(cypress): optimize element selection by using aliases
martinjagodic Mar 6, 2026
cb3ab69
fix(cypress): enhance logging for better traceability during tests an…
martinjagodic Mar 6, 2026
c804cbb
fix(cypress): enhance logging in test lifecycle hooks and improve err…
martinjagodic Mar 9, 2026
17b2a48
fix(cypress): improve logging during media file upload and enhance er…
martinjagodic Mar 9, 2026
a005532
fix(cypress): streamline logging in media library and login functions…
martinjagodic Mar 9, 2026
d679f64
fix(cypress): reduce logging in beforeEach and remove unnecessary log…
martinjagodic Mar 9, 2026
08cde46
fix(gitGateway): make fetchWithTimeout handle full URLs, remove wrapp…
martinjagodic Mar 9, 2026
b220729
fix(cypress): enhance logging in media library tests and utility func…
martinjagodic Mar 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
env:
CI_BUILD_ID: ${{ github.run_id }}-${{ github.run_attempt }}
IS_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true || github.repository_owner != 'decaporg' }}
# Only used for fork PRs (can't access CYPRESS_RECORD_KEY)
MACHINE_INDEX: ${{ matrix.machine }}
MACHINE_COUNT: 4
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
Expand Down
8 changes: 7 additions & 1 deletion cypress/e2e/common/spec_utils.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const before = (taskResult, options, backend) => {
Cypress.config('taskTimeout', 7 * 60 * 1000);
Cypress.config('taskTimeout', 5 * 60 * 1000); // 5 minutes
cy.task('setupBackend', { backend, options }).then(data => {
taskResult.data = data;
Cypress.config('defaultCommandTimeout', data.mockResponses ? 5 * 1000 : 1 * 60 * 1000);
Expand Down Expand Up @@ -36,11 +36,17 @@ export const afterEach = (taskResult, backend) => {
const spec = Cypress.mocha.getRunner().suite.ctx.currentTest.parent.title;
const testName = Cypress.mocha.getRunner().suite.ctx.currentTest.title;

console.log(`Starting teardown for: ${spec} - ${testName}`);
const startTime = Date.now();

cy.task('teardownBackendTest', {
backend,
...taskResult.data,
spec,
testName,
}).then(() => {
const duration = Date.now() - startTime;
console.log(`Teardown completed in ${duration}ms for: ${spec} - ${testName}`);
});

if (!process.env.RECORD_FIXTURES) {
Expand Down
4 changes: 3 additions & 1 deletion cypress/run.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ async function runCypress() {
const machineCount = Number(process.env.MACHINE_COUNT || 0);
const isFork = process.env.IS_FORK === 'true';

console.log(`IS_FORK: ${isFork}, MACHINE_INDEX: ${machineIndex}, MACHINE_COUNT: ${machineCount}`);

if (isFork && machineIndex && machineCount) {
const specsPerMachine = Math.floor(specs.length / machineCount);
const start = (machineIndex - 1) * specsPerMachine;
Expand Down Expand Up @@ -58,7 +60,7 @@ async function runCypress() {
await execa('cypress', args, {
stdio: 'inherit',
preferLocal: true,
timeout: 60 * 60 * 1000, // 1 hour
timeout: 30 * 60 * 1000, // 30 minutes
});
}

Expand Down
Loading