mirror of
https://git.cloudron.io/cloudron/minio-app
synced 2025-09-13 08:19:12 +00:00
every refresh wants license acceptance
This commit is contained in:
27
test/test.js
27
test/test.js
@@ -70,7 +70,6 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
async function confirmLicense() {
|
async function confirmLicense() {
|
||||||
await timers.setTimeout(5000);
|
await timers.setTimeout(5000);
|
||||||
console.log('confirming license');
|
|
||||||
await waitForElement(By.id('acknowledge-confirm'));
|
await waitForElement(By.id('acknowledge-confirm'));
|
||||||
const button = await browser.findElement(By.id('acknowledge-confirm'));
|
const button = await browser.findElement(By.id('acknowledge-confirm'));
|
||||||
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
||||||
@@ -98,8 +97,10 @@ describe('Application life cycle test', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function logout() {
|
async function logout() {
|
||||||
await browser.get(`https://${app.fqdn}/`);
|
await browser.sleep(10000);
|
||||||
await waitForElement(By.xpath('//span[contains(text(), "Buckets")]'));
|
// await browser.get(`https://${app.fqdn}/`);
|
||||||
|
await waitForElement(By.xpath('//button[contains(., "Create Bucket")]'));
|
||||||
|
|
||||||
const button = await browser.findElement(By.xpath('//button[@id="sign-out"]'));
|
const button = await browser.findElement(By.xpath('//button[@id="sign-out"]'));
|
||||||
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
await browser.executeScript('arguments[0].scrollIntoView(false)', button);
|
||||||
await button.click();
|
await button.click();
|
||||||
@@ -108,19 +109,20 @@ describe('Application life cycle test', function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function addBucket() {
|
async function addBucket() {
|
||||||
await browser.get(`https://${app.fqdn}/buckets`);
|
// await browser.get(`https://${app.fqdn}/buckets`);
|
||||||
await waitForElement(By.xpath('//button[contains(., "Create Bucket")]'));
|
await waitForElement(By.xpath('//button[contains(., "Create Bucket")]'));
|
||||||
await browser.findElement(By.xpath('//button[contains(., "Create Bucket")]')).click();
|
await browser.findElement(By.xpath('//button[contains(., "Create Bucket")]')).click();
|
||||||
await browser.sleep(1000);
|
await browser.sleep(1000);
|
||||||
await waitForElement(By.xpath('//input[@id="bucket-name"]'));
|
await waitForElement(By.xpath('//input[@id="bucket-name"]'));
|
||||||
await browser.findElement(By.xpath('//input[@id="bucket-name"]')).sendKeys(BUCKET);
|
await browser.findElement(By.xpath('//input[@id="bucket-name"]')).sendKeys(BUCKET);
|
||||||
await browser.findElement(By.xpath('//button[@id="create-bucket"]')).click();
|
await browser.findElement(By.xpath('//button[@id="create-bucket"]')).click();
|
||||||
await browser.get(`https://${app.fqdn}/buckets`);
|
// await browser.get(`https://${app.fqdn}/buckets`);
|
||||||
await waitForElement(By.xpath(`//h1[contains(text(), "${BUCKET}")]`));
|
await waitForElement(By.xpath(`//h1[contains(text(), "${BUCKET}")]`));
|
||||||
}
|
}
|
||||||
|
|
||||||
async function checkBucket() {
|
async function checkBucket() {
|
||||||
await browser.get(`https://${app.fqdn}/buckets`);
|
await browser.sleep(10000);
|
||||||
|
// await browser.get(`https://${app.fqdn}/buckets`);
|
||||||
await waitForElement(By.xpath(`//h1[contains(text(), "${BUCKET}")]`));
|
await waitForElement(By.xpath(`//h1[contains(text(), "${BUCKET}")]`));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +158,7 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
xit('build app', function () { execSync('cloudron build', EXEC_ARGS); });
|
||||||
|
|
||||||
xit('install app', async function () {
|
it('install app', async function () {
|
||||||
execSync(`cloudron install --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS);
|
execSync(`cloudron install --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS);
|
||||||
await timers.setTimeout(10000);
|
await timers.setTimeout(10000);
|
||||||
});
|
});
|
||||||
@@ -175,7 +177,7 @@ describe('Application life cycle test', function () {
|
|||||||
await timers.setTimeout(10000);
|
await timers.setTimeout(10000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('can admin login', login.bind(null, 'minioakey', 'minioskey'));
|
it('can admin login', login.bind(null, 'minioakey', 'minioskey', true));
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
it('does redirect', checkRedirect);
|
it('does redirect', checkRedirect);
|
||||||
@@ -192,7 +194,7 @@ describe('Application life cycle test', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
it('can admin login', login.bind(null, 'minioakey', 'minioskey'));
|
it('can admin login', login.bind(null, 'minioakey', 'minioskey', true));
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
@@ -206,7 +208,7 @@ describe('Application life cycle test', function () {
|
|||||||
});
|
});
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
|
|
||||||
it('can admin login', login.bind(null, 'minioakey', 'minioskey'));
|
it('can admin login', login.bind(null, 'minioakey', 'minioskey', true));
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
@@ -220,7 +222,7 @@ describe('Application life cycle test', function () {
|
|||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
|
|
||||||
it('can get admin credentials', getAdminCredentials);
|
it('can get admin credentials', getAdminCredentials);
|
||||||
it('can admin login', async function () { await login('minioadmin', rootPassword); });
|
it('can admin login', async () => await login('minioadmin', rootPassword, true));
|
||||||
it('can add buckets', addBucket);
|
it('can add buckets', addBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
@@ -228,7 +230,7 @@ describe('Application life cycle test', function () {
|
|||||||
it('can configure', function () { execSync(`cloudron configure --app ${LOCATION} --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS); });
|
it('can configure', function () { execSync(`cloudron configure --app ${LOCATION} --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS); });
|
||||||
it('can get app information', getAppInfo);
|
it('can get app information', getAppInfo);
|
||||||
|
|
||||||
it('can admin login', async function () { await login('minioadmin', rootPassword); });
|
it('can admin login', async () => await login('minioadmin', rootPassword, true));
|
||||||
it('has bucket', checkBucket);
|
it('has bucket', checkBucket);
|
||||||
it('can logout', logout);
|
it('can logout', logout);
|
||||||
|
|
||||||
@@ -237,4 +239,3 @@ describe('Application life cycle test', function () {
|
|||||||
|
|
||||||
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
|
it('uninstall app', function () { execSync('cloudron uninstall --app ' + app.id, EXEC_ARGS); });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user