MCPcopy Create free account
hub / github.com/Rello/analytics / setPasswordProtection

Function setPasswordProtection

tests/playwright/50_navigation_share.js:110–121  ·  view source on GitHub ↗
(row, password)

Source from the content-addressed store, hash-verified

108}
109
110async function setPasswordProtection(row, password) {
111 const menu = await openShareRowMenu(row);
112 const passwordToggle = menu.locator('input[id^="showPassword"]').first();
113 if (!(await passwordToggle.isChecked())) {
114 await menu.locator('label[for^="showPassword"]').first().click();
115 }
116 const passwordInput = row.locator('.linkPassText').first();
117 await passwordInput.waitFor({ state: 'visible', timeout: 10000 });
118 await passwordInput.fill(password);
119 await row.locator('#linkPassSubmit, .share-pass-submit').first().click();
120 await row.waitFor({ state: 'detached', timeout: 15000 }).catch(() => {});
121}
122
123async function setNavigationPermission(row, enabled) {
124 const menu = await openShareRowMenu(row);

Callers 1

Calls 2

openShareRowMenuFunction · 0.85
firstMethod · 0.80

Tested by

no test coverage detected