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:
@@ -13,7 +13,6 @@ import {
|
||||
executeScript,
|
||||
goto,
|
||||
loginOIDC,
|
||||
scrollIntoView,
|
||||
sendKeys,
|
||||
setInputFiles,
|
||||
setupBrowser,
|
||||
@@ -44,7 +43,6 @@ describe('Application life cycle test', function () {
|
||||
|
||||
async function setAvatar() {
|
||||
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 setInputFiles('//input[@type="file" and @name="avatar"]', path.resolve(import.meta.dirname, '../logo.png'));
|
||||
await click('//button[contains(text(), "Update Avatar")]');
|
||||
@@ -104,7 +102,6 @@ describe('Application life cycle test', function () {
|
||||
await click('#add-ssh-button');
|
||||
await sendKeys('#ssh-key-title', 'testkey');
|
||||
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 waitForElement('//p[contains(text(), "has been added.")]');
|
||||
}
|
||||
@@ -112,7 +109,6 @@ describe('Application life cycle test', function () {
|
||||
async function createRepo() {
|
||||
await goto(`https://${app.fqdn}/repo/create`, '#repo_name');
|
||||
await sendKeys('#repo_name', reponame);
|
||||
await scrollIntoView('//button[contains(text(), "Create Repository")]');
|
||||
await click('#auto-init');
|
||||
await click('//button[contains(text(), "Create Repository")]');
|
||||
await waitForPath(`/${username}/${reponame}`);
|
||||
|
||||
Reference in New Issue
Block a user