From 748075d5e2bfa5be901a8340767a22cfe8224d78 Mon Sep 17 00:00:00 2001 From: Kyle Macpherson Date: Wed, 22 Nov 2017 10:30:26 +0000 Subject: [PATCH] Refactor audit content item page object Refactor audit content item page object to query elements by data-test-id. Add data-test-id attributes to free text questions dynamically. Add data-test-id attributes to boolean questions dynamically. Add data-test-id attributes to elements in the audits/show view. --- .../audits/audits/_boolean_question.html.erb | 2 +- .../audits/_free_text_question.html.erb | 2 +- app/views/audits/audits/show.html.erb | 34 ++++++------ .../audit_content_item_page.rb | 54 +++++++++---------- 4 files changed, 47 insertions(+), 45 deletions(-) diff --git a/app/views/audits/audits/_boolean_question.html.erb b/app/views/audits/audits/_boolean_question.html.erb index 055920cb8..cd561dd6f 100644 --- a/app/views/audits/audits/_boolean_question.html.erb +++ b/app/views/audits/audits/_boolean_question.html.erb @@ -1,4 +1,4 @@ -
+

<%= question %>

diff --git a/app/views/audits/audits/_free_text_question.html.erb b/app/views/audits/audits/_free_text_question.html.erb index 46b439e39..85f749db6 100644 --- a/app/views/audits/audits/_free_text_question.html.erb +++ b/app/views/audits/audits/_free_text_question.html.erb @@ -1,6 +1,6 @@ diff --git a/app/views/audits/audits/show.html.erb b/app/views/audits/audits/show.html.erb index dcf3ae310..4e84b82c4 100644 --- a/app/views/audits/audits/show.html.erb +++ b/app/views/audits/audits/show.html.erb @@ -1,6 +1,6 @@
<% if flash.notice %> -