Exemplo n.º 1
0
    def test_errors(self, report: Report):
        report.soft_assert(True is False, "KEY-0004", "True should be false")

        assert len(report.errors) == 1
Exemplo n.º 2
0
 def test_all(self, report: Report):
     report.soft_assert(True is True, "KEY-0001", "True is True")
     report.soft_assert(True is True, "KEY-0002", "True is True")
     report.soft_assert(True is False, "KEY-0003", "True should be false")
     report.soft_assert(True is False, "KEY-0004", "True should be false")
Exemplo n.º 3
0
    def test_failures(self, report: Report):
        report.soft_assert(True is False, "KEY-0003", "True should be false")

        assert len(report.failures) == 1
Exemplo n.º 4
0
    def test_passed(self, report: Report):
        report.soft_assert(True is True, "KEY-0002", "True is True")

        assert report.passed()
Exemplo n.º 5
0
    def test_successes(self, report: Report):
        report.soft_assert(True is True, "KEY-0001", "True is True")

        assert len(report.successes) == 1
Exemplo n.º 6
0
 def test_answer_cell_has_answer_a_question_text(self, report: Report):
     (AnswerCellPage().get_answer_cell_text(lambda text: report.soft_assert(
         "Answer a Question" == text, "HW-001",
         "Answer cell text should be 'Answer a Question'")))
Exemplo n.º 7
0
 def test_card_has_question_mark(self, report: Report):
     (QuestionsPage().tap_answer_cell().get_question_text(
         lambda text: report.soft_assert("?" in text, "HW-000",
                                         "Questions should have a '?'")).
      dismiss_via_swipe())
     assert QuestionsPage()