Skip to content

Commit

Permalink
LPD-31536 Replace with fill title function
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoHu97 authored and brianchandotcom committed Jul 16, 2024
1 parent 1823b1f commit dcd1b3d
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions modules/test/playwright/tests/journal-web/journalArticle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,7 @@ autoSaveAsDraftTest(
structureName,
});

await fillAndClickOutside(
page,
page.getByPlaceholder('Untitled ' + structureName),
title
);
await journalEditArticlePage.fillTitle(title);

const localizableField = page.getByRole('textbox', {
name: localizableFieldName,
Expand Down Expand Up @@ -190,17 +186,13 @@ autoSaveAsDraftTest(

autoSaveAsDraftTest(
'LPD-26863: Undo/Redo buttons work with metadata fields',
async ({journalEditArticlePage, page, site}) => {
async ({journalEditArticlePage, site}) => {
const title = getRandomString();

await journalEditArticlePage.goto({siteUrl: site.friendlyUrlPath});

await expect(async () => {
await fillAndClickOutside(
page,
journalEditArticlePage.titleInput,
title
);
await journalEditArticlePage.fillTitle(title);

await expect(journalEditArticlePage.undoButton).toBeEnabled();
}).toPass();
Expand Down Expand Up @@ -249,11 +241,7 @@ autoSaveAsDraftTest(
});

await expect(async () => {
await fillAndClickOutside(
page,
journalEditArticlePage.titleInput,
title
);
await journalEditArticlePage.fillTitle(title);

await expect(journalEditArticlePage.undoButton).toBeEnabled();
}).toPass();
Expand Down Expand Up @@ -1114,11 +1102,7 @@ baseTest(
structureName,
});

await fillAndClickOutside(
page,
journalEditArticlePage.titleInput,
title
);
await journalEditArticlePage.fillTitle(title);

await fillAndClickOutside(
page,
Expand All @@ -1145,7 +1129,7 @@ baseTest(
});

await expect(async () => {
await fillAndClickOutside(page, journalEditArticlePage.titleInput);
await journalEditArticlePage.fillTitle(title);

await translationButton.click();

Expand Down Expand Up @@ -1215,7 +1199,7 @@ scheduleTest(

const title = getRandomString();

await journalEditArticlePage.titleInput.fill(title);
await journalEditArticlePage.fillTitle(title);

await clickAndExpectToBeVisible({
autoClick: true,
Expand Down

0 comments on commit dcd1b3d

Please sign in to comment.