Skip to content

Conversation

@muaydin
Copy link
Contributor

@muaydin muaydin commented Jan 10, 2025

Problem

The wizard remained in a "not ready" state if a custom init() was provided, requiring manual toggles in the test code.

Solution

  • Wrap the user’s init() with a small decorator that sets _ready = true.
  • Remove the manual toggles in wizardTestUtils.ts, letting the wizard handle readiness on its own.

  • Treat all work as PUBLIC. Private feature/x branches will not be squash-merged at release time.
  • Your code changes must meet the guidelines in CONTRIBUTING.md.
  • License: I confirm that my contribution is made under the terms of the Apache 2.0 license.

@muaydin muaydin requested a review from a team as a code owner January 10, 2025 21:12
@github-actions
Copy link

  • This pull request modifies code in src/* but no tests were added/updated.
    • Confirm whether tests should be added or ensure the PR description explains why tests are not required.
  • This pull request implements a feat or fix, so it must include a changelog entry (unless the fix is for an unreleased feature). Review the changelog guidelines.
    • Note: beta or "experiment" features that have active users should announce fixes in the changelog.
    • If this is not a feature or fix, use an appropriate type from the title guidelines. For example, telemetry-only changes should use the telemetry type.

@justinmk3
Copy link
Contributor

Remove the manual toggles in wizardTestUtils.ts, letting the wizard handle readiness on its own.

Nice 👍

Comment on lines 149 to 150
// eslint-disable-next-line @typescript-eslint/unbound-method
const _init = this.init
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the eslint ignore be avoided, by something like:

Suggested change
// eslint-disable-next-line @typescript-eslint/unbound-method
const _init = this.init
const _init = this.init.bind(this)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out! I've replaced .apply(this) with .bind(this), which fixes the unbound method issue and removes the need for the ESLint comment.

@justinmk3 justinmk3 changed the title fix(wizard): Fix wizard bug fix(wizard): wizard remains in "not ready" state if a custom init() was provided Jan 13, 2025
Copy link
Contributor

@justinmk3 justinmk3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Will wait for reply to my comment

@justinmk3 justinmk3 merged commit fe0eee8 into aws:master Jan 14, 2025
17 checks passed
avi-alpert pushed a commit to avi-alpert/aws-toolkit-vscode that referenced this pull request Jan 15, 2025
…as provided aws#6339

## Problem
The wizard remained in a "not ready" state if a custom `init()` was
provided, requiring manual toggles in the test code.

## Solution
- Wrap the user’s init() with a small decorator that sets _ready = true.
- Remove the manual toggles in wizardTestUtils.ts, letting the wizard
handle readiness on its own.
karanA-aws pushed a commit to karanA-aws/aws-toolkit-vscode that referenced this pull request Jan 17, 2025
…as provided aws#6339

## Problem
The wizard remained in a "not ready" state if a custom `init()` was
provided, requiring manual toggles in the test code.

## Solution
- Wrap the user’s init() with a small decorator that sets _ready = true.
- Remove the manual toggles in wizardTestUtils.ts, letting the wizard
handle readiness on its own.
kevluu-aws pushed a commit to kevluu-aws/aws-toolkit-vscode that referenced this pull request Jan 23, 2025
…as provided aws#6339

## Problem
The wizard remained in a "not ready" state if a custom `init()` was
provided, requiring manual toggles in the test code.

## Solution
- Wrap the user’s init() with a small decorator that sets _ready = true.
- Remove the manual toggles in wizardTestUtils.ts, letting the wizard
handle readiness on its own.
s7ab059789 pushed a commit to s7ab059789/aws-toolkit-vscode that referenced this pull request Feb 19, 2025
…as provided aws#6339

## Problem
The wizard remained in a "not ready" state if a custom `init()` was
provided, requiring manual toggles in the test code.

## Solution
- Wrap the user’s init() with a small decorator that sets _ready = true.
- Remove the manual toggles in wizardTestUtils.ts, letting the wizard
handle readiness on its own.
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.

3 participants