require'rails_helper'feature'Admin disables 2FA for a user',feature: truedoscenario'successfully',js: truedologin_as(:admin)user=create(:user,:two_factor)edit_user(user)page.within('.two-factor-status')doclick_link'Disable'endpage.within('.two-factor-status')doexpect(page).tohave_content'Disabled'expect(page).not_tohave_button'Disable'endendscenario'for a user without 2FA enabled'dologin_as(:admin)user=create(:user)edit_user(user)page.within('.two-factor-status')doexpect(page).not_tohave_button'Disable'endenddefedit_user(user)visitadmin_user_path(user)endend