Skip to content

Commit e18effd

Browse files
committed
update integration test docs
1 parent 70b4110 commit e18effd

File tree

7 files changed

+15
-7
lines changed

7 files changed

+15
-7
lines changed

crates/lsp-server/tests/actions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod utils;
88
// The high-level methodology for code/intent actions test cases is:
99
// - Read the source code of an ink! entity file in the `test-fixtures` directory (e.g https://github.com/ink-analyzer/ink-analyzer/blob/master/test-fixtures/contracts/erc20.rs).
1010
// - (Optionally) Make some modifications to the source code at a specific offset/text range to create a specific test case.
11-
// - Send the the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
11+
// - Send the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
1212
// - Send an LSP code action request from client to server for the test case.
1313
// - Retrieve the LSP code action response sent from the server to the client.
1414
// - Verify that the code action response results match the expected results.

crates/lsp-server/tests/create_project_command.rs renamed to crates/lsp-server/tests/commands.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
//! integration tests for ink! Language Server create project command.
1+
//! integration tests for ink! Language Server commands.
22
33
mod utils;
44

5+
// Tests the create new project command.
6+
// The high-level methodology for the "creatProject" command test is:
7+
// - Send an LSP execute command request for "createProject" from client to server including a project name and uri.
8+
// - Retrieve the LSP execute command response sent from the server to the client
9+
// (which should be an empty result that simply signifies that the server received the request).
10+
// - Retrieve the LSP workspace/applyEdit request sent from the server to the client which is triggered by the "createProject" command.
11+
// - Verify that the workspace edit creates the expected files and contents.
12+
// See inline comments for more details.
513
#[test]
614
fn create_project_command_works() {
715
// Creates an in-memory connection to an initialized LSP server.

crates/lsp-server/tests/completions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod utils;
88
// The high-level methodology for completions test cases is:
99
// - Read the source code of an ink! entity file in the `test-fixtures` directory (e.g https://github.com/ink-analyzer/ink-analyzer/blob/master/test-fixtures/contracts/erc20.rs).
1010
// - (Optionally) Make some modifications to the source code at a specific offset/text range to create a specific test case.
11-
// - Send the the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
11+
// - Send the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
1212
// - Send an LSP completion request from client to server for the test case.
1313
// - Retrieve the LSP completion response sent from the server to the client.
1414
// - Verify that the completion response results match the expected results.

crates/lsp-server/tests/diagnostics.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mod utils;
77
// The high-level methodology for diagnostics test cases is:
88
// - Read the source code of an ink! entity file in the `test-fixtures` directory (e.g https://github.com/ink-analyzer/ink-analyzer/blob/master/test-fixtures/contracts/erc20.rs).
99
// - (Optionally) Make modifications to the source code at specific offsets/text ranges to create a specific test case.
10-
// - Send the the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
10+
// - Send the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
1111
// - Retrieve the `PublishDiagnostics` notification that's sent from the server to the client when the server receives a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
1212
// - Verify that the diagnostics in the `PublishDiagnostics` notification match the expected results.
1313
// See inline comments for more details.

crates/lsp-server/tests/hover.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod utils;
88
// The high-level methodology for hover content test cases is:
99
// - Read the source code of an ink! entity file in the `test-fixtures` directory (e.g https://github.com/ink-analyzer/ink-analyzer/blob/master/test-fixtures/contracts/erc20.rs).
1010
// - (Optionally) Make some modifications to the source code at a specific offset/text range to create a specific test case.
11-
// - Send the the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
11+
// - Send the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
1212
// - Send an LSP hover request from client to server for the test case.
1313
// - Retrieve the LSP hover response sent from the server to the client.
1414
// - Verify that the hover response results match the expected results.

crates/lsp-server/tests/inlay_hints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod utils;
88
// The high-level methodology for inlay hints test cases is:
99
// - Read the source code of an ink! entity file in the `test-fixtures` directory (e.g https://github.com/ink-analyzer/ink-analyzer/blob/master/test-fixtures/contracts/erc20.rs).
1010
// - (Optionally) Make some modifications to the source code at a specific offset/text range to create a specific test case.
11-
// - Send the the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
11+
// - Send the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
1212
// - Send an LSP inlay hints request from client to server for the test case.
1313
// - Retrieve the LSP inlay hints response sent from the server to the client.
1414
// - Verify that the inlay hints response results match the expected results.

crates/lsp-server/tests/signature_help.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod utils;
88
// The high-level methodology for signature help test cases is:
99
// - Read the source code of an ink! entity file in the `test-fixtures` directory (e.g https://github.com/ink-analyzer/ink-analyzer/blob/master/test-fixtures/contracts/erc20.rs).
1010
// - (Optionally) Make some modifications to the source code at a specific offset/text range to create a specific test case.
11-
// - Send the the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
11+
// - Send the modified source code from client to server via a `DidOpenTextDocument` or `DidChangeTextDocument` LSP notification.
1212
// - Send an LSP signature help request from client to server for the test case.
1313
// - Retrieve the LSP signature help response sent from the server to the client.
1414
// - Verify that the signature help response results match the expected results.

0 commit comments

Comments
 (0)