Skip to content
This repository was archived by the owner on Sep 12, 2025. It is now read-only.

Commit 3e62021

Browse files
authored
Merge pull request #59 from t3n/webandco-master
Neos 5.0 Update
2 parents 7bba8b7 + 94b27b8 commit 3e62021

9 files changed

Lines changed: 174 additions & 133 deletions

File tree

Classes/Aspect/CollectDebugInformationAspect.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,12 @@ public function debuggingActive(): void
6262
public function addDebugValues(JoinPointInterface $joinPoint): string
6363
{
6464
$startRenderAt = microtime(true) * 1000;
65-
$output = $joinPoint->getAdviceChain()->proceed($joinPoint);
6665
$endRenderAt = microtime(true) * 1000;
66+
$output = $joinPoint->getAdviceChain()->proceed($joinPoint);
67+
68+
if ($output instanceof \GuzzleHttp\Psr7\Response) {
69+
$output = $output->getBody()->getContents();
70+
}
6771

6872
$data = [
6973
'startRenderAt' => $startRenderAt,

Resources/Public/Script/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ window.__enable_neos_debug__ = (setCookie = false) => {
44
}
55

66
if (setCookie) {
7-
document.cookie = '__neos_debug__=true';
7+
document.cookie = '__neos_debug__=true;path=/';
88
}
99

1010
console.log('%c Starting Neos Debug Tool ... ', 'color: white; background: #f9423a; line-height: 20px; font-weight: bold');
@@ -397,7 +397,7 @@ window.__enable_neos_debug__ = (setCookie = false) => {
397397
infoVisible && infoElements.forEach(e => e.hide());
398398
listVisible && cacheTable.hide();
399399
window.__enable_neos_debug__.active = false;
400-
document.cookie = '__neos_debug__=; expires=Thu, 01 Jan 1970 00:00:00 UTC;';
400+
document.cookie = '__neos_debug__=; expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/';
401401
console.log('%c Closing Neos Debug Tool> ', 'color: white; background: #f9423a; line-height: 20px; font-weight: bold');
402402
});
403403

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"license": "MIT",
55
"type": "neos-package",
66
"require": {
7-
"neos/neos": "~3.3.0 || ~4.0"
7+
"neos/neos": "~3.3.0 || ~4.0 || ~5.0"
88
},
99
"autoload": {
1010
"psr-4": {

composer.json.ci

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"bin-dir": "bin"
77
},
88
"require": {
9-
"neos/neos": "~4.3.0",
10-
"neos/nodetypes": "~4.3.0",
11-
"neos/demo": "^5.0",
12-
"neos/buildessentials": "~5.3.0",
9+
"neos/neos": "^5.1",
10+
"neos/nodetypes": "^5.1",
11+
"neos/demo": "^6.1",
12+
"neos/buildessentials": "^6.1",
1313
"t3n/neos-debug": "@dev",
1414
"t3n/coding-standard": "~1.0.0"
1515
},
Lines changed: 29 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,55 @@
11
/// <reference types="Cypress" />
22
/// <reference types="Cypress-testing-library" />
33

4-
describe('debug console can be used at all', () => {
5-
it('console can be opened and closed', () => {
4+
describe("debug console can be used at all", () => {
5+
it("console can be opened and closed", () => {
66
// the console is not there yet+
7-
cy.visit('/')
8-
.queryByText(/render time/i)
9-
.should('not.exist');
7+
cy.visit("/")
8+
.queryByText(/cache \(/i)
9+
.should("not.exist");
1010

1111
// bring up the console
1212
cy.openConsole()
13-
.queryByText(/render time/i)
14-
.should('exist')
13+
.queryByText(/cache \(/i)
14+
.should("exist")
1515
.queryByText(/close/i)
16-
.should('exist');
16+
.should("exist");
1717

1818
// close it
1919
cy.window()
2020
.queryByText(/close/i)
2121
.click()
22-
.queryByText(/render time/i)
23-
.should('not.exist');
22+
.queryByText(/cache \(/i)
23+
.should("not.exist");
2424
});
2525

26-
it('cookie can be set so console stays on a refresh', () => {
27-
cy.visit('/')
28-
.queryByText(/render time/i)
29-
.should('not.exist');
26+
it("cookie can be set so console stays on a refresh", () => {
27+
cy.visit("/")
28+
.queryByText(/cache \(/i)
29+
.should("not.exist");
3030

3131
// bring up the console
3232
cy.openConsole(true)
33-
.queryByText(/render time/i)
34-
.should('exist')
35-
.getCookie('__neos_debug__')
36-
.should('have.property', 'value')
37-
.should('eq', 'true')
38-
.queryByText(/render time/i)
39-
.should('exist');
33+
.queryByText(/cache \(/i)
34+
.should("exist")
35+
.getCookie("__neos_debug__")
36+
.should("have.property", "value")
37+
.should("eq", "true");
4038
});
4139

42-
it('debug console opens when the cookie is set', () => {
43-
cy.setCookie('__neos_debug__', 'true')
44-
.visit('/')
45-
.queryByText(/render time/i);
40+
it("debug console opens when the cookie is set", () => {
41+
cy.setCookie("__neos_debug__", "true")
42+
.visit("/")
43+
.queryByText(/cache \(/i)
44+
.should("exist");
4645
});
4746

48-
it('closing the console will also delete the cooke', () => {
49-
cy.setCookie('__neos_debug__', 'true')
50-
.visit('/')
47+
it("closing the console will also delete the cooke", () => {
48+
cy.setCookie("__neos_debug__", "true")
49+
.visit("/")
5150
.queryByText(/close/i)
5251
.click()
53-
.getCookie('__neos_debug__')
54-
.should('eq', null);
52+
.getCookie("__neos_debug__")
53+
.should("eq", null);
5554
});
5655
});

e2e/cypress/support/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// <reference types="Cypress" />
22
// <reference types="Cypress-testing-library" />
33

4-
import '@testing-library/cypress/add-commands';
5-
import './commands';
4+
import "@testing-library/cypress/add-commands";
5+
import "./commands";

e2e/cypress/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"baseUrl": "../node_modules",
55
"target": "es5",
66
"lib": ["es5", "dom"],
7-
"types": ["cypress", "cypress-testing-library"]
7+
"types": ["cypress", "@types/testing-library__cypress"]
88
},
99
"include": ["**/*.ts"]
1010
}

0 commit comments

Comments
 (0)