-
Notifications
You must be signed in to change notification settings - Fork 357
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create shared_examples for *_new and *_discover buttons
- Loading branch information
Attila Vecerek
committed
Feb 17, 2017
1 parent
0b6e704
commit afbed58
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
spec/support/examples_group/shared_examples_for_new_or_discover_button.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |