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

Add input sources in GetOrCreateInputSource #44

Merged
merged 1 commit into from
May 14, 2024

Conversation

grokys
Copy link
Contributor

@grokys grokys commented May 14, 2024

The spec is unclear on when input sources should be added to the input source map. Previously it was being done in ExtractActionSequence but the problem with doing it there is that there's no way to know if GetOrCreateInputSource is returning an existing input source or creating a new one, causing #43.

Move the logic to add an input source to GetOrCreateInputSource to fix this.

(It would kinda make sense to do it instead in CreateInputSource but the spec defines callers of this method which add the input source manually :/ )

Fixes #43

The spec is unclear on when input sources should be added to the input source map. Previously it was being done in `ExtractActionSequence` but the problem with doing it there is that there's no way to know if `GetOrCreateInputSource` is returning an existing input source or creating a new one, causing FlaUI#43.

Move the logic to add an input source to `GetOrCreateInputSource` to fix  this.

(It would kinda make sense to do it instead in `CreateInputSource` but the spec defines a caller of this method which adds the input source manually :/ )

Fixes FlaUI#43
@aristotelos
Copy link
Collaborator

Would it be possible to add a test that verifies the fix?

@aristotelos
Copy link
Collaborator

For now, I'll merge it, unit or integration tests can be added later.

@aristotelos aristotelos merged commit e01d093 into FlaUI:main May 14, 2024
3 checks passed
@grokys
Copy link
Contributor Author

grokys commented May 14, 2024

Thanks @aristotelos ! Sorry I've not had time to create a test yet.

@grokys grokys deleted the fixes/43-duplicate-input-source branch May 14, 2024 20:43
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.

Duplicate input sources being added.
2 participants