Skip to content

MCKIN-12920 Feedback close button ARIA - #264

Merged
xitij2000 merged 7 commits into
open-craft:masterfrom
murad-hubib:murad/12920-close-btn-aria
Feb 17, 2020
Merged

MCKIN-12920 Feedback close button ARIA#264
xitij2000 merged 7 commits into
open-craft:masterfrom
murad-hubib:murad/12920-close-btn-aria

Conversation

@murad-hubib

Copy link
Copy Markdown
Contributor
  • Added ARIA label for close button of feedback popup

Ticket: https://edx-wiki.atlassian.net/browse/MCKIN-12920

@xitij2000 Please review and merge

@murad-hubib
murad-hubib requested a review from xitij2000 February 4, 2020 13:53
@xitij2000

Copy link
Copy Markdown
Member

@murad-hubib Please fix the tests as well.

@musmanmalik

Copy link
Copy Markdown
Contributor

@xitij2000 These test failures are related to this pr? I have a birds eye view over and it seems tests are not related to this particular change.

@xitij2000

Copy link
Copy Markdown
Member

@xitij2000 These test failures are related to this pr? I have a birds eye view over and it seems tests are not related to this particular change.

They are related to a previous MCKIN PR that was merged, and as such need to be fixed here since there weren't in the context of the previous PR.

@musmanmalik

Copy link
Copy Markdown
Contributor

@xitij2000 We have fixed all related test cases. No test case failing at our local side now. There are two test cases still failing on circleci intermittently. Can you please have a look on either these are flaky test or what else going wrong.

@xitij2000 xitij2000 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I do not think removing tests is an acceptable solution when the actual code hasn't changed that much. Please fix the existing tests so they work with the new structure.

Additionally, using sleep slows down tests and can make tests flaky. Please add explicit waits for elements on the page instead of sleep.


# Now reload the page...
mentoring = self.reload_student_view()
time.sleep(3)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not an acceptable solution, please use a selenium wait for the UI to update.

@mudassir-hafeez mudassir-hafeez Feb 13, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

removed sleep here and all over changes

item_feedback_popup = choice_wrapper.find_element_by_css_selector(".choice-tips")

self.assertFalse(item_feedback_popup.is_displayed())
self.assertEqual(item_feedback_popup.text, "")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why are these tests being removed when the UI elements have not been removed?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @xitij2000, thanks for reviewing. As per the changes on this PR #256, these scenarios become obsolete. so I tried to update accordingly. Actually, I had updated this test case in the past as we are facing empty pop up without performing submission after rendering a page. By the recent changes of #256, we wouldn't face these scenarios.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see how these are obsolete. The span is now a button in a number of places, but the actual functionality being tested here is intact. This is existing tests instead of adapting them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yeah, you are right on it's changed into a button but I'm saying in the context of CSS changes that are applied to this button as it will not be displayed until it is selected during the form submission. By the way, I've restored this test with a minor change. Thanks

@mudassir-hafeez

Copy link
Copy Markdown
Contributor

@xitij2000 I have addressed the request changes. One flaky test is getting failed for py35-integration intermittently but not failing at our local. Can you please review the changes and rerun the tests on Circleci if we are good. Thanks

@xitij2000 xitij2000 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The rest of the PR is good to go. If the removed tests are restored this is good to go.

item_feedback_popup = choice_wrapper.find_element_by_css_selector(".choice-tips")

self.assertFalse(item_feedback_popup.is_displayed())
self.assertEqual(item_feedback_popup.text, "")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see how these are obsolete. The span is now a button in a number of places, but the actual functionality being tested here is intact. This is existing tests instead of adapting them.

@mudassir-hafeez

Copy link
Copy Markdown
Contributor

Hi @xitij2000, a kind reminder for a review as I have addressed your last request. Thanks

@xitij2000 xitij2000 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 Good to go once the version is updated.

  • I read through the code
  • I checked for accessibility issues

Comment thread setup.py Outdated
# Constants #########################################################

VERSION = '3.4.9'
VERSION = '3.5.0'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: change this to 3.4.10, this is a very minor change.

@mudassir-hafeez

Copy link
Copy Markdown
Contributor

@xitij2000 I have updated the version and say thank you for taking your time.

@xitij2000

Copy link
Copy Markdown
Member

@mudassir-hafeez Thanks! I will merge and tag this once tests pass.

@xitij2000
xitij2000 merged commit 934ffca into open-craft:master Feb 17, 2020
@mudassir-hafeez
mudassir-hafeez deleted the murad/12920-close-btn-aria branch February 17, 2020 09:56
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