Skip to content

Commit

Permalink
Create shared_examples for *_new and *_discover buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
Attila Vecerek committed Feb 17, 2017
1 parent 0b6e704 commit afbed58
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
shared_examples_for 'a _new or _discover button' do
describe '#visible?' do
context 'when button present on a sublist view screen of a CI' do
let(:lastaction) { 'show' }
%w(main vms instances all_vms).each do |display|
context "and display == #{display}" do
let(:display) { display }
it { expect(subject.visible?).to be_truthy }
end
context 'and display is sublist-like' do
it { expect(subject.visible?).to be_falsey }
end
end
end
end
end

0 comments on commit afbed58

Please sign in to comment.