Skip to content

Commit

Permalink
Update changing lines to use space indentation
Browse files Browse the repository at this point in the history
It's similar to the current way this file is doing
  • Loading branch information
htdat committed Jun 10, 2021
1 parent faa82f0 commit 71b2077
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions tests/e2e/utils/index.js
Expand Up @@ -59,32 +59,32 @@ const schedulePost = async() => {
// wait for popout animation
await page.waitFor(200);

// Get the date after four weeks since today
const today = new Date();
const futureDate = new Date();
futureDate.setDate( today.getDate() + 14 );
const [ month, day, year ] = futureDate
.toLocaleDateString( 'en-US' )
.split( '/' );

// Set the future date in the post editing screen
await page.$eval(
'.components-datetime__time-field-day-input',
( el, day ) => el.value = day,
day
);

await page.$eval(
'.components-datetime__time-field-month-select',
( el, month ) => el.value = month.length === 1 ? '0' + month : month,
month
);

await page.$eval(
'.components-datetime__time-field-year-input',
( el, year ) => el.value = year,
year
);
// Get the date after four weeks since today
const today = new Date();
const futureDate = new Date();
futureDate.setDate( today.getDate() + 14 );
const [ month, day, year ] = futureDate
.toLocaleDateString( 'en-US' )
.split( '/' );

// Set the future date in the post editing screen
await page.$eval(
'.components-datetime__time-field-day-input',
( el, day ) => el.value = day,
day
);

await page.$eval(
'.components-datetime__time-field-month-select',
( el, month ) => el.value = month.length === 1 ? '0' + month : month,
month
);

await page.$eval(
'.components-datetime__time-field-year-input',
( el, year ) => el.value = year,
year
);

await publishPost();

Expand Down

0 comments on commit 71b2077

Please sign in to comment.