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

fix(codgen): assertValue works with disabled select #31315

Merged
merged 1 commit into from
Jun 28, 2024

Conversation

4ydx
Copy link
Contributor

@4ydx 4ydx commented Jun 14, 2024

Manually tested against https://4ydx.github.io/disabled-select/

npm install
npm run build
node packages/playwright-core/cli.js codegen

Producing:

import { test, expect } from '@playwright/test';

test('test', async ({ page }) => {
  await page.goto('https://4ydx.github.io/disabled-select/');
  await expect(page.getByRole('combobox')).toHaveValue('option1'); // <--- HERE
});

Html:

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Simple HTML Page</title>
  </head>
  <body>
    <h1>Welcome to My Simple HTML Page</h1>

    <!-- Our disabled select -->
    <select disabled>
      <option value="option1">Option 1</option>
      <option value="option2">Option 2</option>
      <option value="option3">Option 3</option>
    </select>

  </body>
</html>

This comment has been minimized.

@dgozman dgozman marked this pull request as ready for review June 17, 2024 19:40
@dgozman
Copy link
Contributor

dgozman commented Jun 17, 2024

@4ydx Thank you for the PR, it looks great. Could you please append to this test to check a disabled select?

@4ydx
Copy link
Contributor Author

4ydx commented Jun 26, 2024

@microsoft-github-policy-service agree

Copy link
Contributor

Test results for "tests 1"

6 flaky ⚠️ [chromium-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture
⚠️ [chromium-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture
⚠️ [chromium-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture
⚠️ [firefox-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture
⚠️ [chromium-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture
⚠️ [webkit-library] › library/browsercontext-fetch-happy-eyeballs.spec.ts:49:3 › get should work on request fixture

28399 passed, 649 skipped
✔️✔️✔️

Merge workflow run.

@pavelfeldman pavelfeldman merged commit 4089f45 into microsoft:main Jun 28, 2024
30 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants