<commit_before># -*- coding: utf-8 -*-
require 'spec_helper'

describe "Global assets javascript" do
  let(:user) { create(:user) }
  before(:each) do
    login(user.username, "") # Stubbed auth
  end

  it "should have injected the masthead", js: true do
    page.should have_selector('header#malmo-masthead')
  end

  it "should have a link to Our organization", js: true do
    page.should have_selector('#nav-our-organization', text: 'Vår kommun')
  end

  it "should have a link to the dashboard", js: true do
    page.should have_selector('#nav-dashboard', text: 'Min sida')
  end

  it "should have a form for employee search", js: true do
    find('#nav-search-trigger a').click
    page.should have_selector('#masthead-search-person')
  end

  it "should have a form for intranet search", js: true do
    find('#nav-search-trigger a').click
    page.should have_selector('#masthead-search-intranet')
  end
end<commit_msg>Update spec to match new masthead search<commit_after># -*- coding: utf-8 -*-
require 'spec_helper'

describe "Global assets javascript" do
  let(:user) { create(:user) }
  before(:each) do
    login(user.username, "") # Stubbed auth
  end

  it "should have injected the masthead", js: true do
    page.should have_selector('header#malmo-masthead')
  end

  it "should have a link to Our organization", js: true do
    page.should have_selector('#nav-our-organization', text: 'Vår kommun')
  end

  it "should have a link to the dashboard", js: true do
    page.should have_selector('#nav-dashboard', text: 'Min sida')
  end

  it "should have a form for employee search", js: true do
    find('#masthead-q-komin').click
    page.should have_selector('#masthead-search-person')
  end

  it "should have a form for intranet search", js: true do
    find('#masthead-q-komin').click
    page.should have_selector('#masthead-search-intranet')
  end
end
{'fraction_non_alphanumeric': 0.12346993081426291, 'fraction_numerical': 0.0010643959552953698, 'mean_word_length': 3.8578811369509043, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5090421', 'n_tokens_mistral': 606, 'n_tokens_neox': 587, 'n_words': 197}