注册用户然后访问带有系统测试的帐户页面?

Sign up user and then visit account page with system tests?

如果我没理解错的话,以如下形式创建用户不会在数据库中创建记录。

我想按照以下步骤创建系统测试:
1. 报名表格
2. 访问账户页面
3.更新账户信息

什么技术可以实现上述场景?

within 'form#t-signup-form' do
    fill_in 'first_name', with: 'Eve'
    fill_in 'last_name', with: 'Farmer'
    fill_in 'email', with: 'eve@example.com'
    fill_in 'password', with: 'Something'
    find('button').click
end

用户记录是否实际提交到数据库取决于您是否使用事务测试。如果您正在使用事务测试,那么记录实际上不会被提交,但这无关紧要,因为(如果配置正确)您的测试和应用程序中的所有内容都应该访问相同的预提交事务,因此会看到记录。要按照您的要求去做,您只需做

visit signup_path #whatever is the correct route to the page with the signup form
within '#t-signup-form' do
  fill_in 'first_name', with: 'Eve'
  fill_in 'last_name', with: 'Farmer'
  fill_in 'email', with: 'eve@example.com'
  fill_in 'password', with: 'Something'
  find('button').click
end
assert_content('You are signed up!') # assert for visible change in page that indicates signup has succeeded
visit account_path # route to whatever page you want to go to
... # do whatever actions are required to update the account