Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ids to buttons to make e2e testing easier #92

Closed
Shelob9 opened this issue Sep 27, 2022 · 1 comment
Closed

Add ids to buttons to make e2e testing easier #92

Shelob9 opened this issue Sep 27, 2022 · 1 comment

Comments

@Shelob9
Copy link
Collaborator

Shelob9 commented Sep 27, 2022

I'm struggling to click "Grant Example Support Access" and "Revoke Access" buttons. Would be way easier if they had ids I could target.

@zackkatz Those buttons are created here, right?

client/src/Admin.php

Lines 396 to 419 in 7c4a9a2

<div class="tl-{{ns}}-auth tl-{{ns}}-{{has_access_class}}">
{{header}}
<section class="tl-{{ns}}-auth__body">
<h2 class="tl-{{ns}}-auth__intro">{{intro}}</h2>
<div class="tl-{{ns}}-auth__content">
<header class="tl-{{ns}}-auth__header">
{{auth_header}}
</header>
<div class="tl-{{ns}}-auth__details">
{{details}}
</div>
<div class="tl-{{ns}}-auth__response" aria-live="assertive"></div>
{{notices}}
<div class="tl-{{ns}}-auth__actions">
{{button}}
</div>
</div>
<div class="tl-{{ns}}-auth__secured_by">{{secured_by_trustedlogin}}</div>
</section>
<footer class="tl-{{ns}}-auth__footer">
{{footer}}
{{reference}}
</footer>
</div>';

@Shelob9
Copy link
Collaborator Author

Shelob9 commented Sep 27, 2022

@Shelob9

  • Revoke access button:

    'revoke_access_button' => sprintf( '<a href="%s" class="button button-danger alignright">%s</a>', $revoke_url, esc_html__( 'Revoke Access', 'trustedlogin' ) ),

  • Generate access button

    'button' => $this->generate_button( 'size=hero&class=authlink button-primary', false ),

I asked Shawn if he had a better solution, he agreed with this solution

Shelob9 added a commit to Shelob9/client that referenced this issue Sep 27, 2022
Shelob9 added a commit to Shelob9/client that referenced this issue Sep 27, 2022
zackkatz added a commit that referenced this issue Sep 30, 2022
Add .tl-client-revoke-button to revoke button #92
@zackkatz zackkatz closed this as completed Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants