← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~ubuntu-calculator-dev/ubuntu-calculator-app/ubuntu-calculator-convergance into lp:ubuntu-calculator-app

 

Bartosz Kosiorek has proposed merging lp:~ubuntu-calculator-dev/ubuntu-calculator-app/ubuntu-calculator-convergance into lp:ubuntu-calculator-app.

Commit message:
Run Calculator in Landscape mode for Desktop (LP: #1468663)


Requested reviews:
  Ubuntu Calculator Developers (ubuntu-calculator-dev)
Related bugs:
  Bug #1468663 in Ubuntu Calculator App: "[Calculator] Convergence: When Windowed mode is present, run Calculator app in landscape(scientific) mode"
  https://bugs.launchpad.net/ubuntu-calculator-app/+bug/1468663

For more details, see:
https://code.launchpad.net/~ubuntu-calculator-dev/ubuntu-calculator-app/ubuntu-calculator-convergance/+merge/278880

 Run Calculator in Landscape mode for Desktop (LP: #1468663)

-- 
Your team Ubuntu Calculator Developers is requested to review the proposed merge of lp:~ubuntu-calculator-dev/ubuntu-calculator-app/ubuntu-calculator-convergance into lp:ubuntu-calculator-app.
=== modified file 'app/ubuntu-calculator-app.qml'
--- app/ubuntu-calculator-app.qml	2015-11-25 08:08:41 +0000
+++ app/ubuntu-calculator-app.qml	2015-11-27 23:42:32 +0000
@@ -34,8 +34,8 @@
     automaticOrientation: true
     anchorToKeyboard: textInputField.visible ? false : true
 
-    width: units.gu(40);
-    height: units.gu(70);
+    width: units.gu(80);
+    height: units.gu(60);
 
     // This is our engine
     property var mathJs: MathJs.mathJs;

=== modified file 'debian/changelog'
--- debian/changelog	2015-11-15 00:18:19 +0000
+++ debian/changelog	2015-11-27 23:42:32 +0000
@@ -3,6 +3,7 @@
   [ Bartosz Kosiorek ]
   * Fix evaluation of long complex numbers (LP: #1515600)
   * Upgrade math.js to version 2.4.2 to fix complex numbers formatting 
+  * Run Calculator in Landscape mode for Desktop (LP: #1468663)
 
  -- Bartosz Kosiorek <gang65@xxxxxxxxxxxxxx>  Thu, 12 Nov 2015 13:28:29 +0100
 

=== modified file 'tests/autopilot/run'
--- tests/autopilot/run	2014-12-20 19:36:32 +0000
+++ tests/autopilot/run	2015-11-27 23:42:32 +0000
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-if [[ -z `which autopilot` ]]; then
+if [[ -z `which autopilot3` ]]; then
   echo "Autopilot is not installed. Skip"
   exit
 fi

=== modified file 'tests/autopilot/ubuntu_calculator_app/tests/test_main.py'
--- tests/autopilot/ubuntu_calculator_app/tests/test_main.py	2015-11-22 13:59:30 +0000
+++ tests/autopilot/ubuntu_calculator_app/tests/test_main.py	2015-11-27 23:42:32 +0000
@@ -238,30 +238,24 @@
 
     def test_square(self):
         self.app.main_view.insert('4')
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('square')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('=')
 
         self._assert_result_is(u'16')
         self._assert_history_contains(u'4^2=16')
 
     def test_adding_square_to_empty_formula(self):
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('square')
         self._assert_result_is(u'')
 
     def test_adding_square_after_operator(self):
         self.app.main_view.insert('6/')
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('square')
         self._assert_result_is(u'6÷')
 
     def test_cube(self):
         self.app.main_view.insert('3')
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('cube')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('=')
 
         self._assert_result_is(u'27')
@@ -269,28 +263,22 @@
 
     def test_power(self):
         self.app.main_view.insert('2')
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('power')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('-4=')
 
         self._assert_result_is(u'0.0625')
         self._assert_history_contains(u'2^−4=0.0625')
 
     def test_loge(self):
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('log')
         self.app.main_view.press('e')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('=')
 
         self._assert_result_is(u'1')
 
     def test_factorial(self):
         self.app.main_view.insert('4')
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('!')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('=')
 
         self._assert_result_is(u'24')
@@ -299,9 +287,7 @@
     def test_factorial_with_brackets(self):
         self.app.main_view.press_universal_bracket()
         self.app.main_view.insert('3')
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('!')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('*2')
         self.app.main_view.press_universal_bracket()
         self.app.main_view.insert('=')
@@ -310,18 +296,14 @@
         self._assert_history_contains(u'(3!×2)=12')
 
     def test_sin(self):
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('sin')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('0=')
 
         self._assert_result_is(u'0')
         self._assert_history_contains(u'sin(0)=0')
 
     def test_cos(self):
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('cos')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('0')
         self.app.main_view.press_universal_bracket()
         self.app.main_view.insert('=')
@@ -331,16 +313,12 @@
 
     def test_validation_complex_numbers(self):
         self.app.main_view.insert('66')
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('i')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('*')
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('i')
         self.app.main_view.press('i')
         self.app.main_view.press('i')
         self._assert_result_is(u'66i×i')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('33=')
         self._assert_result_is(u'−66')
         self._assert_history_contains(u'66i×i=−66')
@@ -348,14 +326,10 @@
     def test_formatting_long_complex_numbers(self):
         self.app.main_view.press_universal_bracket()
         self.app.main_view.insert('3+4')
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('i')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.press_universal_bracket()
         self._assert_result_is(u'(3+4i)')
-        self.app.main_view.show_scientific_keyboard()
         self.app.main_view.press('square')
-        self.app.main_view.hide_scientific_keyboard()
         self.app.main_view.insert('=')
         self._assert_result_is(u'−6.999999999999997+24i')
         self._assert_history_contains(u'(3+4i)^2=−6.999999999999997+24i')


Follow ups