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]: Setting the current shard through config uses n+1 instead #7849

Closed
mattjennings opened this issue Jul 26, 2021 · 0 comments
Closed

[Bug]: Setting the current shard through config uses n+1 instead #7849

mattjennings opened this issue Jul 26, 2021 · 0 comments
Assignees

Comments

@mattjennings
Copy link

mattjennings commented Jul 26, 2021

Playwright version

1.13.0

Operating system

MacOS

What browsers are you seeing the problem on?

Chromium

Other information

Using the playwright test runner

What happened? / Describe the bug

When setting the current shard through playwright.config.ts, the current shard becomes config.shard.current + 1.

This seems to be where the bug occurs:

const shardDetails = shard ? `, shard ${shard.current + 1} of ${shard.total}` : '';

Code snippet to reproduce your bug

// In playwright.config.ts:


// This runs shard 2/2. This is a different result than passing `--shard=1/2`.
export default {
  shard: {
    current: 1,
    total: 2,
  },
};



// This fails with error: `Error: playwright.config.ts: config.shard.current must be a positive number, not greater than config.shard.total`

export default {
  shard: {
    current: 0,
    total: 2,
  },
};

Relevant log output

No response

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

No branches or pull requests

2 participants