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 attributes on StepOptionsButton #623

Open
loriepisicchio opened this issue May 10, 2021 · 3 comments
Open

Add attributes on StepOptionsButton #623

loriepisicchio opened this issue May 10, 2021 · 3 comments

Comments

@loriepisicchio
Copy link

Hello !
I would like to be able to add a data-testid attribute on the generated buttons for the tour, in order to ease the E2E tests of my application.
My code would look like

        const steps: Step.StepOptions[] = [
            {
                id: TourService.STEP_0_WELCOME,
                text: `<h1>Welcome !</h1>
                        <div>Let us take you on a quick tour.</div>`,
                buttons: [
                    {
                        classes: 'tour-button-secondary',
                        text: 'Skip tutorial',
                        attributes: {'data-testid', 'tutorial-button-skip'},
                        action: skip,
                    },
                    {
                        classes: 'tour-button-primary',
                        text: 'Next',
                        attributes: {'data-testid', 'tutorial-button-next'},
                        action: next,
                    },
                ],
            },
         }

Do you think this is a feature you could add ?

@RobbieTheWagner
Copy link
Member

Hi @loriepisicchio, this seems like a good addition! I think this is something we would want to add in Shepherd itself. Would you be interested in submitting a PR for this?

@avramz
Copy link

avramz commented Oct 16, 2021

@rwwagner90 This one still up for grabs?

@RobbieTheWagner
Copy link
Member

@avramz yeah, but it would need to be done in Shepherd itself.

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

3 participants