mirror of
https://github.com/we-promise/sure.git
synced 2026-04-08 06:44:52 +00:00
Added a sleep delay to ensure the AI Assistant is properly disabled before asserting the path and user state. Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
22 lines
445 B
Ruby
22 lines
445 B
Ruby
require "application_system_test_case"
|
|
|
|
class Settings::AiPromptsTest < ApplicationSystemTestCase
|
|
setup do
|
|
@user = users(:family_admin)
|
|
@user.update!(ai_enabled: true)
|
|
login_as @user
|
|
end
|
|
|
|
test "user can disable ai assistant" do
|
|
visit settings_ai_prompts_path
|
|
|
|
click_button "Disable AI Assistant"
|
|
|
|
sleep 5
|
|
|
|
assert_current_path settings_ai_prompts_path
|
|
@user.reload
|
|
assert_not @user.ai_enabled?
|
|
end
|
|
end
|