Methods
activate(context)
This function is called when the extension starts.
It begins with the command Start Testing.
and ends with the command Stop Testing in the Command Palette.
Parameters:
Name | Type | Description |
---|---|---|
context |
vscode.ExtensionContext |
- Source:
(async) authenticate(triedBefore)
Displays a text box for user input
Parameters:
Name | Type | Default | Description |
---|---|---|---|
triedBefore |
boolean | false |
- Source:
deactivate()
This method is called when the extension is deactivated, it is unreliable and most cleanup should be done on "Stop Testing"
- Source:
finishTesting()
This is used to create an empty event upon the end of testing.
- Source:
getFailingTestDetails(failingTestID)
Returns the details of all the tests that are failing
Parameters:
Name | Type | Description |
---|---|---|
failingTestID |
any |
- Source:
Returns:
result of failed tests
getWebViewContent(passing, tests)
Creates the window to display the tests and if they are passing or not.
Parameters:
Name | Type | Description |
---|---|---|
passing |
any | |
tests |
any |
- Source:
Returns:
a vscode web panel
init()
Initializes the panels that display the test question and the amount of tests passed.
- Source:
Returns:
a vscode webViewPanel
languageOptions()
This function prompts the user to choose a langugae from a predetermined set of languages in a dropdown bar.
It stores the selected option in a global variable.
- Source:
(async) nextTest()
A user inputs into an Input Box the next problem they will do. If they
do not specify a test a random one is chosen.
- Source:
recordCursorMovements()
Records the position of the cursor inside the text box
- Source:
recordKeyPresses()
Records a users key press for any text change to the document.
- Source:
runTest()
Runs tests on a users local machine to check to see if they are passing
the test they are on.
- Source:
(async) setProblem(problem)
This sets the problem to be displayed as well as creates a timer that will be
set the amount of time allotted to finish the test. The timer resets every time
a new problem appears.
Parameters:
Name | Type | Description |
---|---|---|
problem |
any |
- Source:
survey()
Once the program finishes testing this function is called to prompt the user to fill out a survey.
- Source:
testOptions()
This function prompts the user to choose a problem set from the options listed.
It can have different amounts of possible problem sets for each language.
It then stores the selected problem set in a variable.
- Source:
updateStatus()
This function updates the status of the passing tests window.
Every time a test passes it increases the amount of tests passed.
If a test fails it decreases the amount of tests passed.
- Source:
writeState()
Writes the state in a post request to the server.
- Source: