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

api-tests: fix 'workbench.editor.closeOnFileDelete' test #8942

Merged
merged 1 commit into from
Jan 19, 2021

Conversation

vince-fugnitto
Copy link
Member

What it does

The following pull-request fixes issues in the saveable api-tests for the preference workbench.editor.closeOnFileDelete.

The changes include:

  • fixing the incorrect preference name (editor.closeOnFileDelete).
  • removing the existing test which incorrectly tested the feature (the test was incorrectly passing despite an invalid preference).

Test Cases:

Test-Case Outcome
preference true the editor should remain opened (not disposed), and the title should be updated (suffixed by (deleted)
preference false the editor should close (be disposed)

How to test

Verify that the saveable.js suite correctly passes during CI.

Review checklist

Reminder for reviewers

Signed-off-by: vince-fugnitto vincent.fugnitto@ericsson.com

@vince-fugnitto vince-fugnitto added quality issues related to code and application quality test issues related to unit and api tests labels Jan 12, 2021
Copy link
Contributor

@DucNgn DucNgn left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Thanks for fixing the test suite!

Copy link
Member

@paul-marechal paul-marechal left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

The following commit fixes the `saveable` api-tests for the `workbench.editor.closeOnFileDelete`
preference.

The fix includes:
- fixing the preference name from `editor.closeOnFileDelete` to
  `workbench.editor.closeOnFileDelete`
- adding tests when the preference is set to 'false' (verify that the
  editor is opened, and the title has been updated)
- adding tests when the preference is set to 'true' (verify that the
  editor is closed/disposed)

Signed-off-by: vince-fugnitto <vincent.fugnitto@ericsson.com>
@vince-fugnitto vince-fugnitto force-pushed the vf/close-on-file-delete-test branch from 685b899 to 1346e12 Compare January 19, 2021 20:32
@vince-fugnitto vince-fugnitto merged commit 4a3e133 into master Jan 19, 2021
@vince-fugnitto vince-fugnitto deleted the vf/close-on-file-delete-test branch January 19, 2021 21:02
@github-actions github-actions bot added this to the 1.10.0 milestone Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality issues related to code and application quality test issues related to unit and api tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants