Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

wait for option page to load - #15624

Merged
Hainish merged 1 commit into
EFForg:masterfrom
gloomy-ghost:fix_test_options
Jun 15, 2018
Merged

Hainish merged 1 commit into
EFForg:masterfrom
gloomy-ghost:fix_test_options

Conversation

@gloomy-ghost

Copy link
Copy Markdown
Collaborator


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?

@Hainish

Hainish commented Jun 8, 2018

Copy link
Copy Markdown
Member

@Giltyhub it's not, this is for a different test.

@Hainish

Hainish commented Jun 12, 2018

Copy link
Copy Markdown
Member

@gloomy-ghost can you explain why these failures are being triggered in the first place, and how this fixes it? I'm a bit confused what the sleep is fixing here.

@gloomy-ghost

Copy link
Copy Markdown
Collaborator Author

I used a VM to do a throttle test and the second assertTrue also fails sometimes, but the assertFalse never fails. I guess it's because the option values don't have enough time to be loaded since it's async after the page is opened, and the default value for checkboxes are unchecked.

Here is how the values get loaded:

sendMessage("get_option", defaultOptions, item => {
showCounter.checked = item.showCounter;
autoUpdateRulesets.checked = item.autoUpdateRulesets;
enableMixedRulesets.checked = item.enableMixedRulesets;
showDevtoolsTab.checked = item.showDevtoolsTab;

@Hainish
Hainish merged commit 5e60ae4 into EFForg:master Jun 15, 2018
@Hainish

Hainish commented Jun 15, 2018

Copy link
Copy Markdown
Member

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants