Skip to content

playwright fixtures nested objects unused-class-members #268

@vethman

Description

@vethman

What happened?

#246 was fixed, but I am using a style of fixture with nested properties. That is not working for unused class members

Reproduction

Follow this example of playwright:
https://playwright.dev/docs/auth#testing-multiple-roles-with-pom-fixtures

I have my classes in separate files.

My fixture has nested objects. So instead of

// Declare the types of your fixtures.
type MyFixtures = {
  adminPage: AdminPage;
  userPage: UserPage;
};

I have

// Declare the types of your fixtures.
type MyFixtures = {
  pages: {
    adminPage: AdminPage;
    userPage: UserPage;
  }
};

In the end the methods of your POM classes will be reported as dead code

Expected behavior

I do not expect the methods to be reported as unused class members

Fallow version

2.63.0

Operating system

Windows

Configuration

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions