Simplify long test titles

This commit is contained in:
Javi Martín
2023-07-18 23:33:19 +02:00
parent 07e1f92dd5
commit 03fa5fc8d6
14 changed files with 22 additions and 22 deletions

View File

@@ -27,7 +27,7 @@ describe RemoteTranslations::Microsoft::Client do
end
context "when characters from request are greater than characters limit" do
it "response has the expected result when the request has 2 texts, where both less than CHARACTERS_LIMIT_PER_REQUEST" do
it "has the expected result when the request has two texts and both are smaller than the limit" do
stub_const("RemoteTranslations::Microsoft::Client::CHARACTERS_LIMIT_PER_REQUEST", 20)
text_en = Faker::Lorem.characters(number: 11)
another_text_en = Faker::Lorem.characters(number: 11)
@@ -49,7 +49,7 @@ describe RemoteTranslations::Microsoft::Client do
expect(result).to eq([translated_text_es, another_translated_text_es])
end
it "response has the expected result when the request has 2 texts and both are greater than CHARACTERS_LIMIT_PER_REQUEST" do
it "has the expected result when the request has two texts and both are greater than the limit" do
stub_const("RemoteTranslations::Microsoft::Client::CHARACTERS_LIMIT_PER_REQUEST", 20)
start_text_en = Faker::Lorem.characters(number: 10) + " "
end_text_en = Faker::Lorem.characters(number: 10)

View File

@@ -1311,7 +1311,7 @@ describe Budget::Investment do
end
describe "check_for_reclassification" do
it "stores reclassfied votes and removes actual votes if an investment has been reclassified" do
it "removes votes and stores reclassfied votes if an investment has been reclassified" do
investment = create(:budget_investment, :selected, heading: heading1)
3.times { create(:user, ballot_lines: [investment]) }
@@ -1326,7 +1326,7 @@ describe Budget::Investment do
expect(Budget::ReclassifiedVote.count).to eq(3)
end
it "does not store reclassified votes nor remove actual votes if the investment has not been reclassifed" do
it "does not remove votes nor store reclassified votes if the investment has not been reclassifed" do
investment = create(:budget_investment, :selected, heading: heading1)
3.times { create(:user, ballot_lines: [investment]) }

View File

@@ -135,7 +135,7 @@ describe Tenant do
expect { Tenant.resolve_host("www.consul.dev") }.to raise_exception(Apartment::TenantNotFound)
end
it "raises an exception when accessing a hidden tenant with a domain and another tenant resolves to the same domain" do
it "raises an exception with a hidden tenant's domain when another tenant resolves to the same domain" do
insert(:tenant, :domain, schema: "saturn.consul.dev", hidden_at: Time.current)
insert(:tenant, schema: "saturn")

View File

@@ -33,7 +33,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
expect(page).not_to have_selector "#new_image_link"
end
scenario "Should update nested image file name after choosing any file" do
scenario "Should update image file name after choosing any file" do
do_login_for user, management: management
visit send(path, arguments)
@@ -43,7 +43,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
expect(page).to have_selector ".file-name", text: "clippy.jpg"
end
scenario "Should update nested image file title with file name after choosing a file when no title defined" do
scenario "Should update image file title after choosing a file when no title is defined" do
do_login_for user, management: management
visit send(path, arguments)
@@ -52,7 +52,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
expect_image_has_title("clippy.jpg")
end
scenario "Should not update nested image file title with file name after choosing a file when title already defined" do
scenario "Should not update image file title after choosing a file when a title is already defined" do
do_login_for user, management: management
visit send(path, arguments)
@@ -112,7 +112,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
expect(cached_attachment_field.value).to be_empty
end
scenario "Should show nested image errors after invalid form submit" do
scenario "Should show image errors after invalid form submit" do
do_login_for user, management: management
visit send(path, arguments)
@@ -137,7 +137,7 @@ shared_examples "nested imageable" do |imageable_factory_name, path, imageable_p
expect(page).to have_css "img[src$='clippy.jpg']"
end
scenario "Should remove nested image after valid file upload and click on remove button" do
scenario "Should remove image after valid file upload and click on remove button" do
do_login_for user, management: management
visit send(path, arguments)

View File

@@ -88,7 +88,7 @@ describe "Admin shifts", :admin do
end
end
scenario "Vote Collection Shift and Recount & Scrutiny Shift don't include already assigned dates to officer" do
scenario "Vote Collection Shift and Recount & Scrutiny Shift don't include already assigned dates" do
poll = create(:poll)
booth = create(:poll_booth, polls: [poll])
officer = create(:poll_officer)

View File

@@ -123,7 +123,7 @@ describe "Commenting Budget::Investments" do
expect(c2.body).to appear_before(c3.body)
end
scenario "Creation date works differently in roots and in child comments, when sorting by confidence_score" do
scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do
old_root = create(:comment, commentable: investment, created_at: Time.current - 10)
new_root = create(:comment, commentable: investment, created_at: Time.current)
old_child = create(:comment, commentable: investment, parent_id: new_root.id, created_at: Time.current - 10)

View File

@@ -139,7 +139,7 @@ describe "Commenting debates" do
expect(c2.body).to appear_before(c3.body)
end
scenario "Creation date works differently in roots and in child comments, even when sorting by confidence_score" do
scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do
old_root = create(:comment, commentable: debate, created_at: Time.current - 10)
new_root = create(:comment, commentable: debate, created_at: Time.current)
old_child = create(:comment, commentable: debate, parent_id: new_root.id, created_at: Time.current - 10)

View File

@@ -120,7 +120,7 @@ describe "Commenting legislation questions" do
expect(c2.body).to appear_before(c3.body)
end
scenario "Creation date works differently in roots and in child comments, even when sorting by confidence_score" do
scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do
old_root = create(:comment, commentable: annotation, created_at: Time.current - 10)
new_root = create(:comment, commentable: annotation, created_at: Time.current)
old_child = create(:comment, commentable: annotation, parent_id: new_root.id, created_at: Time.current - 10)

View File

@@ -125,7 +125,7 @@ describe "Commenting legislation questions" do
expect(c2.body).to appear_before(c3.body)
end
scenario "Creation date works differently in roots and in child comments, even when sorting by confidence_score" do
scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do
old_root = create(:comment, commentable: question, created_at: Time.current - 10)
new_root = create(:comment, commentable: question, created_at: Time.current)
old_child = create(:comment, commentable: question, parent_id: new_root.id, created_at: Time.current - 10)

View File

@@ -117,7 +117,7 @@ describe "Commenting polls" do
expect(c2.body).to appear_before(c3.body)
end
scenario "Creation date works differently in roots and in child comments, when sorting by confidence_score" do
scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do
old_root = create(:comment, commentable: poll, created_at: Time.current - 10)
new_root = create(:comment, commentable: poll, created_at: Time.current)
old_child = create(:comment, commentable: poll, parent_id: new_root.id, created_at: Time.current - 10)

View File

@@ -119,7 +119,7 @@ describe "Commenting proposals" do
expect(c2.body).to appear_before(c3.body)
end
scenario "Creation date works differently in roots and in child comments, when sorting by confidence_score" do
scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do
old_root = create(:comment, commentable: proposal, created_at: Time.current - 10)
new_root = create(:comment, commentable: proposal, created_at: Time.current)
old_child = create(:comment, commentable: proposal, parent_id: new_root.id, created_at: Time.current - 10)

View File

@@ -126,7 +126,7 @@ describe "Commenting topics from proposals" do
expect(c2.body).to appear_before(c3.body)
end
scenario "Creation date works differently in roots and in child comments, when sorting by confidence_score" do
scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do
community = proposal.community
topic = create(:topic, community: community)
old_root = create(:comment, commentable: topic, created_at: Time.current - 10)
@@ -673,7 +673,7 @@ describe "Commenting topics from budget investments" do
expect(c2.body).to appear_before(c3.body)
end
scenario "Creation date works differently in roots and in child comments, when sorting by confidence_score" do
scenario "Creation date works differently in roots and child comments when sorting by confidence_score" do
community = investment.community
topic = create(:topic, community: community)
old_root = create(:comment, commentable: topic, created_at: Time.current - 10)

View File

@@ -44,7 +44,7 @@ describe "DocumentVerifications" do
expect(page).to have_content "This document is not registered"
end
scenario "Verifying a user which does exists in the census but not in the db redirects allows sending an email" do
scenario "Verifying a user who exists in the census but not in the db allows sending an email" do
login_as_manager
visit management_document_verifications_path
fill_in "document_verification_document_number", with: "12345678Z"

View File

@@ -411,7 +411,7 @@ describe "Users" do
expect(page).to have_field "Email", with: "manuelacarmena@example.com"
end
scenario "Try to register with the email of an already existing user, when no email was provided by oauth" do
scenario "Try to register with an existing email, when no email was provided by oauth" do
create(:user, username: "peter", email: "manuela@example.com")
OmniAuth.config.add_mock(:twitter, twitter_hash)
@@ -448,7 +448,7 @@ describe "Users" do
expect(page).to have_field "Email", with: "somethingelse@example.com"
end
scenario "Try to register with the email of an already existing user, when an unconfirmed email was provided by oauth" do
scenario "Try to register with an existing email, when an unconfirmed email was provided by oauth" do
create(:user, username: "peter", email: "manuelacarmena@example.com")
OmniAuth.config.add_mock(:twitter, twitter_hash_with_email)