1
0
mirror of https://git.cloudron.io/cloudron/minio-app synced 2025-09-13 08:19:12 +00:00

create bucket test updated

This commit is contained in:
Vladimir D
2025-04-23 15:37:51 +04:00
parent 2d9ad57e0b
commit c021c66390

View File

@@ -35,7 +35,8 @@ describe('Application life cycle test', function () {
const password = process.env.PASSWORD; const password = process.env.PASSWORD;
before(function () { before(function () {
const chromeOptions = new Options().windowSize({ width: 1280, height: 1024 }); const chromeOptions = new Options().windowSize({ width: 1600, height: 1024 });
chromeOptions.addArguments('guest'); // disable password checks
if (process.env.CI) chromeOptions.addArguments('no-sandbox', 'disable-dev-shm-usage', 'headless'); if (process.env.CI) chromeOptions.addArguments('no-sandbox', 'disable-dev-shm-usage', 'headless');
browser = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build(); browser = new Builder().forBrowser('chrome').setChromeOptions(chromeOptions).build();
if (!fs.existsSync('./screenshots')) fs.mkdirSync('./screenshots'); if (!fs.existsSync('./screenshots')) fs.mkdirSync('./screenshots');
@@ -124,11 +125,12 @@ describe('Application life cycle test', function () {
await browser.get(`https://${app.fqdn}/buckets`); await browser.get(`https://${app.fqdn}/buckets`);
await waitForElement(By.xpath('//button[@id="create-bucket"]')); await waitForElement(By.xpath('//button[@id="create-bucket"]'));
await browser.findElement(By.xpath('//button[@id="create-bucket"]')).click(); await browser.findElement(By.xpath('//button[@id="create-bucket"]')).click();
await browser.sleep(2000); await browser.sleep(1000);
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 waitForElement(By.xpath(`//h1[contains(text(), "${BUCKET}")]`)); await waitForElement(By.xpath(`//h1[contains(text(), "${BUCKET}")]`));
await timers.setTimeout(5000);
} }
async function checkBucket() { async function checkBucket() {
@@ -168,7 +170,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); });
// // no SSO // no SSO
it('install app (no SSO)', async function () { it('install app (no SSO)', async function () {
execSync(`cloudron install --no-sso --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS); execSync(`cloudron install --no-sso --location ${LOCATION} --secondary-domains API_SERVER_DOMAIN=${LOCATION}-api`, EXEC_ARGS);
await timers.setTimeout(10000); await timers.setTimeout(10000);