Skip to content

Commit fd1725c

Browse files
committed
updated visibilityInputs
1 parent 8ec3c39 commit fd1725c

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

tests/helper.js

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,12 @@ export async function createGeneralPage(page, generalpageURL, titleMessage, body
4242
await ckEditor.click();
4343
await page.keyboard.type(bodyMessage, { delay: 0 });
4444

45-
// Wait for the field to be attached to the DOM
46-
await page.waitForSelector('[data-drupal-selector="edit-field-visibility-0-target-id"]', {
47-
state: 'attached',
48-
timeout: 20000,
49-
});
50-
51-
// Wait for Drupal's autocomplete behavior to finish initializing
52-
await page.waitForFunction(() => {
53-
const input = document.querySelector('[data-drupal-selector="edit-field-visibility-0-target-id"]');
54-
const message = document.querySelector('[data-drupal-selector="autocomplete-message"]');
55-
// Ready when input exists, is visible, and loading message (if any) is hidden
56-
return (
57-
input &&
58-
input.offsetParent !== null &&
59-
(!message || message.classList.contains('hidden'))
60-
);
61-
}, { timeout: 15000 });
62-
6345
// Check General Visibility
6446
// const visibilityInput = page.locator('[data-drupal-selector="edit-field-visibility-wrapper"] input');
6547
// await visibilityInput.waitFor({ state: 'visible', timeout: 10000 });
6648
// Verify the field is visible and editable
6749
const visibilityInput = page.locator('[data-drupal-selector="edit-field-visibility-0-target-id"]');
68-
await visibilityInput.fill('General');
50+
await visibilityInput.fill('1');
6951

7052
// Add menu
7153
await page.locator('[data-drupal-selector="edit-menu"]').first().locator('summary').click();
@@ -98,8 +80,8 @@ export async function createCWLPage(page, cwlpageURL, titleMessage, bodyMessage)
9880

9981
// Check General Visibility
10082
const visibilityInput = page.locator('[data-drupal-selector="edit-field-visibility-wrapper"] input');
101-
await visibilityInput.waitFor({ state: 'visible', timeout: 50000 });
102-
await visibilityInput.fill('CWL');
83+
// await visibilityInput.waitFor({ state: 'visible', timeout: 50000 });
84+
await visibilityInput.fill('2');
10385

10486
// Add menu
10587
await page.locator('[data-drupal-selector="edit-menu"]').first().locator('summary').click();

0 commit comments

Comments
 (0)