Last active
December 20, 2015 19:49
-
-
Save cpjolicoeur/6186032 to your computer and use it in GitHub Desktop.
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
<div class="auth-nav"> | |
<div> | |
<div class="account-bar"> | |
<div class="account-list"> | |
<img class="arrow right" src="/assets/arrow-down.png" alt="Show More"> | |
<div class="account-name current-account">MojoTech</div> | |
</div> | |
<div class="cf"></div> | |
</div> | |
<div class="drop-down" style="display: none;"> | |
<img class="top-arrow" src="/assets/accounts-list-top.png" alt="Accounts"> | |
<div class="all-accounts"> | |
<div class="item"> | |
<a href="/accounts/86">Angel Marketing</a> | |
</div> | |
<div class="item logout"> | |
<a href="/users/sign_out" data-method="delete" rel="nofollow">Sign Out</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> |
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
class AuthNav < Dill::Widget | |
root '.auth-nav' | |
widget :account_name, '.account_name' | |
widget :account_list, '.all-accounts', Dill::List do | |
item '.item' | |
end | |
def select_account(name) | |
widget(:account_list).items.find { |i| i == name }.click | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment