Commit 711137cb by Aman Sharma

Added first e2e test

parent 0247105d
{
"name": "rails_react_recipe",
"private": true,
"scripts": {
"test": "jest",
"test-watch": "jest --watch"
},
"dependencies": {
"@babel/preset-react": "^7.10.4",
"@rails/webpacker": "4.3.0",
......@@ -16,5 +20,10 @@
"devDependencies": {
"jest": "^26.4.2",
"webpack-dev-server": "^3.11.0"
},
"jest": {
"roots": [
"test/javascript"
]
}
}
require "rails_helper"
RSpec.feature "Application Running", :type => :feature do
scenario "Application should run respond to view recipe button" do
visit "/"
click_button "View Recipes"
expect(page).to have_text("Recipes for every occasion")
end
describe "GET '/' - from API", :type => :feature do
it 'checks the application renders or not' do
visit('http://localhost:3000/')
expect(page.title).to eq("RailsReactRecipe")
end
end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment