mirror of
https://github.com/wahyd4/charts.git
synced 2026-08-09 05:06:29 +10:00
[bitnami/phpbb] Add tests and publish using VIB (#11705)
* [bitnami/phpbb] Add test and publish using VIB Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Simplify some selectors Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> * Increase robustness Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com> Signed-off-by: Jose Antonio Carmona <jcarmona@vmware.com>
This commit is contained in:
@@ -33,6 +33,7 @@ on: # rebuild any PRs and main branch changes
|
||||
- 'bitnami/odoo/**'
|
||||
- 'bitnami/opencart/**'
|
||||
- 'bitnami/owncloud/**'
|
||||
- 'bitnami/phpbb/**'
|
||||
- 'bitnami/phpmyadmin/**'
|
||||
- 'bitnami/pinniped/**'
|
||||
- 'bitnami/postgresql/**'
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"baseUrl": "http://localhost",
|
||||
"defaultCommandTimeout": 30000,
|
||||
"env": {
|
||||
"username": "user",
|
||||
"password": "ComplicatedPassword123!4"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"newTopic": {
|
||||
"subject": "Super Topic",
|
||||
"content": "Aixo es el mateix Lorem ipsum content"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
/// <reference types="cypress" />
|
||||
import { random } from '../support/utils';
|
||||
|
||||
it('allows to access Administrator Control Panel', () => {
|
||||
cy.login();
|
||||
cy.contains('Administration Control Panel').click();
|
||||
// ACP requires double login
|
||||
cy.get('[type="password"]').type(Cypress.env('password'));
|
||||
cy.get('[name=login]').click();
|
||||
cy.contains('ACP Logout');
|
||||
});
|
||||
|
||||
it('allows to create a topic', () => {
|
||||
cy.login();
|
||||
cy.get('.forumtitle').click();
|
||||
cy.contains('New Topic').click();
|
||||
cy.fixture('topics').then((topic) => {
|
||||
cy.get('[name="subject"]').type(`${topic.newTopic.subject}-${random}`);
|
||||
cy.get('#message').type(`${topic.newTopic.content} ${random}`);
|
||||
cy.contains('Attachments').click();
|
||||
cy.get('[type=file]').selectFile('cypress/fixtures/images/post_image.png', { force: true });
|
||||
cy.get('.file-uploaded');
|
||||
cy.contains('Submit').click();
|
||||
cy.visit('/search.php?search_id=newposts');
|
||||
cy.contains(`${topic.newTopic.subject}-${random}`);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,27 @@
|
||||
const COMMAND_DELAY = 2000;
|
||||
|
||||
for (const command of ['click']) {
|
||||
Cypress.Commands.overwrite(command, (originalFn, ...args) => {
|
||||
const origVal = originalFn(...args);
|
||||
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve(origVal);
|
||||
}, COMMAND_DELAY);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Cypress.Commands.add(
|
||||
'login',
|
||||
(username = Cypress.env('username'), password = Cypress.env('password')) => {
|
||||
// Using the specific URL results in random authentication errors
|
||||
cy.visit('/');
|
||||
cy.contains('Login').click();
|
||||
cy.get('#username').type(username);
|
||||
cy.get('#password').type(password);
|
||||
cy.get('[name=login]').click();
|
||||
// The authentication is not completed until the page is rendered
|
||||
cy.contains('Notifications');
|
||||
}
|
||||
);
|
||||
@@ -0,0 +1,20 @@
|
||||
// ***********************************************************
|
||||
// This example support/index.js is processed and
|
||||
// loaded automatically before your test files.
|
||||
//
|
||||
// This is a great place to put global configuration and
|
||||
// behavior that modifies Cypress.
|
||||
//
|
||||
// You can change the location of this file or turn off
|
||||
// automatically serving support files with the
|
||||
// 'supportFile' configuration option.
|
||||
//
|
||||
// You can read more here:
|
||||
// https://on.cypress.io/configuration
|
||||
// ***********************************************************
|
||||
|
||||
// Import commands.js using ES2015 syntax:
|
||||
import './commands';
|
||||
|
||||
// Alternatively you can use CommonJS syntax:
|
||||
// require('./commands')
|
||||
@@ -0,0 +1,3 @@
|
||||
/// <reference types="cypress" />
|
||||
|
||||
export let random = (Math.random() + 1).toString(36).substring(7);
|
||||
@@ -0,0 +1,5 @@
|
||||
file:
|
||||
/bitnami/phpbb:
|
||||
exists: true
|
||||
mode: "2755"
|
||||
filetype: directory
|
||||
@@ -22,7 +22,7 @@
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "/bitnami/phpbb"
|
||||
},
|
||||
"runtime_parameters": "InBocGJiUGFzc3dvcmQiOiAiYml0bmFtaSIKInNlcnZpY2UiOgogICJwb3J0IjogODAKICAidHlwZSI6ICJMb2FkQmFsYW5jZXIi",
|
||||
"runtime_parameters": "cGhwYmJVc2VybmFtZTogInVzZXIiCnBocGJiUGFzc3dvcmQ6ICJDb21wbGljYXRlZFBhc3N3b3JkMTIzITQiCnNlcnZpY2U6CiAgdHlwZTogTG9hZEJhbGFuY2VyCiAgcG9ydHM6CiAgICBodHRwOiA4MAo=",
|
||||
"target_platform": {
|
||||
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
|
||||
"size": {
|
||||
@@ -37,6 +37,31 @@
|
||||
"endpoint": "lb-phpbb-http",
|
||||
"app_protocol": "HTTP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/phpbb/goss"
|
||||
},
|
||||
"remote": {
|
||||
"workload": "deploy-phpbb"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "cypress",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/phpbb/cypress"
|
||||
},
|
||||
"endpoint": "lb-phpbb-http",
|
||||
"app_protocol": "HTTP",
|
||||
"env": {
|
||||
"username": "user",
|
||||
"password": "ComplicatedPassword123!4"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"url": "{SHA_ARCHIVE}",
|
||||
"path": "/bitnami/phpbb"
|
||||
},
|
||||
"runtime_parameters": "InBocGJiUGFzc3dvcmQiOiAiYml0bmFtaSIKInNlcnZpY2UiOgogICJwb3J0IjogODAKICAidHlwZSI6ICJMb2FkQmFsYW5jZXIi",
|
||||
"runtime_parameters": "cGhwYmJVc2VybmFtZTogInVzZXIiCnBocGJiUGFzc3dvcmQ6ICJDb21wbGljYXRlZFBhc3N3b3JkMTIzITQiCnNlcnZpY2U6CiAgdHlwZTogTG9hZEJhbGFuY2VyCiAgcG9ydHM6CiAgICBodHRwOiA4MAo=",
|
||||
"target_platform": {
|
||||
"target_platform_id": "{VIB_ENV_TARGET_PLATFORM}",
|
||||
"size": {
|
||||
@@ -37,6 +37,31 @@
|
||||
"endpoint": "lb-phpbb-http",
|
||||
"app_protocol": "HTTP"
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "goss",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/phpbb/goss"
|
||||
},
|
||||
"remote": {
|
||||
"workload": "deploy-phpbb"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"action_id": "cypress",
|
||||
"params": {
|
||||
"resources": {
|
||||
"path": "/.vib/phpbb/cypress"
|
||||
},
|
||||
"endpoint": "lb-phpbb-http",
|
||||
"app_protocol": "HTTP",
|
||||
"env": {
|
||||
"username": "user",
|
||||
"password": "ComplicatedPassword123!4"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user