Merge pull request #19908 from edx/feanil/remove_flaky_bokchoy_test
Remove a flaky bokchoy test.
This commit is contained in:
@@ -240,40 +240,6 @@ class EdxNotesDefaultInteractionsTest(EdxNotesTestMixin):
|
||||
components = self.note_unit_page.components
|
||||
self.assert_text_in_notes(self.note_unit_page.notes)
|
||||
|
||||
def test_can_delete_notes(self):
|
||||
"""
|
||||
Scenario: User can delete notes.
|
||||
Given I have a course with 3 components with notes
|
||||
And I open the unit with 2 annotatable components
|
||||
When I remove all notes on the page
|
||||
Then I do not see any notes on the page
|
||||
When I change sequential position to "2"
|
||||
And I remove all notes on the page
|
||||
Then I do not see any notes on the page
|
||||
When I refresh the page
|
||||
Then I do not see any notes on the page
|
||||
When I change sequential position to "1"
|
||||
Then I do not see any notes on the page
|
||||
"""
|
||||
self._add_notes()
|
||||
self.note_unit_page.visit()
|
||||
|
||||
components = self.note_unit_page.components
|
||||
self.remove_notes(components)
|
||||
self.assert_notes_are_removed(components)
|
||||
|
||||
self.courseware_page.go_to_sequential_position(2)
|
||||
components = self.note_unit_page.components
|
||||
self.remove_notes(components)
|
||||
self.assert_notes_are_removed(components)
|
||||
|
||||
components = self.note_unit_page.refresh()
|
||||
self.assert_notes_are_removed(components)
|
||||
|
||||
self.courseware_page.go_to_sequential_position(1)
|
||||
components = self.note_unit_page.components
|
||||
self.assert_notes_are_removed(components)
|
||||
|
||||
def test_can_create_note_with_tags(self):
|
||||
"""
|
||||
Scenario: a user of notes can define one with tags
|
||||
|
||||
@@ -1,95 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Test for matlab problems
|
||||
"""
|
||||
import time
|
||||
from textwrap import dedent
|
||||
|
||||
from common.test.acceptance.fixtures.course import XBlockFixtureDesc
|
||||
from common.test.acceptance.fixtures.xqueue import XQueueResponseFixture
|
||||
from common.test.acceptance.pages.lms.matlab_problem import MatlabProblemPage
|
||||
from common.test.acceptance.tests.lms.test_lms_problems import ProblemsTest
|
||||
|
||||
|
||||
class MatlabProblemTest(ProblemsTest):
|
||||
"""
|
||||
Tests that verify matlab problem "Run Code".
|
||||
"""
|
||||
shard = 11
|
||||
|
||||
def get_problem(self):
|
||||
"""
|
||||
Create a matlab problem for the test.
|
||||
"""
|
||||
problem_data = dedent(u"""
|
||||
<problem markdown="null">
|
||||
<text>
|
||||
<p>
|
||||
Write MATLAB code to create the following row vector and store it in a variable named <code>V</code>.
|
||||
</p>
|
||||
<table id="a0000000466" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto">
|
||||
<tr>
|
||||
<td class="equation">[1 1 2 3 5 8 13]</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>
|
||||
<coderesponse queuename="matlab">
|
||||
<matlabinput rows="10" cols="40" mode="" tabsize="4">
|
||||
<plot_payload>
|
||||
</plot_payload>
|
||||
</matlabinput>
|
||||
<codeparam>
|
||||
<initial_display/>
|
||||
<answer_display>
|
||||
</answer_display>
|
||||
<grader_payload>
|
||||
</grader_payload>
|
||||
</codeparam>
|
||||
</coderesponse>
|
||||
</p>
|
||||
</text>
|
||||
</problem>
|
||||
""")
|
||||
return XBlockFixtureDesc('problem', 'Test Matlab Problem', data=problem_data)
|
||||
|
||||
def _goto_matlab_problem_page(self):
|
||||
"""
|
||||
Open matlab problem page with assertion.
|
||||
"""
|
||||
self.courseware_page.visit()
|
||||
matlab_problem_page = MatlabProblemPage(self.browser)
|
||||
self.assertEqual(matlab_problem_page.problem_name, 'Test Matlab Problem')
|
||||
return matlab_problem_page
|
||||
|
||||
def test_run_code(self):
|
||||
"""
|
||||
Test "Run Code" button functionality.
|
||||
"""
|
||||
|
||||
# Enter a submission, which will trigger a pre-defined response from the XQueue stub.
|
||||
self.submission = "a=1" + self.unique_id[0:5] # pylint: disable=attribute-defined-outside-init
|
||||
|
||||
self.xqueue_grade_response = {'msg': self.submission}
|
||||
|
||||
matlab_problem_page = self._goto_matlab_problem_page()
|
||||
|
||||
# Configure the XQueue stub's response for the text we will submit
|
||||
if self.xqueue_grade_response is not None:
|
||||
XQueueResponseFixture(self.submission, self.xqueue_grade_response).install()
|
||||
|
||||
matlab_problem_page.set_response(self.submission)
|
||||
matlab_problem_page.click_run_code()
|
||||
|
||||
self.assertEqual(
|
||||
u'Submitted. As soon as a response is returned, this message will be replaced by that feedback.',
|
||||
matlab_problem_page.get_grader_msg(".external-grader-message")[0]
|
||||
)
|
||||
|
||||
# Wait 5 seconds for xqueue stub server grader response sent back to lms.
|
||||
time.sleep(5)
|
||||
|
||||
self.assertEqual(u'', matlab_problem_page.get_grader_msg(".external-grader-message")[0])
|
||||
self.assertEqual(
|
||||
self.xqueue_grade_response.get("msg"),
|
||||
matlab_problem_page.get_grader_msg(".ungraded-matlab-result")[0]
|
||||
)
|
||||
@@ -975,26 +975,6 @@ class FormulaProblemTest(ProblemsTest):
|
||||
""")
|
||||
return XBlockFixtureDesc('problem', 'TEST PROBLEM', data=xml, metadata={'show_reset_button': True})
|
||||
|
||||
def test_reset_problem_after_incorrect_submission(self):
|
||||
"""
|
||||
Scenario: Verify that formula problem can be resetted after an incorrect submission.
|
||||
|
||||
Given I am attempting a formula response problem type
|
||||
When I input an incorrect answer
|
||||
Then the answer preview is generated using MathJax
|
||||
When I submit the problem
|
||||
Then I can see incorrect status and a reset button
|
||||
When I click reset, the input pane contents get clear
|
||||
"""
|
||||
problem_page = ProblemPage(self.browser)
|
||||
problem_page.fill_answer_numerical('R_1*R_2')
|
||||
problem_page.verify_mathjax_rendered_in_preview()
|
||||
problem_page.click_submit()
|
||||
self.assertFalse(problem_page.simpleprob_is_correct())
|
||||
self.assertTrue(problem_page.is_reset_button_present())
|
||||
problem_page.click_reset()
|
||||
self.assertEqual(problem_page.get_numerical_input_value, '')
|
||||
|
||||
def test_reset_button_not_rendered_after_correct_submission(self):
|
||||
"""
|
||||
Scenario: Verify that formula problem can not be resetted after an incorrect submission.
|
||||
|
||||
Reference in New Issue
Block a user