Skip to content

bokchoy tests for move xblocks#14465

Merged
mushtaqak merged 2 commits intomushtaq/restrict-move-actionfrom
ammar/bokchoy-tests
Mar 1, 2017
Merged

bokchoy tests for move xblocks#14465
mushtaqak merged 2 commits intomushtaq/restrict-move-actionfrom
ammar/bokchoy-tests

Conversation

@muhammad-ammar
Copy link
Contributor

No description provided.

@mushtaqak mushtaqak force-pushed the mushtaq/tnl-6062-save-move-xblock branch from 2149952 to 486bcde Compare February 7, 2017 10:36
@mushtaqak mushtaqak force-pushed the mushtaq/tnl-6062-save-move-xblock branch from 486bcde to 99a3416 Compare February 7, 2017 16:25
@mushtaqak mushtaqak force-pushed the mushtaq/tnl-6062-save-move-xblock branch 2 times, most recently from c4c0d45 to cda669e Compare February 9, 2017 08:49
@muhammad-ammar muhammad-ammar force-pushed the ammar/bokchoy-tests branch 2 times, most recently from c46e0ce to 1a06373 Compare February 9, 2017 09:05
@muzaffaryousaf
Copy link

@muhammad-ammar Can you ask for assistance someone from test engineering about the a11y test failure.

)
)

def verify_move_opertions(self, operation, component_display_names_after_operation):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

opertions --> operations

component_display_names_after_operation=['HTML 11', 'HTML 12']
)

def test_a11y(self):
Copy link
Contributor Author

@muhammad-ammar muhammad-ammar Feb 9, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jzoldak @benpatterson If i decorate this test with attr('a11y') then this test fails always due to same failure reason. From the screenshot it looks like that outline page never finishes loading but i am unable to understand the reason of failure. Test passes without attr('a11y'). Also test passes on devstack with attr('a11y').

Any idea why the tests fails with attr('a11y') on jenkins?

@muhammad-ammar
Copy link
Contributor Author

jenkins run python

@benpatterson
Copy link
Contributor

@muhammad-ammar have you tried to reproduce locally?

There was a point in which a11y tests were run through phantomjs instead of firefox. I honestly don't remember if that's what the configuration is now, though. You'd have to dig around pavelib (most likely) to determine that.

@benpatterson
Copy link
Contributor

(or, it'll be obvious if you attempt to reproduce locally and you have x11 forwarding enabled)

@muhammad-ammar
Copy link
Contributor Author

@benpatterson
paver test_a11y -t studio/test_studio_container.py:MoveComponentTest.test_a11y --testsonly --fasttest passes the test locally but it is running the test using Firefox(don't know why) instead of phantomjs.

Do i need to run the test using phantomjs? If yes then how the x11 forwarding will help because phantomjs is headless browser.

@benpatterson
Copy link
Contributor

@muhammad-ammar I only mention that because with phantomjs you'd see no window whereas with firefox, you would. It would be a proxy for confirming that it's running on phantomjs if you don't want to look at code. But...it sounds like you've confirmed it's on firefox, so: great. I couldn't answer your question at this point, then, without a closer look at the code. I would guess it's a flaky condition. You may want to ping Raees or Muddasser to help you isolate the problem.

@mushtaqak mushtaqak force-pushed the mushtaq/tnl-6062-save-move-xblock branch from 64c779a to 968207e Compare February 14, 2017 13:16
@mushtaqak mushtaqak changed the base branch from mushtaq/tnl-6062-save-move-xblock to mushtaq/move-component February 17, 2017 13:30
@mushtaqak mushtaqak changed the base branch from mushtaq/move-component to mushtaq/restrict-move-action February 27, 2017 13:30
unit_page.a11y_audit.config.set_rules({
'ignore': [
'color-contrast',
'link-href',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mushtaqak can we add ticket references with these ignore rules ?

),
],
},
})

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mushtaqak Let's move these settings in setup.


# Add split test to unit_page1 and assign newly created group configuration to it
split_test = XBlockFixtureDesc('split_test', 'Test Content Experiment', metadata={'user_partition_id': 0})
self.course_fixture.create_xblock(self.unit_page1.locator, split_test)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this in setup where we're add other fixtures.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are only using split_test in this test, so I don't think we should add it to all other tests

When I go to unit page in second section
Then I see moved component there
When I undo move a component
Then I verified that undo move operation is successful
Copy link

@muzaffaryousaf muzaffaryousaf Feb 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that I am a staff user
And I go to content experiment page
And I open the move dialogue modal
When I navigate to the unit in second section
Then I see move button is enabled
And when I click on the move button
Then I see move operation success message
And when I click on take me there link
Then I see moved component there

When I go to unit page in second section
Then I see moved component there
When I undo move a component
Then I verified that undo move operation is successful

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mushtaqak How you're doing move and then undo move after take me there link ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muzaffaryousaf we are doing move initially and then checking confirmation message, if it is only move operation, we are checking take me there link otherwise we do undo move and check it's confirmation as well.


def _loading_spinner_hidden():
""" promise function to check loading spinner state """
is_spinner_hidden = self.q(css='div.ui-loading.is-hidden').present

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

present or visible ??

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

present because we are checking if the element has this class or not

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we not checking for visibility of loader ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes based on it's is-hidden class.

FYI @muhammad-ammar

"""
click_css(self, '#page-alert .alert.confirmation .nav-actions .action-primary')

def click_take_me_link(self):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

click_take_me_there_link

component_display_names_after_operation
)

def test_move(self):
Copy link

@muzaffaryousaf muzaffaryousaf Feb 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test_move_component_successfully or test_move_successfully

Then I click on the move button
Then I see move operation successful message
When I go to unit page in second section
Then I see moved component there

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given I am a staff user
And I go to unit page in first section
And I open the move modal
And I navigate to unit in second section
And I see move button is enabled
When I click on the move button
Then I see move operation success message
And When I click on take me there link
Then I see moved component there.

Then I click on the move button
Then I see move operation successful message
When I clicked on undo move link
Then I verified that undo move operation is successful
Copy link

@muzaffaryousaf muzaffaryousaf Feb 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this one too. Just like others.

def test_a11y(self):
"""
Verify move modal a11y.
"""

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add doc strings.

@muzaffaryousaf
Copy link

👍 Except few nits.

@mushtaqak mushtaqak force-pushed the ammar/bokchoy-tests branch 2 times, most recently from 58527d1 to f13fc59 Compare March 1, 2017 13:32
@mushtaqak mushtaqak force-pushed the mushtaq/restrict-move-action branch from 965c31f to 93439b2 Compare March 1, 2017 14:03
@mushtaqak mushtaqak force-pushed the ammar/bokchoy-tests branch from f13fc59 to ddf809e Compare March 1, 2017 14:20
@mushtaqak mushtaqak force-pushed the mushtaq/restrict-move-action branch from 93439b2 to 485ffb1 Compare March 1, 2017 14:30
@mushtaqak mushtaqak force-pushed the ammar/bokchoy-tests branch from ddf809e to 83de1eb Compare March 1, 2017 14:32
@mushtaqak mushtaqak merged commit 0df3624 into mushtaq/restrict-move-action Mar 1, 2017
@mushtaqak mushtaqak mentioned this pull request Mar 1, 2017
@mushtaqak mushtaqak deleted the ammar/bokchoy-tests branch May 10, 2017 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants