This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
handle multiple selenium protocol versions for session-id (#164)
handle multiple selenium protocol versions for session-id
- Loading branch information
1 parent
414e6ce
commit b08087a
Showing
2 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { sessionIdFrom } from "./index"; | ||
|
||
it('handles old selenium protocol versions', () => { | ||
expect(sessionIdFrom({ | ||
response: { | ||
sessionId: 'session-1' | ||
} | ||
})).toBe('session-1') | ||
}); | ||
|
||
it('handles new selenium protocol versions', () => { | ||
expect(sessionIdFrom({ | ||
response: { | ||
value: { | ||
sessionId: 'session-2' | ||
} | ||
} | ||
})).toBe('session-2') | ||
}); | ||
|
||
it('handles wrong response as empty', () => { | ||
expect(sessionIdFrom({ | ||
response: { | ||
} | ||
})).toBe('') | ||
}); |