fix: Use buttonPress() for trig functions in tests
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
+3
-3
@@ -547,17 +547,17 @@ test('Trig functions with Pi (rad)', () => {
|
|||||||
assert.strictEqual(scientificOperators.angleMode.val, 'rad');
|
assert.strictEqual(scientificOperators.angleMode.val, 'rad');
|
||||||
|
|
||||||
press('p');
|
press('p');
|
||||||
press('sin');
|
buttonPress('sin');
|
||||||
checkDisplay(0); // Math.sin(Math.PI) is ~0, calculator snaps to 0
|
checkDisplay(0); // Math.sin(Math.PI) is ~0, calculator snaps to 0
|
||||||
press('R'); press('R');
|
press('R'); press('R');
|
||||||
|
|
||||||
press('p');
|
press('p');
|
||||||
press('cos');
|
buttonPress('cos');
|
||||||
checkDisplay(-1);
|
checkDisplay(-1);
|
||||||
press('R'); press('R');
|
press('R'); press('R');
|
||||||
|
|
||||||
press('p');
|
press('p');
|
||||||
press('tan');
|
buttonPress('tan');
|
||||||
checkDisplay(0); // Math.tan(Math.PI) is ~0, calculator snaps to 0
|
checkDisplay(0); // Math.tan(Math.PI) is ~0, calculator snaps to 0
|
||||||
|
|
||||||
buttonPress('angleMode'); // switch back to DEG
|
buttonPress('angleMode'); // switch back to DEG
|
||||||
|
|||||||
Reference in New Issue
Block a user