Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.

Conversation

@becdetat
Copy link
Contributor

@becdetat becdetat commented Sep 3, 2020

Fixes #5078

This adds copy re accepting the ToS to the WCPay task

Accessibility

  • I've tested using only a keyboard (no mouse)

Screenshots

image

Detailed test instructions:

  • Create a site in the US, with WooCommerce Payments installed
  • Go to the WooCommerce home screen
  • The above copy should be added to the WCPay task
  • Following the link should open the ToS in a new tab, and not activate the task
  • Clicking the task outside of the link should activate the task

Changelog Note:

Tweak: Add ToS agreement copy to the WCPay setup task

if ( ! task.onClick ) {
task.onClick = () => updateQueryString( { task: task.key } );
task.onClick = ( e ) => {
if ( e.target.nodeName === 'A' ) {
Copy link
Contributor Author

@becdetat becdetat Sep 3, 2020

Choose a reason for hiding this comment

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

Note that this is never actually exercised since every task in tasks.js has an onClick handler. To test this, add the following to the end of the tasks array in tasks.js:

{
			key: 'test',
			title: 'Test task',
			container: <Appearance/>,
			completed: false,
			visible: true,
			additionalInfo: 'test with a <a href="https://woocommerce.com" target="_blank">link</a>',
			time: '2 minutes',
		},

Copy link
Contributor

@psealock psealock left a comment

Choose a reason for hiding this comment

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

This is testing well and code looks good. 🚢

@becdetat becdetat merged commit 96b27da into main Sep 3, 2020
@becdetat becdetat deleted the add/tos-copy-for-wcpay-task branch September 3, 2020 02:28
becdetat added a commit that referenced this pull request Sep 3, 2020
Co-authored-by: Rebecca Scott <[email protected]>
# Conflicts:
#	client/task-list/index.js
#	client/task-list/tasks.js
becdetat added a commit that referenced this pull request Sep 3, 2020
@becdetat
Copy link
Contributor Author

becdetat commented Sep 3, 2020

Cherry-picked into 1.5.0-rc.5

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task List - WCPayment task: include ToS agreement copy

3 participants