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

[BUG] Missing Test IDs (Drep Directory) #1050

Closed
kneerose opened this issue May 17, 2024 · 14 comments · Fixed by #1082 or #1164
Closed

[BUG] Missing Test IDs (Drep Directory) #1050

kneerose opened this issue May 17, 2024 · 14 comments · Fixed by #1082 or #1164
Assignees
Labels
🐛 Bug Something isn't working

Comments

@kneerose
Copy link
Contributor

kneerose commented May 17, 2024

Description:

Missing Test Ids

Delegation Page: (Mention on #1038 )

  • signal-no-confidence-card.
  • abstain-delegation-card.

DRep registration

  • Incorrect Test ID Path on DRep Form: The test IDs for email-input and link-input are incorrectly placed. The data-testid should be inside the input tag.
<div data-testid="email-input" class="MuiInputBase-root MuiInputBase-colorPrimary css-1di96g7">
  <input id=":r16:" name="email" placeholder="john.smith@email.com" type="text" class="MuiInputBase-input css-mevgbx" value="" data-dashlane-rid="92c37e5aa4443fee" data-kwimpalastatus="alive" data-kwimpalaid="1715918960562-0" data-form-type="email">
</div>

The data-testid should be moved to the input tag for proper identification and testing.

  • Missing test ID for metadata URL (should be testId = metadata-url)

image

  • missing test-id on metadata-download-button

image

  • Missing test Id on DRep Card

    • DRep card -> test id = drep1qzw234c0ly8csamxf8hrhfahvzwpllh2ckuzzvl38d22wwxxquu-drep-card

    • voting power -> test id = voting-power

    • status -> test id = status

    • Delegated DRep card -> test id = drep14px384j0j20psnezaf95yppvsqh9hnu73yxpv87yugzujn97t9y-delegated-card

      image

  • Missing voting power test id on drep details

    image

  • Missing test IDs on edit DRep info

    • add-link-button for the "Add Link" button.
    • name-input for the name input field.
    • email-input for the email input field.
    • bio-input for the bio input field.
    • link-input for the link input field.

image

  • missing voting power test id on dashboard

    image

Important: Please ensure to add proper test IDs for all interactive elements to facilitate testing and automation.

@NabinKawan NabinKawan added the 🐛 Bug Something isn't working label May 17, 2024
@spannercode spannercode moved this to To do in Govtool all May 22, 2024
@Sworzen1 Sworzen1 moved this from To do to In progress in Govtool all May 23, 2024
@Sworzen1 Sworzen1 assigned Sworzen1 and unassigned MSzalowski May 23, 2024
@Sworzen1 Sworzen1 linked a pull request May 23, 2024 that will close this issue
5 tasks
@Sworzen1 Sworzen1 moved this from In progress to In review in Govtool all May 23, 2024
@github-project-automation github-project-automation bot moved this from In review to Done in Govtool all May 27, 2024
@Sworzen1 Sworzen1 moved this from Done to In QA in Govtool all May 27, 2024
@pmbinapps
Copy link
Contributor

pmbinapps commented May 29, 2024

OK - found id:

Delegation Page: (Mention on #1038 )

signal-no-confidence-card.
abstain-delegation-card.

FOUND
Element: DIV
data-testid: no-confidence-delegation-card

Element: DIV
data-testid: abstain-delegation-card

OK for DRep registration:
"email-input and link-input are incorrectly placed. The data-testid should be inside the input tag." - in input now

Element: INPUT
data-testid: drep-name-input

Element: INPUT
data-testid: email-input

Element: TEXTAREA
data-testid: bio-input

Element: P
data-testid: some-sentence-about-yourself-error

Element: INPUT
data-testid: link-1-input

OK - on Drep Registration - Download button:

Element: BUTTON
data-testid: metadata-download-button like this:

<button class="MuiButtonBase-root MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeMedium MuiButton-outlinedSizeMedium MuiButton-colorPrimary MuiButton-root MuiButton-outlined MuiButton-outlinedPrimary MuiButton-sizeMedium MuiButton-outlinedSizeMedium MuiButton-colorPrimary css-nkeny4" tabindex="0"

type="button" data-testid="metadata-download-button">

downloadtest.jsonld

@pmbinapps
Copy link
Contributor

OK for - Missing test Id on DRep Card

DRep card -> test id = drep1qzw234c0ly8csamxf8hrhfahvzwpllh2ckuzzvl38d22wwxxquu-drep-card

data-testid: drep1pzuxy8ukuvffjyyrdp8sxkzp3z8r57z5q0jtgxhwu3a22t9ppel-drep-card
jam-console-devtools.js:1

  • voting power -> test id = voting-power:

Element: P
data-testid: drep1qzts73jthmvqjee2m0x7jqm8snn0ycqxcduf9xqec2n3x3u6ge9-voting-power-label

Element: P
data-testid: drep1qzts73jthmvqjee2m0x7jqm8snn0ycqxcduf9xqec2n3x3u6ge9-voting-power

status -> test id = status

data-testid: drep1qzts73jthmvqjee2m0x7jqm8snn0ycqxcduf9xqec2n3x3u6ge9-st

Delegated DRep card -> test id = drep14px384j0j20psnezaf95yppvsqh9hnu73yxpv87yugzujn97t9y-delegated-card

Element: DIV
data-testid: drep1qzts73jthmvqjee2m0x7jqm8snn0ycqxcduf9xqec2n3x3u6ge9-delegated-card

@pmbinapps
Copy link
Contributor

pmbinapps commented May 29, 2024

OK NOW for Missing voting power test id on drep details

Element: P
data-testid: voting-power

OK - found :
Missing test IDs on edit DRep info

add-link-button for the "Add Link" button.
Element: BUTTON
jam-console-devtools.js:1 data-testid: add-link-button

name-input for the name input field.
Element: INPUT
data-testid: drep-name-input

email-input for the email input field.
Element: INPUT
data-testid: email-input

bio-input for the bio input field.
Element: TEXTAREA
data-testid: bio-input

link-input for the link input field.
Element: INPUT

OK for missing voting power test id on dashboard

Element: P
jam-console-devtools.js:1 data-testid: voting-power-chips-value

@pmbinapps
Copy link
Contributor

@kneerose found all mentioned test id - take look and let us know how they work

@pmbinapps pmbinapps reopened this May 29, 2024
@kneerose
Copy link
Contributor Author

kneerose commented May 31, 2024

Hi @pmbinapps ,

It seems like you've made changes to the test IDs for other components:

  • name-input is now drep-name-input
  • link-input is now link-number-input (with a number that increases when adding links)

While I appreciate the improvements, could you please avoid changing previously assigned test IDs? Our tests are failing because of these modifications.

@pmbinapps
Copy link
Contributor

@NabinKawan I guess there could be so duplicate, thus that change.
@Sworzen1 please correct if I'm wrong.

@github-project-automation github-project-automation bot moved this from In review to Done in Govtool all Jun 5, 2024
@Sworzen1 Sworzen1 moved this from Done to In QA in Govtool all Jun 5, 2024
@pmbinapps
Copy link
Contributor

OK NOW on dev-sancho with bio-input

Image

@NabinKawan
Copy link
Contributor

Hi @pmbinapps, Can we close this related issue after merging it into the test branch? We still cannot verify it.

@NabinKawan NabinKawan reopened this Jun 6, 2024
@pmbinapps pmbinapps moved this from In QA to In staging in Govtool all Jun 10, 2024
@MSzalowski MSzalowski moved this from In staging to Done in Govtool all Jun 13, 2024
@kneerose
Copy link
Contributor Author

kneerose commented Jun 20, 2024

Hello @pmbinapps ,

Some components still have missing test IDs. I have listed all the missing and incorrect test IDs below. Please confirm and update them accordingly.

  1. Edit dRep Info Information Storage Steps
    • Currently the submit button has testID continue-button which is not correct
    • I have mentioned the test IDs in the image below

Screenshot from 2024-06-20 13-04-12

  1. Missing test IDs on inProgress chip
    • Please add test IDs to all "In Progress" chips that will display while the transaction is in progress.

Screenshot from 2024-06-20 13-05-40

  1. Learn More Button
    • Make the test ID for the "Learn More" button unique.
    • Please ensure it on the connected and disconnected state

Screenshot from 2024-06-20 13-07-40

  1. Governance Action Provide Context Update
    • Some test IDs are missing or incorrect. Please review and update them.
    • Here instead of metadata-url-input undefinedinput is taking

Screenshot from 2024-06-20 12-55-35

@kneerose
Copy link
Contributor Author

@MSzalowski any update on this ?

@kneerose
Copy link
Contributor Author

kneerose commented Aug 2, 2024

The missing test IDs are crucial as they can make some tests flaky, especially the metadata button test for editDRep. Currently, we are locating the button by testId using page.getByRole("button", { name: ${newDRepName}.jsonld }).click();. If newDRepName has more characters than expected, it can cause the test to fail to locate the button.

image

Therefore, it is necessary to add test IDs to fix the flaky test. Here are some flaky tests related to this issue:

  1. Test Report 1
  2. Test Report 2
  3. Test Report 3

@MSzalowski MSzalowski assigned jdyczka and unassigned MSzalowski Aug 2, 2024
@MSzalowski MSzalowski moved this from Done to To do in Govtool all Aug 2, 2024
@kneerose
Copy link
Contributor Author

kneerose commented Aug 8, 2024

@jdyczka any update on this?

@jdyczka jdyczka moved this from To do to In review in Govtool all Aug 8, 2024
MSzalowski added a commit that referenced this issue Aug 14, 2024
@bosko-m bosko-m closed this as completed Aug 30, 2024
@github-project-automation github-project-automation bot moved this from In review to Done in Govtool all Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Something isn't working
Projects
Archived in project
8 participants