shipshapecode / shipshapecode/angular-shepherd

Add `attributes` on `StepOptionsButton`

オープン
#623 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
238
フォーク
50
平均マージ
1分
マージ済み PR(30日)
9

説明

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 ?

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず StepOptionsButton のエントリーポイントを特定し、ツアーボタンがどのように生成されるかをたどります。要求された attributes オプションがどのように表現されるべきかを確認し、そのうえで、ステップで指定された data-testid が生成されたボタンに現れること、および既存のボタンの動作が変わらないことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
機能追加
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。