Skip to content

Commit

Permalink
fix(testing): set waitForComponents to optional
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Apr 28, 2022
1 parent 8749f3a commit a1e33c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/testing/src/commands/custom/component.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { areComponentsReady, log, wrapOptions } from '../helpers'
Cypress.Commands.add(
'waitForComponents',
{
prevSubject: 'element',
prevSubject: 'optional',
},
(subject, options?: Partial<Cypress.Loggable>) => {
log('waitForComponents', '', subject, options)
const o = wrapOptions(options)
return cy
.wrap(subject, o)
.then(($el: any) => areComponentsReady($el))
.wrap(subject, o)
.wrap(subject, o) as any
},
)

Expand Down
1 change: 0 additions & 1 deletion packages/testing/src/commands/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ export const wrapCommand = (
.wrapComponent(element as any, { log: false })
.find(selector, { log: false })
.then($el => {
console.log($el)
Cypress.log({
type: 'parent',
$el,
Expand Down

0 comments on commit a1e33c7

Please sign in to comment.