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:
2026-03-14 18:01:33 -06:00
committed by Tanner
parent df0a2c03fc
commit 1a2fa25ea7
+3 -3
View File
@@ -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