IS
Size: a a a
IS
BO
AP
AP
AP
Error retrieving a new session from the selenium server
Connection refused! Is selenium server started?
{
state: 'unhandled error',
sessionId: null,
hCode: 15075763,
value: {
localizedMessage: 'Connection refused: connect',
cause: null,
suppressed: [],
message: 'Connection refused: connect',
hCode: 5731972,
class: 'java.net.ConnectException',
screen: null
},
class: 'org.openqa.selenium.remote.Response',
status: 13
}
BO
BO
AP
m
m
OK
m
m
OK
m
PS
PS
AV
mockState={
offer: {
vsu: 38000,
options: {
cycleTheft: {
check: false,
amount: 1,
}
}
}
как бы для переиспользования.mockStateAmount200={
...mockState,
offer: {
...mockState.offer,
options: {
...mockState.offer.options,
cycleTheft:{
...mockState.offer.options.cycleTheft,
amount : 200 // наконец-то!
}
}
}
}
вместо чего-нить прямолинейного:mockStateAmount200=mockState
mockStateAmount200.offer.options.cycleTheft.amount=200
AV
BO
mockState={
offer: {
vsu: 38000,
options: {
cycleTheft: {
check: false,
amount: 1,
}
}
}
как бы для переиспользования.mockStateAmount200={
...mockState,
offer: {
...mockState.offer,
options: {
...mockState.offer.options,
cycleTheft:{
...mockState.offer.options.cycleTheft,
amount : 200 // наконец-то!
}
}
}
}
вместо чего-нить прямолинейного:mockStateAmount200=mockState
mockStateAmount200.offer.options.cycleTheft.amount=200
function deepCopy<T extends object>(source: T): T {
return JSON.parse(JSON.stringify(source))
}
....
mockStateAmount200=deepCopy(mockState)
mockStateAmount200.offer.options.cycleTheft.amount=200