IntersectMBO / govtool

🔩 GovTool and utilities monorepo.
https://preview.gov.tools
Apache License 2.0
10 stars 3 forks source link

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

Open kneerose opened 3 months ago

kneerose commented 3 months ago

Description:

DRep registration

image

image

image

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

pmbinapps commented 2 months ago

OK - found id:

Delegation Page: (Mention on https://github.com/IntersectMBO/govtool/issues/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 commented 2 months ago

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

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 commented 2 months ago

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 commented 2 months ago

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

kneerose commented 2 months ago

Hi @pmbinapps ,

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

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

pmbinapps commented 2 months ago

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

kneerose commented 2 months ago

Hey @Sworzen1

image

pmbinapps commented 2 months ago

NOT OK: bio-input is still not set @Sworzen1

Image

pmbinapps commented 2 months ago

OK NOW on dev-sancho with bio-input

Image

NabinKawan commented 2 months ago

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

kneerose commented 1 month ago

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 commented 3 weeks ago

@MSzalowski any update on this ?

kneerose commented 2 weeks ago

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
kneerose commented 1 week ago

@jdyczka any update on this?