51 lines
1.2 KiB
Plaintext
51 lines
1.2 KiB
Plaintext
meta {
|
|
name: POST hotbar bind slot0 pulse (cast preset)
|
|
type: http
|
|
seq: 20
|
|
}
|
|
|
|
docs {
|
|
Full-collection order: run `Post move reset dev spawn before cast` (seq 15) first if the dev player was moved by earlier requests (e.g. gather near resource node).
|
|
Pre-request resets spawn so this folder stays valid even when global `seq` puts other requests (e.g. gather at seq 11) before seq 15.
|
|
}
|
|
|
|
script:pre-request {
|
|
const axios = require("axios");
|
|
const baseUrl = bru.getEnvVar("baseUrl") || bru.getVar("baseUrl");
|
|
const playerId = bru.getEnvVar("playerId") || bru.getVar("playerId");
|
|
await axios.post(
|
|
`${baseUrl}/game/players/${playerId}/move`,
|
|
{
|
|
schemaVersion: 1,
|
|
target: { x: -5, y: 0.9, z: -5 },
|
|
},
|
|
{ headers: { "Content-Type": "application/json" } },
|
|
);
|
|
}
|
|
|
|
post {
|
|
url: {{baseUrl}}/game/players/dev-local-1/hotbar-loadout
|
|
body: json
|
|
auth: none
|
|
}
|
|
|
|
body:json {
|
|
{
|
|
"schemaVersion": 1,
|
|
"slots": [
|
|
{
|
|
"slotIndex": 0,
|
|
"abilityId": "prototype_pulse"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
|
|
tests {
|
|
test("status 200 and updated", function () {
|
|
expect(res.getStatus()).to.equal(200);
|
|
const body = res.getBody();
|
|
expect(body.updated).to.equal(true);
|
|
});
|
|
}
|