From 5af8bdc51b49c0beae49c970c360023061834c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nora=20Bend=C3=A9?= Date: Tue, 1 Mar 2022 20:57:51 -0800 Subject: [PATCH] Change the text displayed on the checks page Rather than a link that says "Visit Trello", we'll instead link the check name, e.g. "Cards in Inbox". --- .env.test | 1 + .tool-versions | 2 ++ app/views/checks/_list.html.haml | 4 +--- list.md | 7 +++++++ spec/system/check_counts/new_spec.rb | 9 ++++++--- 5 files changed, 17 insertions(+), 6 deletions(-) create mode 100644 .tool-versions create mode 100644 list.md diff --git a/.env.test b/.env.test index 9da0d289..8db05b56 100644 --- a/.env.test +++ b/.env.test @@ -3,3 +3,4 @@ GITHUB_EMAIL=test@notice.zone GITHUB_PASSWORD=whocaresthiswon'tbeused GITHUB_CLIENT_ID=trash GITHUB_CLIENT_SECRET=alsotrash +LMKW_TRELLO_DEVELOPER_PUBLIC_KEY=trash \ No newline at end of file diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 00000000..aeef26c5 --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +postgres 10.18 +ruby 3.1.0 diff --git a/app/views/checks/_list.html.haml b/app/views/checks/_list.html.haml index 0b428f38..c0ea90e3 100644 --- a/app/views/checks/_list.html.haml +++ b/app/views/checks/_list.html.haml @@ -8,11 +8,9 @@ %span.check-value.target-value= check.target_value %h3 = icon(*check.icon, class: "fa-lg") - = check.name - %p - options = check.manual? ? {} : { target: :_blank, rel: :noreferrer } = link_to(check.url, options) do - visit #{check.service} + = check.name %span.fas.fa-external-link-alt .card-actions - params = { check: { refresh: true } } diff --git a/list.md b/list.md new file mode 100644 index 00000000..516aad44 --- /dev/null +++ b/list.md @@ -0,0 +1,7 @@ +* fix automated tests + * automated tests verify whether code works + * +* fix linters +* fork repo +* push up branch +* make pull request \ No newline at end of file diff --git a/spec/system/check_counts/new_spec.rb b/spec/system/check_counts/new_spec.rb index 012dcff1..1587be27 100644 --- a/spec/system/check_counts/new_spec.rb +++ b/spec/system/check_counts/new_spec.rb @@ -3,8 +3,10 @@ require "rails_helper" RSpec.describe "check_counts/new", type: :system, js: true do - def user_creates_count - click_link("visit manual") + def user_creates_count(check) + # binding.pry + click_link(check.name) + # click_link("Manual Check 100") fill_in(:Value, with: 10) @@ -15,6 +17,7 @@ def user_creates_count check = create(:manual_check) sign_in(default_user) - expect { user_creates_count }.to activate_check(check.name).in(page) + expect { user_creates_count(check) } + .to activate_check(check.name).in(page) end end