Skip to content

Commit

Permalink
fix(e2e): fix placeholder matching rn e2e android (#5793)
Browse files Browse the repository at this point in the history
  • Loading branch information
thaddmt authored Sep 11, 2024
1 parent ac6f63b commit 7b4d97f
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/e2e/detox/integration/common/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,18 @@ Then(
);

Then('I see placeholder {string}', async (placeholder: string) => {
await expect(element(by.text(placeholder))).toExist();
const emailField = element(
by.id('authenticator__text-field__input-username')
);
await expect(emailField).toExist();
const attributes = await emailField.getAttributes();
if ((attributes as Detox.ElementAttributes).placeholder) {
if ((attributes as any).placeholder !== placeholder) {
throw new Error(
`No element found with placeholder value: ${placeholder}`
);
}
}
});

Then(
Expand Down

0 comments on commit 7b4d97f

Please sign in to comment.