From ab2d67c5d18ccf7a0406bd4ca56a4ed94bebd462 Mon Sep 17 00:00:00 2001 From: fumimowdan Date: Wed, 29 Nov 2023 13:26:41 +0000 Subject: [PATCH] Add `bin/smoke` Add basic smoke test --- .github/workflows/ci.yml | 2 +- bin/smoke | 8 ++++++++ spec/features/smoke_spec.rb | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100755 bin/smoke create mode 100644 spec/features/smoke_spec.rb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6f8e6f2..b917259b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - name: Copy env file run: cp .env.example .env - name: Run tests - run: bin/rspec + run: bin/rspec --tag ~smoke_test Lint: runs-on: ubuntu-latest diff --git a/bin/smoke b/bin/smoke new file mode 100755 index 00000000..a171bf01 --- /dev/null +++ b/bin/smoke @@ -0,0 +1,8 @@ +#!/usr/bin/env sh +# +# Application smoke test script +# + +set -e + +bundle exec rspec spec/features/smoke_spec.rb --tag smoke_test diff --git a/spec/features/smoke_spec.rb b/spec/features/smoke_spec.rb new file mode 100644 index 00000000..e5782d1a --- /dev/null +++ b/spec/features/smoke_spec.rb @@ -0,0 +1,8 @@ +require "rails_helper" + +RSpec.describe "Smoke test", smoke_test: true do + it "runs" do + visit(ENV.fetch("SMOKE_URL")) + expect(page).to have_text("Get an international relocation payment") + end +end