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

V13 QA updated locator for failing E2E test #17825

Merged
merged 5 commits into from
Jan 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
await page.locator('[id="sub-view-0"]').locator('[id="title"]').fill(newContentValue);
await umbracoUi.clickDataElementByElementName('sub-view-settings');
// Adds text to the setting element
await page.waitForTimeout(500);
await page.locator('[id="sub-view-1"]').locator('[id="title"]').fill(newSettingValue);
await page.locator('[label="Submit"]').click();
await umbracoUi.clickElement(umbracoUi.getButtonByLabelKey(ConstantHelper.buttons.saveAndPublish));
Expand Down Expand Up @@ -231,7 +232,7 @@
const dragFromLocator = await page.locator('[data-content-element-type-key="' + element['key'] + '"]', {hasText: bottomBlock});
const dragToLocator = await page.locator('[data-content-element-type-key="' + element['key'] + '"]', {hasText: topBlock});
await umbracoUi.dragAndDrop(dragFromLocator, dragToLocator, 10, -5, 15);

await page.waitForTimeout(500);

Check warning on line 235 in tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/BlockGridEditor/Content/blockGridEditorContent.spec.ts

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v13/dev)

❌ Getting worse: Large Method

'BlockGridEditorContent'.'Moving blocks' increases from 90 to 91 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.
// Assert
// Checks if the BottomBlock is moved to be under TopBlock
await expect(page.locator('[data-content-element-type-key="' + element['key'] + '"]').nth(1)).toContainText(bottomBlock);
Expand Down Expand Up @@ -393,7 +394,6 @@
await umbracoUi.isSuccessNotificationVisible();
// Checks if there are two blocks in the area
await expect(page.locator('[data-element="property-' + blockGridAlias + '"]').locator('umb-block-grid-entry')).toHaveCount(2);

});

test('can set a maximum of required blocks in content with a block grid editor', async ({page, umbracoApi, umbracoUi}) => {
Expand Down Expand Up @@ -458,8 +458,8 @@
await page.locator('[title="Delete"]').nth(2).click();
await umbracoUi.clickElement(umbracoUi.getButtonByLabelKey('actions_delete'));

await page.waitForTimeout(2000);
await page.getByRole('button', { name: 'Save and publish' }).click();
await page.waitForTimeout(1000);
await umbracoUi.clickElement(umbracoUi.getButtonByLabelKey(ConstantHelper.buttons.saveAndPublish));

// Assert
await umbracoUi.isSuccessNotificationVisible();
Expand All @@ -477,7 +477,7 @@
const dataTypeBlockGrid = new BlockGridDataTypeBuilder()
.withName(blockGridName)
.addBlock()
// We use the a label so we can see if the block is live updated when content is being written to the element
// We use the label so we can see if the block is live updated when content is being written to the element
.withLabel('{{' + element.groups[0].properties[0].alias + '}}')
.withContentElementTypeKey(element['key'])
.withEditorSize('small')
Expand Down
Loading