1
0
mirror of https://git.cloudron.io/cloudron/gitea-app synced 2026-04-25 12:13:03 +00:00

test: drop redundant scrollIntoView usage

Remove explicit scrollIntoView calls in Charlie-based test flows now that interactions auto-scroll elements.

Made-with: Cursor
This commit is contained in:
Girish Ramakrishnan
2026-04-21 12:39:12 +02:00
parent d7d7449180
commit cdb45943d3
-4
View File
@@ -13,7 +13,6 @@ import {
executeScript, executeScript,
goto, goto,
loginOIDC, loginOIDC,
scrollIntoView,
sendKeys, sendKeys,
setInputFiles, setInputFiles,
setupBrowser, setupBrowser,
@@ -44,7 +43,6 @@ describe('Application life cycle test', function () {
async function setAvatar() { async function setAvatar() {
await goto(`https://${app.fqdn}/user/settings`, '//label[contains(text(), "Use Custom Avatar")]'); await goto(`https://${app.fqdn}/user/settings`, '//label[contains(text(), "Use Custom Avatar")]');
await scrollIntoView('//label[contains(text(), "Use Custom Avatar")]');
await click('//label[contains(text(), "Use Custom Avatar")]'); await click('//label[contains(text(), "Use Custom Avatar")]');
await setInputFiles('//input[@type="file" and @name="avatar"]', path.resolve(import.meta.dirname, '../logo.png')); await setInputFiles('//input[@type="file" and @name="avatar"]', path.resolve(import.meta.dirname, '../logo.png'));
await click('//button[contains(text(), "Update Avatar")]'); await click('//button[contains(text(), "Update Avatar")]');
@@ -104,7 +102,6 @@ describe('Application life cycle test', function () {
await click('#add-ssh-button'); await click('#add-ssh-button');
await sendKeys('#ssh-key-title', 'testkey'); await sendKeys('#ssh-key-title', 'testkey');
await sendKeys('#ssh-key-content', fs.readFileSync(`${import.meta.dirname}/id_ed25519.pub`, 'utf8').trim()); await sendKeys('#ssh-key-content', fs.readFileSync(`${import.meta.dirname}/id_ed25519.pub`, 'utf8').trim());
await scrollIntoView('//button[contains(text(), "Add Key")]');
await click('//form//button[contains(text(),"Add Key")]'); await click('//form//button[contains(text(),"Add Key")]');
await waitForElement('//p[contains(text(), "has been added.")]'); await waitForElement('//p[contains(text(), "has been added.")]');
} }
@@ -112,7 +109,6 @@ describe('Application life cycle test', function () {
async function createRepo() { async function createRepo() {
await goto(`https://${app.fqdn}/repo/create`, '#repo_name'); await goto(`https://${app.fqdn}/repo/create`, '#repo_name');
await sendKeys('#repo_name', reponame); await sendKeys('#repo_name', reponame);
await scrollIntoView('//button[contains(text(), "Create Repository")]');
await click('#auto-init'); await click('#auto-init');
await click('//button[contains(text(), "Create Repository")]'); await click('//button[contains(text(), "Create Repository")]');
await waitForPath(`/${username}/${reponame}`); await waitForPath(`/${username}/${reponame}`);