Skip to content

Commit

Permalink
Fix al-kharid gate integration tests (#571)
Browse files Browse the repository at this point in the history
* Fix al-kharid gate integration tests

Note: integration tests don't run on PR's from forks as they don't have the AWS secret for the cache download.

* Fix dangerous character warning
  • Loading branch information
GregHib authored Dec 28, 2024
1 parent 6c7b669 commit 5ae1b8f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-with-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
- 'main'
- 'release/**'
pull_request:
branches:
- 'main'
env:
CACHE_VERSION: 1.2.0
jobs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import world.gregs.voidps.network.login.protocol.visual.update.player.EquipSlot
import world.gregs.voidps.type.Tile
import world.gregs.voidps.type.setRandom
import world.gregs.voidps.world.script.*
import kotlin.test.assertFalse
import kotlin.test.assertTrue

internal class LumbridgeBeginnerTasksTest : WorldTest() {
Expand Down Expand Up @@ -528,7 +529,7 @@ internal class LumbridgeBeginnerTasksTest : WorldTest() {
}

@Test
fun `Capital Protection, What?`() {
fun `Capital Protection, What`() {
val player = createPlayer("adventurer", Tile(3228, 3254))
player.levels.set(Skill.Smithing, 7)
player.inventory.add("bronze_bar", "bronze_bar", "hammer")
Expand Down Expand Up @@ -781,8 +782,9 @@ internal class LumbridgeBeginnerTasksTest : WorldTest() {
}

@Test
fun `Passing Out`() {
fun `Passing Out with money`() {
val player = createPlayer("adventurer", Tile(3267, 3227))
player.inventory.add("coins", 10)

val guard = npcs[Tile(3267, 3226)].first { it.id == "border_guard_al_kharid" }
player.npcOption(guard, "Talk-to")
Expand All @@ -794,6 +796,21 @@ internal class LumbridgeBeginnerTasksTest : WorldTest() {
assertTrue(player["passing_out_task", false])
}

@Test
fun `Passing Out without money`() {
val player = createPlayer("adventurer", Tile(3267, 3227))
player.inventory.add("coins", 9)

val guard = npcs[Tile(3267, 3226)].first { it.id == "border_guard_al_kharid" }
player.npcOption(guard, "Talk-to")
tick()
player.dialogueContinue(2)
player.dialogueOption("line1")
player.dialogueContinue()

assertFalse(player["passing_out_task", false])
}

@Test
fun `What is This Place`() {
val player = createPlayer("adventurer", Tile(3104, 9571))
Expand Down

0 comments on commit 5ae1b8f

Please sign in to comment.