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

cannot find invisibleElements typing in #1018

Open
1 task
albion9919 opened this issue Sep 19, 2024 · 1 comment
Open
1 task

cannot find invisibleElements typing in #1018

albion9919 opened this issue Sep 19, 2024 · 1 comment
Assignees

Comments

@albion9919
Copy link

albion9919 commented Sep 19, 2024

Verify latest release

  • I verified that the issue exists in the latest Hermione release

Hermione version

[email protected]

Last Hermione version that worked

[email protected]

Which area(s) of Hermione are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

NDA

Reproduction steps

install testplane with typescript and try

await this.browser.assertView('..., '...', {
...
invisibleElements: ['...'],
});

Actual Behavior

After migrating from hermione@8 to tesplane faced some problem with typings:

Typescript shows, that invisibleElements is not defined on assertView

await this.browser.assertView('..., '...', {
                invisibleElements: ['...'],
});

But tesplane works line invisibleElements are used.

We create patch for typings:

diff --git a/build/src/config/types.d.ts b/build/src/config/types.d.ts
index........ ...
--- a/build/src/config/types.d.ts
+++ b/build/src/config/types.d.ts
@@ -13,6 +13,12 @@ export interface BuildDiffOptsConfig {
     ignoreCaret: boolean;
 }
 export interface AssertViewOptsConfig {
+    /**
+     * DOM-node selectors which will be ignored (painted with a black rectangle) when comparing images.
+     *
+     * @defaultValue `[]`
+     */
+    invisibleElements: string | Array<string>;
     /**
      * DOM-node selectors which will be ignored (painted with a black rectangle) when comparing images.
      *
  1. Is it really bug in typings ?
  2. can you fix this ❤️ ?

Expected Behavior

No typing error

Which Node.js version are you using?

20.11.0

@shadowusr shadowusr self-assigned this Sep 19, 2024
@shadowusr
Copy link
Member

shadowusr commented Sep 19, 2024

Hey!

We don't have invisibleElements option. We have ignoreElements and it's present in typings. You might be referring to https://github.com/ruslanxdev/hermione-assert-view-extended package which does have this option, but it's not ours and we don't support it.

If Testplane's built-in ignoreElements option doesn't fit your use-case and you need invisibleElements specifically you can describe your use-case and we can consider implementing this as a feature request.

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

2 participants