<commit_before>require File.join(File.dirname(__FILE__), 'spec_helper')

describe "Showing the workspace quickstart page" do
  before(:all) do
    login('edcadmin', 'secret')
    create_valid_user(:first_name => "Mary", :last_name => "Jane", :username => "MaryJane")
    create_valid_user(:first_name => "Peter", :last_name => "Parker", :username => "PeterParker")
    @user_id = User.find_by_username("PeterParker").id

    login('MaryJane', 'secret')

    visit("#/workspaces")
    wait_until { current_route == "/workspaces" && page.has_selector?("button[data-dialog=WorkspacesNew]") }
    click_button "Create Workspace"
    within("#facebox") do
        fill_in 'name', :with => "QuicklyStartedWorkspace"
        click_button "Create Workspace"
    end
    @workspace_id = Workspace.find_by_name("QuicklyStartedWorkspace").id<commit_msg>Add sleep 1 to integration test workspace_quickstart, to avoid flakes<commit_after>require File.join(File.dirname(__FILE__), 'spec_helper')

describe "Showing the workspace quickstart page" do
  before(:all) do
    login('edcadmin', 'secret')
    create_valid_user(:first_name => "Mary", :last_name => "Jane", :username => "MaryJane")
    create_valid_user(:first_name => "Peter", :last_name => "Parker", :username => "PeterParker")
    @user_id = User.find_by_username("PeterParker").id

    login('MaryJane', 'secret')

    visit("#/workspaces")
    wait_until { current_route == "/workspaces" && page.has_selector?("button[data-dialog=WorkspacesNew]") }
    click_button "Create Workspace"
    within("#facebox") do
        fill_in 'name', :with => "QuicklyStartedWorkspace"
        click_button "Create Workspace"
    end
    sleep 1
    @workspace_id = Workspace.find_by_name("QuicklyStartedWorkspace").id
{'fraction_non_alphanumeric': 0.14554794520547945, 'fraction_numerical': 0.001141552511415525, 'mean_word_length': 5.044827586206897, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, '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': '5822128', 'n_tokens_mistral': 583, 'n_tokens_neox': 547, 'n_words': 110}