這是一個Rspec功能。 given (:send_selector){ 'button.confirm'}
feature "when talent has not applied." do
given (:apply_button) { find('button[data-selector="offer-apply-button"]') }
before(:each)
我想測試一下,當用戶點擊一個鏈接時,下載一個PDF文件。 it 'downloads a PDF', :js do
find("a.btn", text: %r{Download}i).trigger 'click'
expect(page.response_headers['Content-Type']).to eq "application/pdf"
end
這與 e
我遇到了錯誤,在特性測試中使用Rspec,水豚和Poltergeist測試我的Braintree沙箱支付。我已經設置完成了人類在開發過程中所做的事情(輸入付款信息並單擊提交)。它在開發中工作正常。然而,當我跑我的天賦,我得到的支付頁面上的JavaScript錯誤在加載時: Capybara::Poltergeist::JavascriptError:
One or more errors