Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions test/selenium/test_options.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from time import sleep
from util import ExtensionTestCase

class OptionsTest(ExtensionTestCase):
Expand All @@ -11,17 +12,19 @@ def test_options(self):
def test_show_counter(self):
selector = '#showCounter'
self.load_options()
sleep(1)

el = self.query_selector(selector)
self.assertTrue(el.is_selected())
el.click()

self.driver.refresh()

self.load_options()

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 think we want to keep this, since we want to assure that the option is selected after the options page is reloaded, not just that it's checked on the same page after we check it.

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.

We'll need to add an additional sleep after this too, I suspect.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I'm not sure if it's necessary since the tests are running one by one. Otherwise do we need another load_option after the second reload?

sleep(1)
el = self.query_selector(selector)
self.assertFalse(el.is_selected())
el.click()

self.driver.refresh()
sleep(1)
el = self.query_selector(selector)
self.assertTrue(el.is_selected())