Skip to content
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

style(page): Refactored code to remove redundancy #5121

Closed
wants to merge 2 commits into from

Conversation

yashLadha
Copy link
Contributor

There were multiple if block in the logic that can be ironed
out into a single statement, which is much more robust and readable.

There were multiple if block in the logic that can be ironed
out into a single statement, which is much more robust and readable.
@yashLadha
Copy link
Contributor Author

There is some flakiness around accessibility.spec which is probably targeted in this pr: #5116

@yashLadha
Copy link
Contributor Author

@aslushnikov Can you please review the PR?

@@ -42,6 +42,7 @@ module.exports.addTests = function({testRunner, expect, FFOX}) {
</select>
</body>`);

await page.focus('[placeholder="Empty input"]');
Copy link
Member

Choose a reason for hiding this comment

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

Please remove these unrelated changes from this patch

else if (mimeType === 'image/jpeg')
screenshotType = 'jpeg';
const mimeMatch = mimeType.match(/^image\/(png|jpeg)$/);
screenshotType = Array.isArray(mimeMatch) ? mimeMatch[1] || null : null;
Copy link
Member

Choose a reason for hiding this comment

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

This is less readable than the original code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants