Proposal: Add a group to commands for nicer command logging
I've been playing around with ways of defining reusable helpers (blog post coming) and have been using the Cypress log API and passing `{ log: false }` to allow control of the log output of these helpers/commands. This has been useful, but there are some times that I want to dive into that abstraction (most likely on failure) to see what step of the helper failed. I think a concept of a `group` would be useful here. Instead of passing `{ log: false }` to every encapsulated command, having a group would help a lot more ### Current behavior: ```js // This will work on https://github.com/cypress-io/cypress-example-todomvc export const createTodo = (name) => { const log = Cypress.log({ name: 'createTodo', message: name, consoleProps() { return { 'Inserted Todo': name, } } }) cy.get('.new-todo', { log: false }).type(`${name}{enter}`, { log: false }) return cy .get('.todo-list li', { log: false }) .contains('li', name.trim(), { log: false }) .then(($el) => { log.set({ $el }).snapshot().end() }) } // to use this helper: createTodo('Learn the Cypress Log API') .then(console.log) // logs the created todo element from the TodoMVC Cypress example ``` Screenshot of the above: <img width="548" alt="screen shot 2018-02-06 at 12 30 46 am" src="https://user-images.githubusercontent.com/338257/35846734-1052101e-0ad5-11e8-80e7-a498151f74e5.png"> ### Proposed behavior: ```js export const createTodo = (name) => { const g
Posted by NicholasBoll on Feb 6, 2018, 7:45 AM
Tags
Related issues
- [Meta] Feedback on granular control over Copilot changes
- unexpected status 401 Unauthorized issue
- [MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
- [CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
- Video stops playing after some minutes
- [MODEL] Claude verbose code comments by default — ignores instructions to stop.
Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments
github (Software)
[Meta] Feedback on granular control over Copilot changes
unexpected status 401 Unauthorized issue
[MODEL] Measurable quality regression in Claude generation 5 (Fable 5 / Opus 5 / Sonnet 5): worse nonsense detection, ~2x verbosity, under-disclosed model fallb
[CRITICAL] Subagent spawning and subagent pattern bugs trigger infinite recursion, infinite token usage, grossly inefficient token usage, and lost accumulated s
Video stops playing after some minutes
[MODEL] Claude verbose code comments by default — ignores instructions to stop.
Scope Codex VS Code chats to the current workspace/project
Update on "Co-authored-by: Copilot" in commit messages
Proposal: Add a group to commands for nicer command logging
I've been playing around with ways of defining reusable helpers (blog post coming) and have been using the Cypress log API and passing `{ log: false }` to allow control of the log output of these helpers/commands. This has been useful, but there are some times that I want to dive into that abstraction (most likely on failure) to see what step of the helper failed. I think a concept of a `group` would be useful here. Instead of passing `{ log: false }` to every encapsulated command, having a group would help a lot more ### Current behavior: ```js // This will work on https://github.com/cypress-io/cypress-example-todomvc export const createTodo = (name) => { const log = Cypress.log({ name: 'createTodo', message: name, consoleProps() { return { 'Inserted Todo': name, } } }) cy.get('.new-todo', { log: false }).type(`${name}{enter}`, { log: false }) return cy .get('.todo-list li', { log: false }) .contains('li', name.trim(), { log: false }) .then(($el) => { log.set({ $el }).snapshot().end() }) } // to use this helper: createTodo('Learn the Cypress Log API') .then(console.log) // logs the created todo element from the TodoMVC Cypress example ``` Screenshot of the above: <img width="548" alt="screen shot 2018-02-06 at 12 30 46 am" src="https://user-images.githubusercontent.com/338257/35846734-1052101e-0ad5-11e8-80e7-a498151f74e5.png"> ### Proposed behavior: ```js export const createTodo = (name) => { const g
Comments (0)
No comments yet. Start the discussion.