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

[BUG] inspector should display .mjs files like .js files, currently it runs but does not display them. #10041

Closed
eoinomeara11 opened this issue Nov 4, 2021 · 0 comments · Fixed by #10043

Comments

@eoinomeara11
Copy link

Context:

  • Playwright Version: 1.16.3
  • Operating System: Windows
  • Node.js version: 16.13.0
  • Browser: Chromium
  • Extra:

Code Snippet

Displays (.js):

const { test, expect } = require('@playwright/test');

test('github test', async ({page}) => {
    await page.goto('https://www.github.com');

    await page.pause();
});

Does not display (.mjs):

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

test('github test', async ({page}) => {
    await page.goto('https://www.github.com');

    await page.pause();
});

Describe the bug

I prefer to use import instead of require, hence tried to write my playwright tests as .mjs files.
All was ok until I tried the inspector. The top pane only contained the text // No source available but the play/step over buttons and the bottom pane worked correctly so the file seems to be debugged correctly. Fix is to display the .mjs file in the top pane.

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 a pull request may close this issue.

2 participants