Skip to content

Commit

Permalink
[1755] Put back page object
Browse files Browse the repository at this point in the history
  • Loading branch information
avinhurry committed Jul 10, 2024
1 parent 16b35ab commit 9a9981f
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions spec/support/page_objects/publish/course_requirement_edit.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# frozen_string_literal: true

require_relative '../sections/error_link'
require_relative '../sections/copy_content'

module PageObjects
module Publish
class CourseRequirementEdit < PageObjects::Base
set_url '/publish/organisations/{provider_code}/{recruitment_cycle_year}/courses/{course_code}/requirements'

sections :errors, Sections::ErrorLink, '.govuk-error-summary__list li>a'

element :copy_content_warning, '[data-qa="copy-course-warning"]'
element :personal_qualities, '#publish-course-requirement-form-personal-qualities-field'
element :other_requirements, '#publish-course-requirement-form-other-requirements-field'
element :use_content, '[data-qa="course__use_content"]'

section :copy_content, Sections::CopyContent

element :submit, 'button.govuk-button[type="submit"]'

def error_messages
errors.map(&:text)
end
end
end
end

0 comments on commit 9a9981f

Please sign in to comment.