webdriverio-community / wdio-vscode-service

A service to test VSCode extensions from end to end using WebdriverIO
https://webdriverio-community.github.io/wdio-vscode-service/
MIT License
33 stars 28 forks source link

CodeLens page object only supports one CodeLense per row/group #68

Open jeffb-sfdc opened 1 year ago

jeffb-sfdc commented 1 year ago

Our extension implements a few code lenses, and most of our code lens providers emit two code lenses per provider.

(eg a single row with "Run code | Debug code")

(also, for clarity, I'm referring to each link ("Run code" or "Debug code") as a separate code lens, not "Run code | Debug code" as a single code lens)

The CodeLens class (in TextEditor.ts) only returns the first anchor tag when getText() is called. This is because elem.$('a') is called instead of elem.$$('a'), and the page object definition for a CodeLens assumes there is only one code lens in the code lens's container.

    async getText (): Promise<string> {
        const link = await this.elem.$('a')
        return link.getText()
    }
christian-bromann commented 1 year ago

Thanks for reporting!

Any contributions that resolves the bug are highly appreciated. Don't expect this to be picked up by active contributors as they have their own priorities. If you depend on this bug to be fixed, your contribution is required. Please take a look into our contribution guidelines or join our Discord development server and let us know if you have any questions. Cheers!