Use labels to select filters in executions tests

This way we check there's a label associated to these fields.
This commit is contained in:
Javi Martín
2021-06-28 01:03:27 +02:00
parent d8d5b7f60a
commit ee4ef8d3a5

View File

@@ -70,7 +70,7 @@ describe "Executions" do
expect(page).to have_content("No winner investments in this state")
select "Executed (0)", from: "status"
select "Executed (0)", from: "Project's current state"
expect(page).to have_content("No winner investments in this state")
end
@@ -165,17 +165,17 @@ describe "Executions" do
expect(page).to have_content(investment1.title)
expect(page).to have_content(investment2.title)
select "Studying the project (1)", from: "status"
select "Studying the project (1)", from: "Project's current state"
expect(page).to have_content(investment1.title)
expect(page).not_to have_content(investment2.title)
select "Bidding (1)", from: "status"
select "Bidding (1)", from: "Project's current state"
expect(page).to have_content(investment2.title)
expect(page).not_to have_content(investment1.title)
select "Executing the project (0)", from: "status"
select "Executing the project (0)", from: "Project's current state"
expect(page).not_to have_content(investment1.title)
expect(page).not_to have_content(investment2.title)
@@ -194,10 +194,10 @@ describe "Executions" do
click_link "See results"
click_link "Milestones"
select "Studying the project (0)", from: "status"
select "Studying the project (0)", from: "Project's current state"
expect(page).not_to have_content(investment1.title)
select "Bidding (1)", from: "status"
select "Bidding (1)", from: "Project's current state"
expect(page).to have_content(investment1.title)
end
@@ -214,10 +214,10 @@ describe "Executions" do
click_link "See results"
click_link "Milestones"
select "Studying the project (1)", from: "status"
select "Studying the project (1)", from: "Project's current state"
expect(page).to have_content(investment1.title)
select "Bidding (0)", from: "status"
select "Bidding (0)", from: "Project's current state"
expect(page).not_to have_content(investment1.title)
end
@@ -240,27 +240,27 @@ describe "Executions" do
expect(page).to have_content(investment1.title)
expect(page).to have_content(investment2.title)
select "tag2 (2)", from: "milestone_tag"
select "tag2 (2)", from: "Milestone tag"
expect(page).to have_content(investment1.title)
expect(page).to have_content(investment2.title)
select "Studying the project (1)", from: "status"
select "Studying the project (1)", from: "Project's current state"
expect(page).to have_content(investment1.title)
expect(page).not_to have_content(investment2.title)
select "Bidding (1)", from: "status"
select "Bidding (1)", from: "Project's current state"
expect(page).not_to have_content(investment1.title)
expect(page).to have_content(investment2.title)
select "tag1 (1)", from: "milestone_tag"
select "tag1 (1)", from: "Milestone tag"
expect(page).not_to have_content(investment1.title)
expect(page).not_to have_content(investment2.title)
select "All (2)", from: "milestone_tag"
select "All (2)", from: "Milestone tag"
expect(page).not_to have_content(investment1.title)
expect(page).to have_content(investment2.title)