Skip to content

Commit

Permalink
e2e: Fix schedulePost()
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum committed Oct 3, 2023
1 parent a4ce894 commit 1d8dc56
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/e2e/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const addCategoryToPost = async (categoryName) => {
addCategoryLink[0].click();

await page.waitForSelector(
'.editor-post-taxonomies__hierarchical-terms-input',
'.editor-post-taxonomies__hierarchical-terms-input',
{ timeout: 3000 }
);

Expand All @@ -24,7 +24,7 @@ const addCategoryToPost = async (categoryName) => {
);

await page.click(
'.editor-post-taxonomies__hierarchical-terms-submit'
'.editor-post-taxonomies__hierarchical-terms-submit'
)
}

Expand Down Expand Up @@ -69,19 +69,19 @@ const schedulePost = async() => {

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

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

await page.$eval(
'.components-datetime__time-field-year-input',
'.components-datetime__time-field-year',
( el, year ) => el.value = year,
year
);
Expand All @@ -90,4 +90,4 @@ const schedulePost = async() => {

}

export { addCategoryToPost, publishPost, schedulePost }
export { addCategoryToPost, publishPost, schedulePost }

0 comments on commit 1d8dc56

Please sign in to comment.