<commit_before>scope do

  setup do
    login_user!
    load_default_space_and_app
    @app.health_with(1, 0)
  end

  test 'Given I have a space called development and I have an app called lolmaster' +
       'there I should be able to see its details' do
    find("#app-details-#{@app.guid}").click
    assert_app_details @app
  end

  test 'Given I have an app I should be able to see its stats' do
    find("#app-details-#{@app.guid}").click
    expected_cpu_usage  = req.cpu_usage(@app.stats['0'][:stats][:usage][:cpu])
    expected_mem_usage  = req.to_megabytes(@app.stats['0'][:stats][:usage][:mem])
    expected_disk_usage = req.to_megabytes(@app.stats['0'][:stats][:usage][:disk])
    expected_uptime     = req.human_time(@app.stats['0'][:stats][:uptime])
    within('#app-stats') do
      assert find('.cpu-usage').text == expected_cpu_usage
      assert find('.mem-usage').text == expected_mem_usage
      assert find('.disk-usage').text == expected_disk_usage
      assert find('.uptime').text == expected_uptime
      assert find('.instance-state').text == @app.stats['0'][:state]
    end

  end

  test 'Given I have an app I should be able to see its health as 100% when all instances are running' do
    find("#app-details-#{@app.guid}").click
    assert find('#current-health')['value'] == "100"
  end

end<commit_msg>App test descriptions refactored<commit_after>scope do

  setup do
    login_user!
    load_default_space_and_app
    @app.health_with(1, 0)
  end


  # Context: Seeing an app from developemnt space
  test 'I visit the lolmaster app details' do
    find("#app-details-#{@app.guid}").click
    assert_app_details @app
  end

  test 'I see the stats of an app' do
    find("#app-details-#{@app.guid}").click
    expected_cpu_usage  = req.cpu_usage(@app.stats['0'][:stats][:usage][:cpu])
    expected_mem_usage  = req.to_megabytes(@app.stats['0'][:stats][:usage][:mem])
    expected_disk_usage = req.to_megabytes(@app.stats['0'][:stats][:usage][:disk])
    expected_uptime     = req.human_time(@app.stats['0'][:stats][:uptime])
    within('#app-stats') do
      assert find('.cpu-usage').text == expected_cpu_usage
      assert find('.mem-usage').text == expected_mem_usage
      assert find('.disk-usage').text == expected_disk_usage
      assert find('.uptime').text == expected_uptime
      assert find('.instance-state').text == @app.stats['0'][:state]
    end

  end

  test 'I see the health of an app as 100 when all instances are up' do
    find("#app-details-#{@app.guid}").click
    assert find('#current-health')['value'] == "100"
  end

end
{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.010061919504643963, 'mean_word_length': 3.8408239700374533, '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': '3010542', 'n_tokens_mistral': 871, 'n_tokens_neox': 845, 'n_words': 198}