Use specified values to be sure they aren't empty

This commit is contained in:
Jean-Baptiste Bellet
2023-05-26 10:40:50 +02:00
parent a24604f146
commit 9e67bd5824

View File

@@ -751,7 +751,10 @@ describe '
end
context "when custom tab is already created" do
let(:custom_tab) { create(:custom_tab) }
let(:custom_tab) {
create(:custom_tab, title: "Custom tab title",
content: "Custom tab content")
}
before do
distributor1.update(custom_tab: custom_tab)
@@ -764,8 +767,8 @@ describe '
it "display the custom tab fields with the current values" do
expect(page).to have_checked_field "Create custom tab in shopfront"
expect(page).
to have_field "enterprise_custom_tab_attributes_title", with: custom_tab.title
expect(page).to have_content(custom_tab.content)
to have_field "enterprise_custom_tab_attributes_title", with: "Custom tab title"
expect(page).to have_content("Custom tab content")
end
it "can delete custom tab if uncheck the checkbox" do