bito-code-review[bot] commented on PR #41999:
URL: https://github.com/apache/superset/pull/41999#issuecomment-4958161275
<!-- Bito Reply -->
The flagged issue is correct. Using `any` for the `page` parameter bypasses
TypeScript's type checking, which is discouraged in the project's standards. To
resolve this, you should replace `any` with the `Page` type imported from
`@playwright/test`.
Here is the corrected helper function:
```typescript
import { Page } from '@playwright/test';
async function findDatasetIdByName(page: Page, name: string):
Promise<number> {
const rison = `(filters:!((col:table_name,opr:eq,value:'${name}')))`;
const resp = await page.request.get(`api/v1/dataset/?q=${rison}`);
// ... rest of the function
}
```
There are no other comments on this PR to address.
**superset-frontend/playwright/tests/dashboard/delete-display-control.spec.ts**
```
import { Page } from '@playwright/test';
async function findDatasetIdByName(page: Page, name: string):
Promise<number> {
const rison = `(filters:!((col:table_name,opr:eq,value:'${name}')))`;
const resp = await page.request.get(`api/v1/dataset/?q=${rison}`);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]