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

feat: add @retries decorator #58

Merged
merged 5 commits into from
Jan 31, 2024
Merged

feat: add @retries decorator #58

merged 5 commits into from
Jan 31, 2024

Conversation

SebastianSedzik
Copy link
Owner

@SebastianSedzik SebastianSedzik commented Jan 28, 2024

Change or set retries for test(s): @retries(retries: number)

Set the maximum number of retry attempts given to failed @tests in the @suite

import { suite, test, retries } from 'playwright-decorators';

@retries(3) // <-- Decorate suite with @retries()
@suite()
class MyTestSuite {
    @test()
    async test() { // <- This test may be retried up to 3 times if it fails
        // ...
    }
}

Options

  • retries (required) - the max number of retries for each test.

Copy link

changeset-bot bot commented Jan 28, 2024

🦋 Changeset detected

Latest commit: 27f5b0f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@SebastianSedzik SebastianSedzik changed the title feat: add @retry decorator feat: add @retries decorator Jan 31, 2024
@SebastianSedzik SebastianSedzik merged commit 2962b6e into master Jan 31, 2024
4 checks passed
@SebastianSedzik SebastianSedzik deleted the retry-decorator branch January 31, 2024 20:00
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

1 participant