Skip to content

Commit

Permalink
Display search_type for change_logs, too
Browse files Browse the repository at this point in the history
  • Loading branch information
ngiger committed Dec 7, 2015
1 parent a1350c3 commit 990905a
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 6 deletions.
23 changes: 23 additions & 0 deletions spec/smoketest_spec.rb
Expand Up @@ -323,6 +323,29 @@ def check_nutriflex_56091(text)
expect(diffFiles.size).to eq(1)
end unless ['just-medical'].index(Flavor)

def check_search_with_type
query = @browser.text_field(:name, "search_query")
expect(query.exists?).to eq true
search_type = @browser.select_list(:name, "search_type")
expect(search_type.exists?).to eq true
end

it "should display search and search_type for fachinfo diff of 28.11.2015" do
diff_url = "/show/fachinfo/#{SNAP_IKSNR}/diff/28.11.2015"
@browser.goto(OddbUrl + '/de/gcc' + diff_url)
check_search_with_type
end

it "should display search and search_type for fachinfo diff" do
diff_url = "/show/fachinfo/#{SNAP_IKSNR}/diff"
@browser.goto(OddbUrl + '/de/gcc' + diff_url)
check_search_with_type
link = @browser.link(:name, "change_log")
expect(link.exists?).to eq true
link.click
check_search_with_type
end

after :all do
@browser.close
end
Expand Down
2 changes: 0 additions & 2 deletions spec/snapback_spec.rb
Expand Up @@ -25,8 +25,6 @@
end

SnapbackTestStep = Struct.new(:line, :search_type, :search_value, :link_to_click, :expect_url, :expect_snapback_text, :next_step)
SNAP_IKSNR = 40501
SNAP_NAME = 'Lubex®'
Search_URL= /search_query\/#{SNAP_IKSNR}|de\/gcc$|home_drugs\/$|#{OddbUrl}\/$/
Search_Snap = /Sie befinden sich in - ,Home,#{SNAP_IKSNR},\d{2},\d{3}/
Search_SnapBack = /Suchresultat|Home/
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -65,6 +65,8 @@
ViewerUser = 'info@desitin.ch'
ViewerPassword = 'desitin'
LeeresResult = /hat ein leeres Resultat/
SNAP_IKSNR = 40501
SNAP_NAME = 'Lubex®'

def setup_browser
return if @browser
Expand Down
6 changes: 2 additions & 4 deletions src/view/drugs/fachinfo_change_logs.rb
Expand Up @@ -122,6 +122,7 @@ def get_link_href(model)
end
end
class FachinfoDocumentChangelogsComposite < HtmlGrid::Composite
LEGACY_INTERFACE = false
CSS_CLASS = 'composite'
COMPONENTS = {
[0,0] => FachinfoDocumentChangelogList,
Expand All @@ -133,11 +134,8 @@ def initialize(model, session, container)
end
end
class FachinfoDocumentChangelogs < View::PrivateTemplate
SEARCH_HEAD = View::SelectSearchForm
CONTENT = View::Drugs::FachinfoDocumentChangelogsComposite
def initialize(model, session, container=nil)
# latest changes must come first!
super
end
def backtracking(model, session=@session)
class_name = "th-pointersteps"
fields = []
Expand Down

0 comments on commit 990905a

Please sign in to comment.