mirror of
https://git.cloudron.io/cloudron/gitea-app
synced 2026-04-25 12:13:03 +00:00
test: switch waitForElement to waitFor
Made-with: Cursor
This commit is contained in:
+5
-5
@@ -19,7 +19,7 @@ import {
|
||||
takeScreenshot,
|
||||
teardownBrowser,
|
||||
username,
|
||||
waitForElement,
|
||||
waitFor,
|
||||
waitForUrl
|
||||
} from '@cloudron/charlie';
|
||||
|
||||
@@ -46,7 +46,7 @@ describe('Application life cycle test', function () {
|
||||
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")]');
|
||||
await waitForElement('//p[contains(text(),"Your avatar has been updated.")]');
|
||||
await waitFor('Your avatar has been updated.');
|
||||
}
|
||||
|
||||
async function checkAvatar() {
|
||||
@@ -63,7 +63,7 @@ describe('Application life cycle test', function () {
|
||||
await sendKeys('#user_name', user);
|
||||
await sendKeys('#password', passwd);
|
||||
await click('//form[@action="/user/login"]//button');
|
||||
await waitForElement('//nav//img[contains(@class, "avatar")]');
|
||||
await waitFor('xpath=//nav//img[contains(@class, "avatar")]');
|
||||
}
|
||||
|
||||
async function adminLogin() {
|
||||
@@ -87,7 +87,7 @@ describe('Application life cycle test', function () {
|
||||
async function logout() {
|
||||
await goto(`https://${app.fqdn}`, '//nav//img[contains(@class, "avatar")]');
|
||||
await click('//nav//img[contains(@class, "avatar")]');
|
||||
await waitForElement('//a[@href="/user/logout"]');
|
||||
await waitFor('css=a[href="/user/logout"]');
|
||||
await click('//a[@href="/user/logout"]');
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ describe('Application life cycle test', function () {
|
||||
await sendKeys('#ssh-key-title', 'testkey');
|
||||
await sendKeys('#ssh-key-content', fs.readFileSync(`${import.meta.dirname}/id_ed25519.pub`, 'utf8').trim());
|
||||
await click('//form//button[contains(text(),"Add Key")]');
|
||||
await waitForElement('//p[contains(text(), "has been added.")]');
|
||||
await waitFor('has been added.');
|
||||
}
|
||||
|
||||
async function createRepo() {
|
||||
|
||||
Reference in New Issue
Block a user