This repository was archived by the owner on Jul 1, 2026. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbotSheetNames.test.ts
More file actions
71 lines (64 loc) · 3.16 KB
/
Copy pathbotSheetNames.test.ts
File metadata and controls
71 lines (64 loc) · 3.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import { describe, expect, it } from 'vitest'
import {
botEpBotStatusRowIndex,
botEpFarmingLevelRowIndex,
botEpLevelKeyFromAttribute,
botIdForSheetRow,
botIdFromSheetName,
botLabNameFromSheetName,
isBotEpBotStatusRow,
} from './botSheetNames'
describe('botSheetNames', () => {
it('maps bot block titles', () => {
expect(botIdFromSheetName('Flame Bot')).toBe('flame')
expect(botIdFromSheetName('Bot Bot')).toBe('botBot')
expect(botIdFromSheetName('Locked')).toBeNull()
expect(botIdFromSheetName('Unlocked')).toBeNull()
})
it('maps Locked/Unlocked and Sync to status rows 6/11/16/21/26', () => {
expect(botEpBotStatusRowIndex('flame')).toBe(6)
expect(botEpBotStatusRowIndex('thunder')).toBe(11)
expect(botEpBotStatusRowIndex('golden')).toBe(16)
expect(botEpBotStatusRowIndex('amplify')).toBe(21)
expect(botEpBotStatusRowIndex('botBot')).toBe(26)
expect(isBotEpBotStatusRow(6, 'flame')).toBe(true)
expect(isBotEpBotStatusRow(7, 'flame')).toBe(false)
})
it('maps column G farming rows to bot bands', () => {
expect(botEpFarmingLevelRowIndex('flame', 0)).toBe(3)
expect(botEpFarmingLevelRowIndex('flame', 4)).toBe(7)
expect(botEpFarmingLevelRowIndex('thunder', 0)).toBe(8)
expect(botEpFarmingLevelRowIndex('thunder', 4)).toBe(12)
expect(botEpFarmingLevelRowIndex('botBot', 4)).toBe(27)
expect(botIdForSheetRow(3)).toBe('flame')
expect(botIdForSheetRow(7)).toBe('flame')
expect(botIdForSheetRow(8)).toBe('thunder')
expect(botIdForSheetRow(12)).toBe('thunder')
expect(botIdForSheetRow(13)).toBe('golden')
expect(botIdForSheetRow(23)).toBe('botBot')
expect(botIdForSheetRow(2)).toBeNull()
expect(botIdForSheetRow(28)).toBeNull()
})
it('maps flame attributes including Wildfire and Damage R.', () => {
expect(botEpLevelKeyFromAttribute('flame', 'Damage')).toBe('flameBotDamageLevel')
expect(botEpLevelKeyFromAttribute('flame', 'Damage R.')).toBe('flameBotDamageReductionLevel')
expect(botEpLevelKeyFromAttribute('flame', 'Duration')).toBeNull()
expect(botEpLevelKeyFromAttribute('thunder', 'Duration')).toBe('thunderBotDurationLevel')
expect(botEpLevelKeyFromAttribute('flame', 'Wildfire')).toBe('flameBotBurningGroundLevel')
expect(botEpLevelKeyFromAttribute('flame', 'Locked')).toBeNull()
})
it('maps thunder Bonus to linger level', () => {
expect(botEpLevelKeyFromAttribute('thunder', 'Bonus')).toBe('thunderBotLingerLevel')
expect(botEpLevelKeyFromAttribute('thunder', 'Titan Shock')).toBe('thunderBotTitanShockLevel')
})
it('maps Bot Bot Maximum Power aliases', () => {
expect(botEpLevelKeyFromAttribute('botBot', 'Maximum Power')).toBe('botBotMaximumPowerLevel')
expect(botEpLevelKeyFromAttribute('botBot', 'Max Power')).toBe('botBotMaximumPowerLevel')
expect(botEpLevelKeyFromAttribute('botBot', 'Bot+')).toBe('botBotMaximumPowerLevel')
})
it('maps laboratory aliases', () => {
expect(botLabNameFromSheetName('Gold Bot - Duration')).toBe('Golden Bot - Duration')
expect(botLabNameFromSheetName('Flame Bot - Cooldown')).toBe('Flame Bot - Cooldown')
expect(botLabNameFromSheetName('Bot Bot - Duration')).toBe('Bot Bot - Duration')
})
})