-
Notifications
You must be signed in to change notification settings - Fork 774
CAT-1443 Set/change variable fixed #1306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -179,7 +179,61 @@ public void testCreateUserVariableInFormulaEditor() { | |
| assertNotNull("UserVariable is null", userVariable); | ||
| assertTrue("UserVariable Name not as expected", userVariable.getName().equals(userVariableName)); | ||
| } | ||
|
|
||
|
|
||
| public void testViewInFormulaEditorAfterClone(){ | ||
| String userVariableName = "testVariable1"; | ||
| String userVariableNameTwo = "testVariable2"; | ||
|
|
||
| solo.clickOnView(solo.getView(R.id.brick_set_variable_edit_text)); | ||
| solo.waitForFragmentByTag(FormulaEditorFragment.FORMULA_EDITOR_FRAGMENT_TAG); | ||
| solo.clickOnView(solo.getView(R.id.formula_editor_keyboard_data)); | ||
| assertTrue("Data Fragment not shown", solo.waitForFragmentByTag(FormulaEditorDataFragment.USER_DATA_TAG)); | ||
|
|
||
| solo.clickOnView(solo.getView(R.id.button_add)); | ||
| assertTrue("Add Data Dialog not shown", | ||
| solo.waitForText(solo.getString(R.string.formula_editor_data_dialog_title))); | ||
| EditText editText = (EditText) solo.getView(R.id.dialog_formula_editor_data_name_edit_text); | ||
|
|
||
| solo.enterText(editText, userVariableName); | ||
| finishUserVariableCreationSafeButSlow(userVariableName, true); | ||
|
|
||
| solo.goBack(); | ||
| solo.clickOnView(solo.getView(R.id.formula_editor_keyboard_ok)); | ||
|
|
||
| solo.clickOnView(solo.getView(R.id.button_add)); | ||
| solo.clickOnText(solo.getString(R.string.category_data)); | ||
|
|
||
| solo.clickOnText(solo.getString(R.string.brick_set_variable)); | ||
|
|
||
| solo.clickOnText(solo.getString(R.string.brick_set_variable)); | ||
|
|
||
|
|
||
| solo.clickOnText(userVariableName); | ||
|
|
||
| solo.clickOnText(solo.getString(R.string.brick_variable_spinner_create_new_variable)); | ||
|
|
||
|
|
||
| EditText editTextTwo = (EditText) solo.getView(R.id.dialog_formula_editor_data_name_edit_text); | ||
|
|
||
| solo.enterText(editTextTwo, userVariableNameTwo); | ||
| solo.clickOnButton(solo.getString(R.string.ok)); | ||
|
|
||
| solo.clickOnText(solo.getString(R.string.brick_set_variable)); | ||
| solo.clickOnText(solo.getString(R.string.brick_context_dialog_move_brick)); | ||
|
|
||
| ArrayList<Integer> yPosition = UiTestUtils.getListItemYPositions(solo, 0); | ||
| int addedYPosition = UiTestUtils.getAddedListItemYPosition(solo); | ||
| solo.drag(20, 20, addedYPosition, yPosition.get(yPosition.size() - 1) + 20, 20); | ||
|
|
||
| solo.clickOnText(solo.getString(R.string.brick_set_variable)); | ||
| solo.clickOnText(solo.getString(R.string.brick_context_dialog_formula_edit_brick)); | ||
|
|
||
| assertTrue("Uservariable in view is not right displayed , maybe clone() is broken...", | ||
| solo.searchText(userVariableName,true)); | ||
|
|
||
| solo.sleep(5000); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove as well There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both tests are necessary because only these two new tests show the bug that was fixed with the bugfix...
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The comment is only about the solo.sleep at the end of the test 😉 which shouldn't be necessary... or is it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for jenkins no ... for human yes ... :-)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Who cares about humans 🙊 |
||
| } | ||
|
|
||
| private void createProject() { | ||
| project = new Project(null, UiTestUtils.DEFAULT_TEST_PROJECT_NAME); | ||
| Sprite sprite = new Sprite("cat"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be unnecessary.