Unify expectations on spec components folder
In this PR (https://github.com/consul/consul/pull/4683) a new syntax was introduced in the component specs to check that the component was not rendering. It seems interesting to add this syntax to the rest of the cases and thus unify the way we check that a component is not rendering.
This commit is contained in:
@@ -49,7 +49,7 @@ describe Admin::Budgets::DurationComponent do
|
||||
|
||||
render Admin::Budgets::DurationComponent.new(durable).duration
|
||||
|
||||
expect(page.text).to be_empty
|
||||
expect(page.native.inner_html).to be_empty
|
||||
end
|
||||
|
||||
it "is not defined when no start date is defined" do
|
||||
@@ -57,7 +57,7 @@ describe Admin::Budgets::DurationComponent do
|
||||
|
||||
render Admin::Budgets::DurationComponent.new(durable).duration
|
||||
|
||||
expect(page.text).to be_empty
|
||||
expect(page.native.inner_html).to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -6,8 +6,7 @@ describe Admin::BudgetsWizard::Headings::GroupSwitcherComponent do
|
||||
|
||||
render_inline Admin::BudgetsWizard::Headings::GroupSwitcherComponent.new(group)
|
||||
|
||||
expect(page.text).to be_empty
|
||||
expect(page).not_to have_css ".budget-group-switcher"
|
||||
expect(page.native.inner_html).to be_empty
|
||||
end
|
||||
|
||||
it "renders a link to switch group for budgets with two groups" do
|
||||
|
||||
Reference in New Issue
Block a user