mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-15 03:31:18 -06:00
fix
This commit is contained in:
@@ -184,26 +184,8 @@ export default class Attempt {
|
||||
return agent
|
||||
}
|
||||
|
||||
_addSession (props: CommandProps) {
|
||||
const updated = this._updateSession(props)
|
||||
|
||||
if (!updated) {
|
||||
const session = new Session({
|
||||
state: props.state,
|
||||
testCurrentRetry: props.testCurrentRetry || 0,
|
||||
testId: props.testId,
|
||||
id: props.id,
|
||||
name: props.message || '',
|
||||
status: props.renderProps?.status,
|
||||
isGlobalSession: props.renderProps?.isGlobalSession,
|
||||
})
|
||||
|
||||
this.sessions[props.id] = session
|
||||
}
|
||||
}
|
||||
|
||||
_updateSession (props: LogProps) {
|
||||
const session = this.sessions[props.id]
|
||||
_addSession (props: SessionProps) {
|
||||
const session = new Session(props)
|
||||
|
||||
this.sessions[props.id] = session
|
||||
}
|
||||
@@ -236,10 +218,6 @@ export default class Attempt {
|
||||
|
||||
this.commands.push(command)
|
||||
|
||||
if (props.name === 'session' && !props.displayName) {
|
||||
this._addSession(props)
|
||||
}
|
||||
|
||||
const hookIndex = _.findIndex(this.hooks, { hookId: command.hookId })
|
||||
|
||||
const hook = this.hooks[hookIndex]
|
||||
|
||||
@@ -20,7 +20,6 @@ describe('creates global session', () => {
|
||||
|
||||
it.only('restores global session', async () => {
|
||||
console.log('test two')
|
||||
cy.task('does_not_exist')
|
||||
cy.session('global_1', () => {})
|
||||
cy.login('global_1', true)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user