This commit is contained in:
Emily Rohrbough
2022-09-15 15:41:24 -05:00
parent 294fb860c0
commit b0c8bc5c0e
2 changed files with 2 additions and 25 deletions

View File

@@ -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]

View File

@@ -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)