~roignac/+junk/mago-testsuite-gnome-calculator

« back to all changes in this revision

Viewing changes to gnome-calculator/test_gnome-calculator.py

  • Committer: Vadim Rutkovsky
  • Date: 2011-08-04 17:08:08 UTC
  • Revision ID: roignac@gmail.com-20110804170808-b0vpixfu3tuuukm9
Added case for lp:#32200

Show diffs side-by-side

added added

removed removed

Lines of Context:
684
684
        self.assertEquals(result, '288')
685
685
        
686
686
        self.application.close()
687
 
        
 
687
    
 
688
    @unittest.skip    
688
689
    def test_bug28928(self):
689
690
        """
690
691
            caseid: bug28928
716
717
        self.assertEquals(result, '3')
717
718
        
718
719
        self.application.close()
 
720
  
 
721
    def test_bug32200(self):
 
722
        """
 
723
            caseid: bug32200
 
724
            name: Bitwise operations on results
 
725
            requires: gcalctool
 
726
            command: gnome-calculator
 
727
            _description:
 
728
             PURPOSE:
 
729
                 Check bitwise operations on results
 
730
                 LP:#32200
 
731
             STEPS:
 
732
                 1. Input expression "2 AND 3"
 
733
                 2. Click "="
 
734
                 3. Input expression "OR 5"
 
735
                 4. Click "="
 
736
             VERIFICATION:
 
737
                 1. Result is 7
 
738
        """
 
739
        a = ooldtp.context(self.window)
 
740
        # Switch to Programming mode
 
741
        self.assertEqual(a.doesmenuitemexist(self.menu['Mode']['Programming']),1)
 
742
        a.click(self.menu['Mode']['Programming']) 
 
743
        
 
744
        a.click(self.programming_controls['2'])
 
745
        a.click(self.programming_controls['AND'])
 
746
        a.click(self.programming_controls['3'])
 
747
        a.click(self.programming_controls['='])
 
748
        ldtp.wait(2)
 
749
        a.click(self.programming_controls['OR'])
 
750
        a.click(self.programming_controls['5'])
 
751
        a.click(self.programming_controls['='])
 
752
        ldtp.wait(2)
 
753
        
 
754
        result =  a.gettextvalue(self.programming_controls['Output'])
 
755
        self.assertEquals(result, '7')
 
756
        
 
757
        self.application.close()
719
758
 
720
759
if __name__ == "__main__":
721
760
    unittest.main()