Skip to content

add project_findreplace cases#146

Closed
shuang6 wants to merge 4 commits intomainfrom
shuangshuang/project_findreplace
Closed

add project_findreplace cases#146
shuang6 wants to merge 4 commits intomainfrom
shuangshuang/project_findreplace

Conversation

@shuang6
Copy link
Contributor

@shuang6 shuang6 commented May 12, 2021

Objective

Add find/replace in project unit test cases

Abstractions

Src/project/findReplace folder contains the following tests:
Find in project
Open search result
Clear search result
Apply replacement in project
Replace in project
Find in file

Tests performed

Passed Local and Github tests

Screen shot

eee

@shuang6 shuang6 requested a review from Sen-real May 12, 2021 07:05
let msg = localize("autolispext.project.find.openproject", "A project must be open before you can search for a text string.");
vscode.window.showInformationMessage(msg);
return;
return Promise.reject(msg);
Copy link
Contributor

Choose a reason for hiding this comment

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

what will happen in a real, manual use case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will not happen on manual case. So later, I will delete the test cases.

Comment on lines +47 to +53
closeParenStyleStub = ImportMock.mockFunction(os, 'arch', 'x64');
closeParenStyleStub = ImportMock.mockFunction(opt, 'getSearchOption', searchobj);
closeParenStyleStub = ImportMock.mockFunction(vscode.commands, 'executeCommand', mock_value);
closeParenStyleStub = ImportMock.mockFunction(opt, 'getString', "remove -layer");
closeParenStyleStub = ImportMock.mockFunction(os, 'type', 'Darwin');
closeParenStyleStub = ImportMock.mockFunction(fs, 'accessSync', null);
closeParenStyleStub = ImportMock.mockFunction(fs, 'chmodSync', null);
Copy link
Contributor

Choose a reason for hiding this comment

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

please give each stub an identical name, and restore them all in suiteTeardown

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it.

@LanDong-adsk LanDong-adsk requested a review from Sen-real May 13, 2021 09:18
@github-actions
Copy link

github-actions bot commented Aug 29, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@adstchens
Copy link
Contributor

I have read the CLA Document and I hereby sign the CLA

@github-actions github-actions bot locked and limited conversation to collaborators Aug 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants