<commit_before>require "selenium-webdriver"
require 'json'

require_relative '../../utils/sli_utils.rb'


Given /^I am a valid SLC Operator$/ do
  @user = 'slcoperator' # an :operator
  @pass = '<PASSWORD>'
end

Given /^I am a valid Super Administrator$/ do
  @user = 'daybreaknorealmadmin' # a :super_admin
  @pass = '<PASSWORD>'
end

When /^I try to authenticate on the Application Approval Tool$/ do
  # NOTE approval tool and registration tool share the same url
  step "I hit the Application Registration Tool URL"
  step "I login"
end

When /^I try to authenticate on the Application Registration Tool$/ do
  step "I hit the Application Registration Tool URL"
  step "I login"
end

When /^I try to authenticate on the Application Authorization Tool$/ do
  step "I hit the Admin Application Authorization Tool"
  step "I login"
end

When /^I try to authenticate on the Role Mapping Tool$/ do
  step "I navigate to the Complex-Configurable Role Mapping Page"
  step "I login"
end

And /^I login$/ do
  step "I was redirected to the \"Simple\" IDP Login page"
  step "I submit the credentials \"#@user\" \"#@pass\" for the \"Simple\" login page"
end

Then /^the api should generate a (\d+) error$/ do |arg1|
  puts @driver.current_url
  assert(@driver.current_url.end_with?("api/rest/saml/sso/post"), "Should have gotten an error")
end
<commit_msg>Making sure selenium sees 500 error from API<commit_after>require "selenium-webdriver"
require 'json'

require_relative '../../utils/sli_utils.rb'


Given /^I am a valid SLC Operator$/ do
  @user = 'slcoperator' # an :operator
  @pass = '<PASSWORD>'
end

Given /^I am a valid Super Administrator$/ do
  @user = 'daybreaknorealmadmin' # a :super_admin
  @pass = '<PASSWORD>'
end

When /^I try to authenticate on the Application Approval Tool$/ do
  # NOTE approval tool and registration tool share the same url
  step "I hit the Application Registration Tool URL"
  step "I login"
end

When /^I try to authenticate on the Application Registration Tool$/ do
  step "I hit the Application Registration Tool URL"
  step "I login"
end

When /^I try to authenticate on the Application Authorization Tool$/ do
  step "I hit the Admin Application Authorization Tool"
  step "I login"
end

When /^I try to authenticate on the Role Mapping Tool$/ do
  step "I navigate to the Complex-Configurable Role Mapping Page"
  step "I login"
end

And /^I login$/ do
  step "I was redirected to the \"Simple\" IDP Login page"
  step "I submit the credentials \"#@user\" \"#@<PASSWORD>\" for the \"Simple\" login page"
end

Then /^the api should generate a (\d+) error$/ do |arg1|
  sleep 1
  puts @driver.current_url
  assert(@driver.current_url.end_with?("api/rest/saml/sso/post"), "Should have gotten an error")
end

{'fraction_non_alphanumeric': 0.10331029465260094, 'fraction_numerical': 0.0021826118588577663, 'mean_word_length': 3.841549295774648, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, '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': '1571075', 'n_tokens_mistral': 894, 'n_tokens_neox': 842, 'n_words': 379}