feat: add interactive VK goal calculator
This commit is contained in:
1 parent
d672a4ddfe
commit
70560664dc
2 files changed
+71
-2
No files matched your search
@@ -334,6 +334,23 @@ class VkConversationTests(unittest.TestCase):
|
||||
labels = [button["action"]["label"] for row in inspection.keyboard_for(505)["buttons"] for button in row]
|
||||
self.assertIn("Без ресурсов", labels)
|
||||
|
||||
def test_goal_calculator_is_available_from_vk_menu_and_is_interactive(self):
|
||||
dialog = BelkiDialog()
|
||||
menu = dialog.keyboard_for(901)
|
||||
labels = [button["action"]["label"] for row in menu["buttons"] for button in row]
|
||||
self.assertIn("Калькулятор цели", labels)
|
||||
|
||||
self.assertIn("баллов", dialog.handle(901, "/цель").lower())
|
||||
dialog.handle(901, "10")
|
||||
dialog.handle(901, "34")
|
||||
dialog.handle(901, "20")
|
||||
self.assertIn("самостоятель", dialog.handle(901, "ЛУ").lower())
|
||||
dialog.handle(901, "сам")
|
||||
confirmation = dialog.handle(901, "1")
|
||||
self.assertIn("Осталось добрать: 24", confirmation)
|
||||
self.assertIn("подтвердить", confirmation.lower())
|
||||
self.assertIn("Нужно заходов: 6", dialog.handle(901, "да"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user