generazione applicazione e entita

This commit is contained in:
2025-12-10 17:19:16 +01:00
parent e4b8486f4b
commit 9ad99bd05f
363 changed files with 36699 additions and 44 deletions

View File

@@ -0,0 +1,192 @@
import {
entityConfirmDeleteButtonSelector,
entityCreateButtonSelector,
entityCreateCancelButtonSelector,
entityCreateSaveButtonSelector,
entityDeleteButtonSelector,
entityDetailsBackButtonSelector,
entityDetailsButtonSelector,
entityEditButtonSelector,
entityTableSelector,
} from '../../support/entity';
describe('AuditLog e2e test', () => {
const auditLogPageUrl = '/audit-log';
const auditLogPageUrlPattern = new RegExp('/audit-log(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? 'user';
const password = Cypress.env('E2E_PASSWORD') ?? 'user';
const auditLogSample = {};
let auditLog;
beforeEach(() => {
cy.login(username, password);
});
beforeEach(() => {
cy.intercept('GET', '/api/audit-logs+(?*|)').as('entitiesRequest');
cy.intercept('POST', '/api/audit-logs').as('postEntityRequest');
cy.intercept('DELETE', '/api/audit-logs/*').as('deleteEntityRequest');
});
afterEach(() => {
if (auditLog) {
cy.authenticatedRequest({
method: 'DELETE',
url: `/api/audit-logs/${auditLog.id}`,
}).then(() => {
auditLog = undefined;
});
}
});
it('AuditLogs menu should load AuditLogs page', () => {
cy.visit('/');
cy.clickOnEntityMenuItem('audit-log');
cy.wait('@entitiesRequest').then(({ response }) => {
if (response?.body.length === 0) {
cy.get(entityTableSelector).should('not.exist');
} else {
cy.get(entityTableSelector).should('exist');
}
});
cy.getEntityHeading('AuditLog').should('exist');
cy.url().should('match', auditLogPageUrlPattern);
});
describe('AuditLog page', () => {
describe('create button click', () => {
beforeEach(() => {
cy.visit(auditLogPageUrl);
cy.wait('@entitiesRequest');
});
it('should load create AuditLog page', () => {
cy.get(entityCreateButtonSelector).click();
cy.url().should('match', new RegExp('/audit-log/new$'));
cy.getEntityCreateUpdateHeading('AuditLog');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', auditLogPageUrlPattern);
});
});
describe('with existing value', () => {
beforeEach(() => {
cy.authenticatedRequest({
method: 'POST',
url: '/api/audit-logs',
body: auditLogSample,
}).then(({ body }) => {
auditLog = body;
cy.intercept(
{
method: 'GET',
url: '/api/audit-logs+(?*|)',
times: 1,
},
{
statusCode: 200,
headers: {
link: '<http://localhost/api/audit-logs?page=0&size=20>; rel="last",<http://localhost/api/audit-logs?page=0&size=20>; rel="first"',
},
body: [auditLog],
},
).as('entitiesRequestInternal');
});
cy.visit(auditLogPageUrl);
cy.wait('@entitiesRequestInternal');
});
it('detail button click should load details AuditLog page', () => {
cy.get(entityDetailsButtonSelector).first().click();
cy.getEntityDetailsHeading('auditLog');
cy.get(entityDetailsBackButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', auditLogPageUrlPattern);
});
it('edit button click should load edit AuditLog page and go back', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('AuditLog');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', auditLogPageUrlPattern);
});
it('edit button click should load edit AuditLog page and save', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('AuditLog');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', auditLogPageUrlPattern);
});
it('last delete button click should delete instance of AuditLog', () => {
cy.get(entityDeleteButtonSelector).last().click();
cy.getEntityDeleteDialogHeading('auditLog').should('exist');
cy.get(entityConfirmDeleteButtonSelector).click();
cy.wait('@deleteEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(204);
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', auditLogPageUrlPattern);
auditLog = undefined;
});
});
});
describe('new AuditLog page', () => {
beforeEach(() => {
cy.visit(auditLogPageUrl);
cy.get(entityCreateButtonSelector).click();
cy.getEntityCreateUpdateHeading('AuditLog');
});
it('should create an instance of AuditLog', () => {
cy.get(`[data-cy="entitaTipo"]`).select('CONFERMA');
cy.get(`[data-cy="entitaId"]`).type('4178');
cy.get(`[data-cy="entitaId"]`).should('have.value', '4178');
cy.get(`[data-cy="azione"]`).select('DELETE');
cy.get(`[data-cy="dettagli"]`).type('avalanche');
cy.get(`[data-cy="dettagli"]`).should('have.value', 'avalanche');
cy.get(`[data-cy="ipAddress"]`).type('phooey royal concerning');
cy.get(`[data-cy="ipAddress"]`).should('have.value', 'phooey royal concerning');
cy.get(`[data-cy="createdAt"]`).type('2025-12-10T02:16');
cy.get(`[data-cy="createdAt"]`).blur();
cy.get(`[data-cy="createdAt"]`).should('have.value', '2025-12-10T02:16');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@postEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(201);
auditLog = response.body;
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', auditLogPageUrlPattern);
});
});
});

View File

@@ -0,0 +1,180 @@
import {
entityConfirmDeleteButtonSelector,
entityCreateButtonSelector,
entityCreateCancelButtonSelector,
entityCreateSaveButtonSelector,
entityDeleteButtonSelector,
entityDetailsBackButtonSelector,
entityDetailsButtonSelector,
entityEditButtonSelector,
entityTableSelector,
} from '../../support/entity';
describe('Conferma e2e test', () => {
const confermaPageUrl = '/conferma';
const confermaPageUrlPattern = new RegExp('/conferma(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? 'user';
const password = Cypress.env('E2E_PASSWORD') ?? 'user';
const confermaSample = {};
let conferma;
beforeEach(() => {
cy.login(username, password);
});
beforeEach(() => {
cy.intercept('GET', '/api/confermas+(?*|)').as('entitiesRequest');
cy.intercept('POST', '/api/confermas').as('postEntityRequest');
cy.intercept('DELETE', '/api/confermas/*').as('deleteEntityRequest');
});
afterEach(() => {
if (conferma) {
cy.authenticatedRequest({
method: 'DELETE',
url: `/api/confermas/${conferma.id}`,
}).then(() => {
conferma = undefined;
});
}
});
it('Confermas menu should load Confermas page', () => {
cy.visit('/');
cy.clickOnEntityMenuItem('conferma');
cy.wait('@entitiesRequest').then(({ response }) => {
if (response?.body.length === 0) {
cy.get(entityTableSelector).should('not.exist');
} else {
cy.get(entityTableSelector).should('exist');
}
});
cy.getEntityHeading('Conferma').should('exist');
cy.url().should('match', confermaPageUrlPattern);
});
describe('Conferma page', () => {
describe('create button click', () => {
beforeEach(() => {
cy.visit(confermaPageUrl);
cy.wait('@entitiesRequest');
});
it('should load create Conferma page', () => {
cy.get(entityCreateButtonSelector).click();
cy.url().should('match', new RegExp('/conferma/new$'));
cy.getEntityCreateUpdateHeading('Conferma');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', confermaPageUrlPattern);
});
});
describe('with existing value', () => {
beforeEach(() => {
cy.authenticatedRequest({
method: 'POST',
url: '/api/confermas',
body: confermaSample,
}).then(({ body }) => {
conferma = body;
cy.intercept(
{
method: 'GET',
url: '/api/confermas+(?*|)',
times: 1,
},
{
statusCode: 200,
headers: {
link: '<http://localhost/api/confermas?page=0&size=20>; rel="last",<http://localhost/api/confermas?page=0&size=20>; rel="first"',
},
body: [conferma],
},
).as('entitiesRequestInternal');
});
cy.visit(confermaPageUrl);
cy.wait('@entitiesRequestInternal');
});
it('detail button click should load details Conferma page', () => {
cy.get(entityDetailsButtonSelector).first().click();
cy.getEntityDetailsHeading('conferma');
cy.get(entityDetailsBackButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', confermaPageUrlPattern);
});
it('edit button click should load edit Conferma page and go back', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Conferma');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', confermaPageUrlPattern);
});
it('edit button click should load edit Conferma page and save', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Conferma');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', confermaPageUrlPattern);
});
it('last delete button click should delete instance of Conferma', () => {
cy.get(entityDeleteButtonSelector).last().click();
cy.getEntityDeleteDialogHeading('conferma').should('exist');
cy.get(entityConfirmDeleteButtonSelector).click();
cy.wait('@deleteEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(204);
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', confermaPageUrlPattern);
conferma = undefined;
});
});
});
describe('new Conferma page', () => {
beforeEach(() => {
cy.visit(confermaPageUrl);
cy.get(entityCreateButtonSelector).click();
cy.getEntityCreateUpdateHeading('Conferma');
});
it('should create an instance of Conferma', () => {
cy.get(`[data-cy="motivoConferma"]`).type('decent');
cy.get(`[data-cy="motivoConferma"]`).should('have.value', 'decent');
cy.get(`[data-cy="tipoConferma"]`).select('RIFIUTATA');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@postEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(201);
conferma = response.body;
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', confermaPageUrlPattern);
});
});
});

View File

@@ -0,0 +1,200 @@
import {
entityConfirmDeleteButtonSelector,
entityCreateButtonSelector,
entityCreateCancelButtonSelector,
entityCreateSaveButtonSelector,
entityDeleteButtonSelector,
entityDetailsBackButtonSelector,
entityDetailsButtonSelector,
entityEditButtonSelector,
entityTableSelector,
} from '../../support/entity';
describe('Disponibilita e2e test', () => {
const disponibilitaPageUrl = '/disponibilita';
const disponibilitaPageUrlPattern = new RegExp('/disponibilita(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? 'user';
const password = Cypress.env('E2E_PASSWORD') ?? 'user';
const disponibilitaSample = {};
let disponibilita;
beforeEach(() => {
cy.login(username, password);
});
beforeEach(() => {
cy.intercept('GET', '/api/disponibilitas+(?*|)').as('entitiesRequest');
cy.intercept('POST', '/api/disponibilitas').as('postEntityRequest');
cy.intercept('DELETE', '/api/disponibilitas/*').as('deleteEntityRequest');
});
afterEach(() => {
if (disponibilita) {
cy.authenticatedRequest({
method: 'DELETE',
url: `/api/disponibilitas/${disponibilita.id}`,
}).then(() => {
disponibilita = undefined;
});
}
});
it('Disponibilitas menu should load Disponibilitas page', () => {
cy.visit('/');
cy.clickOnEntityMenuItem('disponibilita');
cy.wait('@entitiesRequest').then(({ response }) => {
if (response?.body.length === 0) {
cy.get(entityTableSelector).should('not.exist');
} else {
cy.get(entityTableSelector).should('exist');
}
});
cy.getEntityHeading('Disponibilita').should('exist');
cy.url().should('match', disponibilitaPageUrlPattern);
});
describe('Disponibilita page', () => {
describe('create button click', () => {
beforeEach(() => {
cy.visit(disponibilitaPageUrl);
cy.wait('@entitiesRequest');
});
it('should load create Disponibilita page', () => {
cy.get(entityCreateButtonSelector).click();
cy.url().should('match', new RegExp('/disponibilita/new$'));
cy.getEntityCreateUpdateHeading('Disponibilita');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', disponibilitaPageUrlPattern);
});
});
describe('with existing value', () => {
beforeEach(() => {
cy.authenticatedRequest({
method: 'POST',
url: '/api/disponibilitas',
body: disponibilitaSample,
}).then(({ body }) => {
disponibilita = body;
cy.intercept(
{
method: 'GET',
url: '/api/disponibilitas+(?*|)',
times: 1,
},
{
statusCode: 200,
headers: {
link: '<http://localhost/api/disponibilitas?page=0&size=20>; rel="last",<http://localhost/api/disponibilitas?page=0&size=20>; rel="first"',
},
body: [disponibilita],
},
).as('entitiesRequestInternal');
});
cy.visit(disponibilitaPageUrl);
cy.wait('@entitiesRequestInternal');
});
it('detail button click should load details Disponibilita page', () => {
cy.get(entityDetailsButtonSelector).first().click();
cy.getEntityDetailsHeading('disponibilita');
cy.get(entityDetailsBackButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', disponibilitaPageUrlPattern);
});
it('edit button click should load edit Disponibilita page and go back', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Disponibilita');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', disponibilitaPageUrlPattern);
});
it('edit button click should load edit Disponibilita page and save', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Disponibilita');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', disponibilitaPageUrlPattern);
});
it('last delete button click should delete instance of Disponibilita', () => {
cy.get(entityDeleteButtonSelector).last().click();
cy.getEntityDeleteDialogHeading('disponibilita').should('exist');
cy.get(entityConfirmDeleteButtonSelector).click();
cy.wait('@deleteEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(204);
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', disponibilitaPageUrlPattern);
disponibilita = undefined;
});
});
});
describe('new Disponibilita page', () => {
beforeEach(() => {
cy.visit(disponibilitaPageUrl);
cy.get(entityCreateButtonSelector).click();
cy.getEntityCreateUpdateHeading('Disponibilita');
});
it('should create an instance of Disponibilita', () => {
cy.get(`[data-cy="giornoSettimana"]`).select('MARTEDI');
cy.get(`[data-cy="dataSpecifica"]`).type('2025-12-10');
cy.get(`[data-cy="dataSpecifica"]`).blur();
cy.get(`[data-cy="dataSpecifica"]`).should('have.value', '2025-12-10');
cy.get(`[data-cy="oraInizio"]`).type('2025-12-10T14:03');
cy.get(`[data-cy="oraInizio"]`).blur();
cy.get(`[data-cy="oraInizio"]`).should('have.value', '2025-12-10T14:03');
cy.get(`[data-cy="oraFine"]`).type('2025-12-10T06:53');
cy.get(`[data-cy="oraFine"]`).blur();
cy.get(`[data-cy="oraFine"]`).should('have.value', '2025-12-10T06:53');
cy.get(`[data-cy="orarioInizio"]`).type('wide-eyed in');
cy.get(`[data-cy="orarioInizio"]`).should('have.value', 'wide-eyed in');
cy.get(`[data-cy="orarioFine"]`).type('tank');
cy.get(`[data-cy="orarioFine"]`).should('have.value', 'tank');
cy.get(`[data-cy="tipo"]`).select('DISPONIBILE');
cy.get(`[data-cy="note"]`).type('doodle vaguely vacantly');
cy.get(`[data-cy="note"]`).should('have.value', 'doodle vaguely vacantly');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@postEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(201);
disponibilita = response.body;
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', disponibilitaPageUrlPattern);
});
});
});

View File

@@ -0,0 +1,176 @@
import {
entityConfirmDeleteButtonSelector,
entityCreateButtonSelector,
entityCreateCancelButtonSelector,
entityCreateSaveButtonSelector,
entityDeleteButtonSelector,
entityDetailsBackButtonSelector,
entityDetailsButtonSelector,
entityEditButtonSelector,
entityTableSelector,
} from '../../support/entity';
describe('Liberatoria e2e test', () => {
const liberatoriaPageUrl = '/liberatoria';
const liberatoriaPageUrlPattern = new RegExp('/liberatoria(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? 'user';
const password = Cypress.env('E2E_PASSWORD') ?? 'user';
const liberatoriaSample = {};
let liberatoria;
beforeEach(() => {
cy.login(username, password);
});
beforeEach(() => {
cy.intercept('GET', '/api/liberatorias+(?*|)').as('entitiesRequest');
cy.intercept('POST', '/api/liberatorias').as('postEntityRequest');
cy.intercept('DELETE', '/api/liberatorias/*').as('deleteEntityRequest');
});
afterEach(() => {
if (liberatoria) {
cy.authenticatedRequest({
method: 'DELETE',
url: `/api/liberatorias/${liberatoria.id}`,
}).then(() => {
liberatoria = undefined;
});
}
});
it('Liberatorias menu should load Liberatorias page', () => {
cy.visit('/');
cy.clickOnEntityMenuItem('liberatoria');
cy.wait('@entitiesRequest').then(({ response }) => {
if (response?.body.length === 0) {
cy.get(entityTableSelector).should('not.exist');
} else {
cy.get(entityTableSelector).should('exist');
}
});
cy.getEntityHeading('Liberatoria').should('exist');
cy.url().should('match', liberatoriaPageUrlPattern);
});
describe('Liberatoria page', () => {
describe('create button click', () => {
beforeEach(() => {
cy.visit(liberatoriaPageUrl);
cy.wait('@entitiesRequest');
});
it('should load create Liberatoria page', () => {
cy.get(entityCreateButtonSelector).click();
cy.url().should('match', new RegExp('/liberatoria/new$'));
cy.getEntityCreateUpdateHeading('Liberatoria');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', liberatoriaPageUrlPattern);
});
});
describe('with existing value', () => {
beforeEach(() => {
cy.authenticatedRequest({
method: 'POST',
url: '/api/liberatorias',
body: liberatoriaSample,
}).then(({ body }) => {
liberatoria = body;
cy.intercept(
{
method: 'GET',
url: '/api/liberatorias+(?*|)',
times: 1,
},
{
statusCode: 200,
body: [liberatoria],
},
).as('entitiesRequestInternal');
});
cy.visit(liberatoriaPageUrl);
cy.wait('@entitiesRequestInternal');
});
it('detail button click should load details Liberatoria page', () => {
cy.get(entityDetailsButtonSelector).first().click();
cy.getEntityDetailsHeading('liberatoria');
cy.get(entityDetailsBackButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', liberatoriaPageUrlPattern);
});
it('edit button click should load edit Liberatoria page and go back', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Liberatoria');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', liberatoriaPageUrlPattern);
});
it('edit button click should load edit Liberatoria page and save', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Liberatoria');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', liberatoriaPageUrlPattern);
});
it('last delete button click should delete instance of Liberatoria', () => {
cy.get(entityDeleteButtonSelector).last().click();
cy.getEntityDeleteDialogHeading('liberatoria').should('exist');
cy.get(entityConfirmDeleteButtonSelector).click();
cy.wait('@deleteEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(204);
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', liberatoriaPageUrlPattern);
liberatoria = undefined;
});
});
});
describe('new Liberatoria page', () => {
beforeEach(() => {
cy.visit(liberatoriaPageUrl);
cy.get(entityCreateButtonSelector).click();
cy.getEntityCreateUpdateHeading('Liberatoria');
});
it('should create an instance of Liberatoria', () => {
cy.get(`[data-cy="accettata"]`).type('2025-12-10T05:52');
cy.get(`[data-cy="accettata"]`).blur();
cy.get(`[data-cy="accettata"]`).should('have.value', '2025-12-10T05:52');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@postEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(201);
liberatoria = response.body;
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', liberatoriaPageUrlPattern);
});
});
});

View File

@@ -0,0 +1,183 @@
import {
entityConfirmDeleteButtonSelector,
entityCreateButtonSelector,
entityCreateCancelButtonSelector,
entityCreateSaveButtonSelector,
entityDeleteButtonSelector,
entityDetailsBackButtonSelector,
entityDetailsButtonSelector,
entityEditButtonSelector,
entityTableSelector,
} from '../../support/entity';
describe('Messaggio e2e test', () => {
const messaggioPageUrl = '/messaggio';
const messaggioPageUrlPattern = new RegExp('/messaggio(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? 'user';
const password = Cypress.env('E2E_PASSWORD') ?? 'user';
const messaggioSample = {};
let messaggio;
beforeEach(() => {
cy.login(username, password);
});
beforeEach(() => {
cy.intercept('GET', '/api/messaggios+(?*|)').as('entitiesRequest');
cy.intercept('POST', '/api/messaggios').as('postEntityRequest');
cy.intercept('DELETE', '/api/messaggios/*').as('deleteEntityRequest');
});
afterEach(() => {
if (messaggio) {
cy.authenticatedRequest({
method: 'DELETE',
url: `/api/messaggios/${messaggio.id}`,
}).then(() => {
messaggio = undefined;
});
}
});
it('Messaggios menu should load Messaggios page', () => {
cy.visit('/');
cy.clickOnEntityMenuItem('messaggio');
cy.wait('@entitiesRequest').then(({ response }) => {
if (response?.body.length === 0) {
cy.get(entityTableSelector).should('not.exist');
} else {
cy.get(entityTableSelector).should('exist');
}
});
cy.getEntityHeading('Messaggio').should('exist');
cy.url().should('match', messaggioPageUrlPattern);
});
describe('Messaggio page', () => {
describe('create button click', () => {
beforeEach(() => {
cy.visit(messaggioPageUrl);
cy.wait('@entitiesRequest');
});
it('should load create Messaggio page', () => {
cy.get(entityCreateButtonSelector).click();
cy.url().should('match', new RegExp('/messaggio/new$'));
cy.getEntityCreateUpdateHeading('Messaggio');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', messaggioPageUrlPattern);
});
});
describe('with existing value', () => {
beforeEach(() => {
cy.authenticatedRequest({
method: 'POST',
url: '/api/messaggios',
body: messaggioSample,
}).then(({ body }) => {
messaggio = body;
cy.intercept(
{
method: 'GET',
url: '/api/messaggios+(?*|)',
times: 1,
},
{
statusCode: 200,
body: [messaggio],
},
).as('entitiesRequestInternal');
});
cy.visit(messaggioPageUrl);
cy.wait('@entitiesRequestInternal');
});
it('detail button click should load details Messaggio page', () => {
cy.get(entityDetailsButtonSelector).first().click();
cy.getEntityDetailsHeading('messaggio');
cy.get(entityDetailsBackButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', messaggioPageUrlPattern);
});
it('edit button click should load edit Messaggio page and go back', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Messaggio');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', messaggioPageUrlPattern);
});
it('edit button click should load edit Messaggio page and save', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Messaggio');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', messaggioPageUrlPattern);
});
it('last delete button click should delete instance of Messaggio', () => {
cy.get(entityDeleteButtonSelector).last().click();
cy.getEntityDeleteDialogHeading('messaggio').should('exist');
cy.get(entityConfirmDeleteButtonSelector).click();
cy.wait('@deleteEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(204);
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', messaggioPageUrlPattern);
messaggio = undefined;
});
});
});
describe('new Messaggio page', () => {
beforeEach(() => {
cy.visit(messaggioPageUrl);
cy.get(entityCreateButtonSelector).click();
cy.getEntityCreateUpdateHeading('Messaggio');
});
it('should create an instance of Messaggio', () => {
cy.get(`[data-cy="spedito"]`).type('2025-12-10T09:25');
cy.get(`[data-cy="spedito"]`).blur();
cy.get(`[data-cy="spedito"]`).should('have.value', '2025-12-10T09:25');
cy.get(`[data-cy="testo"]`).type('for');
cy.get(`[data-cy="testo"]`).should('have.value', 'for');
cy.get(`[data-cy="letto"]`).type('2025-12-10T02:14');
cy.get(`[data-cy="letto"]`).blur();
cy.get(`[data-cy="letto"]`).should('have.value', '2025-12-10T02:14');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@postEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(201);
messaggio = response.body;
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', messaggioPageUrlPattern);
});
});
});

View File

@@ -0,0 +1,190 @@
import {
entityConfirmDeleteButtonSelector,
entityCreateButtonSelector,
entityCreateCancelButtonSelector,
entityCreateSaveButtonSelector,
entityDeleteButtonSelector,
entityDetailsBackButtonSelector,
entityDetailsButtonSelector,
entityEditButtonSelector,
entityTableSelector,
} from '../../support/entity';
describe('ModelloLiberatoria e2e test', () => {
const modelloLiberatoriaPageUrl = '/modello-liberatoria';
const modelloLiberatoriaPageUrlPattern = new RegExp('/modello-liberatoria(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? 'user';
const password = Cypress.env('E2E_PASSWORD') ?? 'user';
const modelloLiberatoriaSample = {};
let modelloLiberatoria;
beforeEach(() => {
cy.login(username, password);
});
beforeEach(() => {
cy.intercept('GET', '/api/modello-liberatorias+(?*|)').as('entitiesRequest');
cy.intercept('POST', '/api/modello-liberatorias').as('postEntityRequest');
cy.intercept('DELETE', '/api/modello-liberatorias/*').as('deleteEntityRequest');
});
afterEach(() => {
if (modelloLiberatoria) {
cy.authenticatedRequest({
method: 'DELETE',
url: `/api/modello-liberatorias/${modelloLiberatoria.id}`,
}).then(() => {
modelloLiberatoria = undefined;
});
}
});
it('ModelloLiberatorias menu should load ModelloLiberatorias page', () => {
cy.visit('/');
cy.clickOnEntityMenuItem('modello-liberatoria');
cy.wait('@entitiesRequest').then(({ response }) => {
if (response?.body.length === 0) {
cy.get(entityTableSelector).should('not.exist');
} else {
cy.get(entityTableSelector).should('exist');
}
});
cy.getEntityHeading('ModelloLiberatoria').should('exist');
cy.url().should('match', modelloLiberatoriaPageUrlPattern);
});
describe('ModelloLiberatoria page', () => {
describe('create button click', () => {
beforeEach(() => {
cy.visit(modelloLiberatoriaPageUrl);
cy.wait('@entitiesRequest');
});
it('should load create ModelloLiberatoria page', () => {
cy.get(entityCreateButtonSelector).click();
cy.url().should('match', new RegExp('/modello-liberatoria/new$'));
cy.getEntityCreateUpdateHeading('ModelloLiberatoria');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', modelloLiberatoriaPageUrlPattern);
});
});
describe('with existing value', () => {
beforeEach(() => {
cy.authenticatedRequest({
method: 'POST',
url: '/api/modello-liberatorias',
body: modelloLiberatoriaSample,
}).then(({ body }) => {
modelloLiberatoria = body;
cy.intercept(
{
method: 'GET',
url: '/api/modello-liberatorias+(?*|)',
times: 1,
},
{
statusCode: 200,
body: [modelloLiberatoria],
},
).as('entitiesRequestInternal');
});
cy.visit(modelloLiberatoriaPageUrl);
cy.wait('@entitiesRequestInternal');
});
it('detail button click should load details ModelloLiberatoria page', () => {
cy.get(entityDetailsButtonSelector).first().click();
cy.getEntityDetailsHeading('modelloLiberatoria');
cy.get(entityDetailsBackButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', modelloLiberatoriaPageUrlPattern);
});
it('edit button click should load edit ModelloLiberatoria page and go back', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('ModelloLiberatoria');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', modelloLiberatoriaPageUrlPattern);
});
it('edit button click should load edit ModelloLiberatoria page and save', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('ModelloLiberatoria');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', modelloLiberatoriaPageUrlPattern);
});
it('last delete button click should delete instance of ModelloLiberatoria', () => {
cy.get(entityDeleteButtonSelector).last().click();
cy.getEntityDeleteDialogHeading('modelloLiberatoria').should('exist');
cy.get(entityConfirmDeleteButtonSelector).click();
cy.wait('@deleteEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(204);
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', modelloLiberatoriaPageUrlPattern);
modelloLiberatoria = undefined;
});
});
});
describe('new ModelloLiberatoria page', () => {
beforeEach(() => {
cy.visit(modelloLiberatoriaPageUrl);
cy.get(entityCreateButtonSelector).click();
cy.getEntityCreateUpdateHeading('ModelloLiberatoria');
});
it('should create an instance of ModelloLiberatoria', () => {
cy.get(`[data-cy="nome"]`).type('sedately in');
cy.get(`[data-cy="nome"]`).should('have.value', 'sedately in');
cy.get(`[data-cy="testo"]`).type('before');
cy.get(`[data-cy="testo"]`).should('have.value', 'before');
cy.setFieldImageAsBytesOfEntity('documento', 'integration-test.png', 'image/png');
cy.get(`[data-cy="validoDal"]`).type('2025-12-09T16:22');
cy.get(`[data-cy="validoDal"]`).blur();
cy.get(`[data-cy="validoDal"]`).should('have.value', '2025-12-09T16:22');
cy.get(`[data-cy="validoAl"]`).type('2025-12-09T22:55');
cy.get(`[data-cy="validoAl"]`).blur();
cy.get(`[data-cy="validoAl"]`).should('have.value', '2025-12-09T22:55');
// since cypress clicks submit too fast before the blob fields are validated
cy.wait(200); // eslint-disable-line cypress/no-unnecessary-waiting
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@postEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(201);
modelloLiberatoria = response.body;
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', modelloLiberatoriaPageUrlPattern);
});
});
});

View File

@@ -0,0 +1,197 @@
import {
entityConfirmDeleteButtonSelector,
entityCreateButtonSelector,
entityCreateCancelButtonSelector,
entityCreateSaveButtonSelector,
entityDeleteButtonSelector,
entityDetailsBackButtonSelector,
entityDetailsButtonSelector,
entityEditButtonSelector,
entityTableSelector,
} from '../../support/entity';
describe('Notifica e2e test', () => {
const notificaPageUrl = '/notifica';
const notificaPageUrlPattern = new RegExp('/notifica(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? 'user';
const password = Cypress.env('E2E_PASSWORD') ?? 'user';
const notificaSample = {};
let notifica;
beforeEach(() => {
cy.login(username, password);
});
beforeEach(() => {
cy.intercept('GET', '/api/notificas+(?*|)').as('entitiesRequest');
cy.intercept('POST', '/api/notificas').as('postEntityRequest');
cy.intercept('DELETE', '/api/notificas/*').as('deleteEntityRequest');
});
afterEach(() => {
if (notifica) {
cy.authenticatedRequest({
method: 'DELETE',
url: `/api/notificas/${notifica.id}`,
}).then(() => {
notifica = undefined;
});
}
});
it('Notificas menu should load Notificas page', () => {
cy.visit('/');
cy.clickOnEntityMenuItem('notifica');
cy.wait('@entitiesRequest').then(({ response }) => {
if (response?.body.length === 0) {
cy.get(entityTableSelector).should('not.exist');
} else {
cy.get(entityTableSelector).should('exist');
}
});
cy.getEntityHeading('Notifica').should('exist');
cy.url().should('match', notificaPageUrlPattern);
});
describe('Notifica page', () => {
describe('create button click', () => {
beforeEach(() => {
cy.visit(notificaPageUrl);
cy.wait('@entitiesRequest');
});
it('should load create Notifica page', () => {
cy.get(entityCreateButtonSelector).click();
cy.url().should('match', new RegExp('/notifica/new$'));
cy.getEntityCreateUpdateHeading('Notifica');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', notificaPageUrlPattern);
});
});
describe('with existing value', () => {
beforeEach(() => {
cy.authenticatedRequest({
method: 'POST',
url: '/api/notificas',
body: notificaSample,
}).then(({ body }) => {
notifica = body;
cy.intercept(
{
method: 'GET',
url: '/api/notificas+(?*|)',
times: 1,
},
{
statusCode: 200,
headers: {
link: '<http://localhost/api/notificas?page=0&size=20>; rel="last",<http://localhost/api/notificas?page=0&size=20>; rel="first"',
},
body: [notifica],
},
).as('entitiesRequestInternal');
});
cy.visit(notificaPageUrl);
cy.wait('@entitiesRequestInternal');
});
it('detail button click should load details Notifica page', () => {
cy.get(entityDetailsButtonSelector).first().click();
cy.getEntityDetailsHeading('notifica');
cy.get(entityDetailsBackButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', notificaPageUrlPattern);
});
it('edit button click should load edit Notifica page and go back', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Notifica');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', notificaPageUrlPattern);
});
it('edit button click should load edit Notifica page and save', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Notifica');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', notificaPageUrlPattern);
});
it('last delete button click should delete instance of Notifica', () => {
cy.get(entityDeleteButtonSelector).last().click();
cy.getEntityDeleteDialogHeading('notifica').should('exist');
cy.get(entityConfirmDeleteButtonSelector).click();
cy.wait('@deleteEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(204);
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', notificaPageUrlPattern);
notifica = undefined;
});
});
});
describe('new Notifica page', () => {
beforeEach(() => {
cy.visit(notificaPageUrl);
cy.get(entityCreateButtonSelector).click();
cy.getEntityCreateUpdateHeading('Notifica');
});
it('should create an instance of Notifica', () => {
cy.get(`[data-cy="tipoCanale"]`).select('EMAIL');
cy.get(`[data-cy="tipoEvento"]`).select('PRENOTAZIONE_RIFIUTATA');
cy.get(`[data-cy="messaggio"]`).type('brr ha');
cy.get(`[data-cy="messaggio"]`).should('have.value', 'brr ha');
cy.get(`[data-cy="inviata"]`).should('not.be.checked');
cy.get(`[data-cy="inviata"]`).click();
cy.get(`[data-cy="inviata"]`).should('be.checked');
cy.get(`[data-cy="inviataAt"]`).type('2025-12-10T15:18');
cy.get(`[data-cy="inviataAt"]`).blur();
cy.get(`[data-cy="inviataAt"]`).should('have.value', '2025-12-10T15:18');
cy.get(`[data-cy="errore"]`).type('upwardly');
cy.get(`[data-cy="errore"]`).should('have.value', 'upwardly');
cy.get(`[data-cy="createdAt"]`).type('2025-12-09T16:35');
cy.get(`[data-cy="createdAt"]`).blur();
cy.get(`[data-cy="createdAt"]`).should('have.value', '2025-12-09T16:35');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@postEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(201);
notifica = response.body;
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', notificaPageUrlPattern);
});
});
});

View File

@@ -0,0 +1,194 @@
import {
entityConfirmDeleteButtonSelector,
entityCreateButtonSelector,
entityCreateCancelButtonSelector,
entityCreateSaveButtonSelector,
entityDeleteButtonSelector,
entityDetailsBackButtonSelector,
entityDetailsButtonSelector,
entityEditButtonSelector,
entityTableSelector,
} from '../../support/entity';
describe('Prenotazione e2e test', () => {
const prenotazionePageUrl = '/prenotazione';
const prenotazionePageUrlPattern = new RegExp('/prenotazione(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? 'user';
const password = Cypress.env('E2E_PASSWORD') ?? 'user';
const prenotazioneSample = {};
let prenotazione;
beforeEach(() => {
cy.login(username, password);
});
beforeEach(() => {
cy.intercept('GET', '/api/prenotaziones+(?*|)').as('entitiesRequest');
cy.intercept('POST', '/api/prenotaziones').as('postEntityRequest');
cy.intercept('DELETE', '/api/prenotaziones/*').as('deleteEntityRequest');
});
afterEach(() => {
if (prenotazione) {
cy.authenticatedRequest({
method: 'DELETE',
url: `/api/prenotaziones/${prenotazione.id}`,
}).then(() => {
prenotazione = undefined;
});
}
});
it('Prenotaziones menu should load Prenotaziones page', () => {
cy.visit('/');
cy.clickOnEntityMenuItem('prenotazione');
cy.wait('@entitiesRequest').then(({ response }) => {
if (response?.body.length === 0) {
cy.get(entityTableSelector).should('not.exist');
} else {
cy.get(entityTableSelector).should('exist');
}
});
cy.getEntityHeading('Prenotazione').should('exist');
cy.url().should('match', prenotazionePageUrlPattern);
});
describe('Prenotazione page', () => {
describe('create button click', () => {
beforeEach(() => {
cy.visit(prenotazionePageUrl);
cy.wait('@entitiesRequest');
});
it('should load create Prenotazione page', () => {
cy.get(entityCreateButtonSelector).click();
cy.url().should('match', new RegExp('/prenotazione/new$'));
cy.getEntityCreateUpdateHeading('Prenotazione');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', prenotazionePageUrlPattern);
});
});
describe('with existing value', () => {
beforeEach(() => {
cy.authenticatedRequest({
method: 'POST',
url: '/api/prenotaziones',
body: prenotazioneSample,
}).then(({ body }) => {
prenotazione = body;
cy.intercept(
{
method: 'GET',
url: '/api/prenotaziones+(?*|)',
times: 1,
},
{
statusCode: 200,
headers: {
link: '<http://localhost/api/prenotaziones?page=0&size=20>; rel="last",<http://localhost/api/prenotaziones?page=0&size=20>; rel="first"',
},
body: [prenotazione],
},
).as('entitiesRequestInternal');
});
cy.visit(prenotazionePageUrl);
cy.wait('@entitiesRequestInternal');
});
it('detail button click should load details Prenotazione page', () => {
cy.get(entityDetailsButtonSelector).first().click();
cy.getEntityDetailsHeading('prenotazione');
cy.get(entityDetailsBackButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', prenotazionePageUrlPattern);
});
it('edit button click should load edit Prenotazione page and go back', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Prenotazione');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', prenotazionePageUrlPattern);
});
it('edit button click should load edit Prenotazione page and save', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Prenotazione');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', prenotazionePageUrlPattern);
});
it('last delete button click should delete instance of Prenotazione', () => {
cy.get(entityDeleteButtonSelector).last().click();
cy.getEntityDeleteDialogHeading('prenotazione').should('exist');
cy.get(entityConfirmDeleteButtonSelector).click();
cy.wait('@deleteEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(204);
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', prenotazionePageUrlPattern);
prenotazione = undefined;
});
});
});
describe('new Prenotazione page', () => {
beforeEach(() => {
cy.visit(prenotazionePageUrl);
cy.get(entityCreateButtonSelector).click();
cy.getEntityCreateUpdateHeading('Prenotazione');
});
it('should create an instance of Prenotazione', () => {
cy.get(`[data-cy="oraInizio"]`).type('2025-12-10T05:00');
cy.get(`[data-cy="oraInizio"]`).blur();
cy.get(`[data-cy="oraInizio"]`).should('have.value', '2025-12-10T05:00');
cy.get(`[data-cy="oraFine"]`).type('2025-12-10T14:09');
cy.get(`[data-cy="oraFine"]`).blur();
cy.get(`[data-cy="oraFine"]`).should('have.value', '2025-12-10T14:09');
cy.get(`[data-cy="stato"]`).select('ANNULLATA');
cy.get(`[data-cy="motivoEvento"]`).type('via');
cy.get(`[data-cy="motivoEvento"]`).should('have.value', 'via');
cy.get(`[data-cy="numeroPartecipanti"]`).type('30937');
cy.get(`[data-cy="numeroPartecipanti"]`).should('have.value', '30937');
cy.get(`[data-cy="noteUtente"]`).type('gah while ick');
cy.get(`[data-cy="noteUtente"]`).should('have.value', 'gah while ick');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@postEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(201);
prenotazione = response.body;
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', prenotazionePageUrlPattern);
});
});
});

View File

@@ -0,0 +1,202 @@
import {
entityConfirmDeleteButtonSelector,
entityCreateButtonSelector,
entityCreateCancelButtonSelector,
entityCreateSaveButtonSelector,
entityDeleteButtonSelector,
entityDetailsBackButtonSelector,
entityDetailsButtonSelector,
entityEditButtonSelector,
entityTableSelector,
} from '../../support/entity';
describe('Struttura e2e test', () => {
const strutturaPageUrl = '/struttura';
const strutturaPageUrlPattern = new RegExp('/struttura(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? 'user';
const password = Cypress.env('E2E_PASSWORD') ?? 'user';
const strutturaSample = {};
let struttura;
beforeEach(() => {
cy.login(username, password);
});
beforeEach(() => {
cy.intercept('GET', '/api/strutturas+(?*|)').as('entitiesRequest');
cy.intercept('POST', '/api/strutturas').as('postEntityRequest');
cy.intercept('DELETE', '/api/strutturas/*').as('deleteEntityRequest');
});
afterEach(() => {
if (struttura) {
cy.authenticatedRequest({
method: 'DELETE',
url: `/api/strutturas/${struttura.id}`,
}).then(() => {
struttura = undefined;
});
}
});
it('Strutturas menu should load Strutturas page', () => {
cy.visit('/');
cy.clickOnEntityMenuItem('struttura');
cy.wait('@entitiesRequest').then(({ response }) => {
if (response?.body.length === 0) {
cy.get(entityTableSelector).should('not.exist');
} else {
cy.get(entityTableSelector).should('exist');
}
});
cy.getEntityHeading('Struttura').should('exist');
cy.url().should('match', strutturaPageUrlPattern);
});
describe('Struttura page', () => {
describe('create button click', () => {
beforeEach(() => {
cy.visit(strutturaPageUrl);
cy.wait('@entitiesRequest');
});
it('should load create Struttura page', () => {
cy.get(entityCreateButtonSelector).click();
cy.url().should('match', new RegExp('/struttura/new$'));
cy.getEntityCreateUpdateHeading('Struttura');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', strutturaPageUrlPattern);
});
});
describe('with existing value', () => {
beforeEach(() => {
cy.authenticatedRequest({
method: 'POST',
url: '/api/strutturas',
body: strutturaSample,
}).then(({ body }) => {
struttura = body;
cy.intercept(
{
method: 'GET',
url: '/api/strutturas+(?*|)',
times: 1,
},
{
statusCode: 200,
headers: {
link: '<http://localhost/api/strutturas?page=0&size=20>; rel="last",<http://localhost/api/strutturas?page=0&size=20>; rel="first"',
},
body: [struttura],
},
).as('entitiesRequestInternal');
});
cy.visit(strutturaPageUrl);
cy.wait('@entitiesRequestInternal');
});
it('detail button click should load details Struttura page', () => {
cy.get(entityDetailsButtonSelector).first().click();
cy.getEntityDetailsHeading('struttura');
cy.get(entityDetailsBackButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', strutturaPageUrlPattern);
});
it('edit button click should load edit Struttura page and go back', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Struttura');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', strutturaPageUrlPattern);
});
it('edit button click should load edit Struttura page and save', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('Struttura');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', strutturaPageUrlPattern);
});
it('last delete button click should delete instance of Struttura', () => {
cy.get(entityDeleteButtonSelector).last().click();
cy.getEntityDeleteDialogHeading('struttura').should('exist');
cy.get(entityConfirmDeleteButtonSelector).click();
cy.wait('@deleteEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(204);
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', strutturaPageUrlPattern);
struttura = undefined;
});
});
});
describe('new Struttura page', () => {
beforeEach(() => {
cy.visit(strutturaPageUrl);
cy.get(entityCreateButtonSelector).click();
cy.getEntityCreateUpdateHeading('Struttura');
});
it('should create an instance of Struttura', () => {
cy.get(`[data-cy="nome"]`).type('finally how');
cy.get(`[data-cy="nome"]`).should('have.value', 'finally how');
cy.get(`[data-cy="descrizione"]`).type('immediately supposing');
cy.get(`[data-cy="descrizione"]`).should('have.value', 'immediately supposing');
cy.get(`[data-cy="indirizzo"]`).type('elevation brush yieldingly');
cy.get(`[data-cy="indirizzo"]`).should('have.value', 'elevation brush yieldingly');
cy.get(`[data-cy="capienzaMax"]`).type('16547');
cy.get(`[data-cy="capienzaMax"]`).should('have.value', '16547');
cy.get(`[data-cy="attiva"]`).should('not.be.checked');
cy.get(`[data-cy="attiva"]`).click();
cy.get(`[data-cy="attiva"]`).should('be.checked');
cy.get(`[data-cy="fotoUrl"]`).type('where mmm');
cy.get(`[data-cy="fotoUrl"]`).should('have.value', 'where mmm');
cy.get(`[data-cy="createdAt"]`).type('2025-12-09T23:39');
cy.get(`[data-cy="createdAt"]`).blur();
cy.get(`[data-cy="createdAt"]`).should('have.value', '2025-12-09T23:39');
cy.get(`[data-cy="updatedAt"]`).type('2025-12-10T07:08');
cy.get(`[data-cy="updatedAt"]`).blur();
cy.get(`[data-cy="updatedAt"]`).should('have.value', '2025-12-10T07:08');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@postEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(201);
struttura = response.body;
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', strutturaPageUrlPattern);
});
});
});

View File

@@ -0,0 +1,217 @@
import {
entityConfirmDeleteButtonSelector,
entityCreateButtonSelector,
entityCreateCancelButtonSelector,
entityCreateSaveButtonSelector,
entityDeleteButtonSelector,
entityDetailsBackButtonSelector,
entityDetailsButtonSelector,
entityEditButtonSelector,
entityTableSelector,
} from '../../support/entity';
describe('UtenteApp e2e test', () => {
const utenteAppPageUrl = '/utente-app';
const utenteAppPageUrlPattern = new RegExp('/utente-app(\\?.*)?$');
const username = Cypress.env('E2E_USERNAME') ?? 'user';
const password = Cypress.env('E2E_PASSWORD') ?? 'user';
const utenteAppSample = { username: 'bell for windy', email: 'Oronzo88@libero.it', ruolo: 'ADMIN', attivo: false };
let utenteApp;
beforeEach(() => {
cy.login(username, password);
});
beforeEach(() => {
cy.intercept('GET', '/api/utente-apps+(?*|)').as('entitiesRequest');
cy.intercept('POST', '/api/utente-apps').as('postEntityRequest');
cy.intercept('DELETE', '/api/utente-apps/*').as('deleteEntityRequest');
});
afterEach(() => {
if (utenteApp) {
cy.authenticatedRequest({
method: 'DELETE',
url: `/api/utente-apps/${utenteApp.id}`,
}).then(() => {
utenteApp = undefined;
});
}
});
it('UtenteApps menu should load UtenteApps page', () => {
cy.visit('/');
cy.clickOnEntityMenuItem('utente-app');
cy.wait('@entitiesRequest').then(({ response }) => {
if (response?.body.length === 0) {
cy.get(entityTableSelector).should('not.exist');
} else {
cy.get(entityTableSelector).should('exist');
}
});
cy.getEntityHeading('UtenteApp').should('exist');
cy.url().should('match', utenteAppPageUrlPattern);
});
describe('UtenteApp page', () => {
describe('create button click', () => {
beforeEach(() => {
cy.visit(utenteAppPageUrl);
cy.wait('@entitiesRequest');
});
it('should load create UtenteApp page', () => {
cy.get(entityCreateButtonSelector).click();
cy.url().should('match', new RegExp('/utente-app/new$'));
cy.getEntityCreateUpdateHeading('UtenteApp');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', utenteAppPageUrlPattern);
});
});
describe('with existing value', () => {
beforeEach(() => {
cy.authenticatedRequest({
method: 'POST',
url: '/api/utente-apps',
body: utenteAppSample,
}).then(({ body }) => {
utenteApp = body;
cy.intercept(
{
method: 'GET',
url: '/api/utente-apps+(?*|)',
times: 1,
},
{
statusCode: 200,
body: [utenteApp],
},
).as('entitiesRequestInternal');
});
cy.visit(utenteAppPageUrl);
cy.wait('@entitiesRequestInternal');
});
it('detail button click should load details UtenteApp page', () => {
cy.get(entityDetailsButtonSelector).first().click();
cy.getEntityDetailsHeading('utenteApp');
cy.get(entityDetailsBackButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', utenteAppPageUrlPattern);
});
it('edit button click should load edit UtenteApp page and go back', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('UtenteApp');
cy.get(entityCreateSaveButtonSelector).should('exist');
cy.get(entityCreateCancelButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', utenteAppPageUrlPattern);
});
it('edit button click should load edit UtenteApp page and save', () => {
cy.get(entityEditButtonSelector).first().click();
cy.getEntityCreateUpdateHeading('UtenteApp');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', utenteAppPageUrlPattern);
});
it('last delete button click should delete instance of UtenteApp', () => {
cy.get(entityDeleteButtonSelector).last().click();
cy.getEntityDeleteDialogHeading('utenteApp').should('exist');
cy.get(entityConfirmDeleteButtonSelector).click();
cy.wait('@deleteEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(204);
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', utenteAppPageUrlPattern);
utenteApp = undefined;
});
});
});
describe('new UtenteApp page', () => {
beforeEach(() => {
cy.visit(utenteAppPageUrl);
cy.get(entityCreateButtonSelector).click();
cy.getEntityCreateUpdateHeading('UtenteApp');
});
it('should create an instance of UtenteApp', () => {
cy.get(`[data-cy="username"]`).type('since woeful');
cy.get(`[data-cy="username"]`).should('have.value', 'since woeful');
cy.get(`[data-cy="email"]`).type('Richelmo81@hotmail.com');
cy.get(`[data-cy="email"]`).should('have.value', 'Richelmo81@hotmail.com');
cy.get(`[data-cy="telefono"]`).type('bathrobe westernise');
cy.get(`[data-cy="telefono"]`).should('have.value', 'bathrobe westernise');
cy.get(`[data-cy="ruolo"]`).select('INCARICATO');
cy.get(`[data-cy="attivo"]`).should('not.be.checked');
cy.get(`[data-cy="attivo"]`).click();
cy.get(`[data-cy="attivo"]`).should('be.checked');
cy.get(`[data-cy="nome"]`).type('apud hydrant thankfully');
cy.get(`[data-cy="nome"]`).should('have.value', 'apud hydrant thankfully');
cy.get(`[data-cy="cognome"]`).type('uproot who spirited');
cy.get(`[data-cy="cognome"]`).should('have.value', 'uproot who spirited');
cy.get(`[data-cy="luogoNascita"]`).type('a gadzooks until');
cy.get(`[data-cy="luogoNascita"]`).should('have.value', 'a gadzooks until');
cy.get(`[data-cy="dataNascita"]`).type('gad past');
cy.get(`[data-cy="dataNascita"]`).should('have.value', 'gad past');
cy.get(`[data-cy="residente"]`).type('object');
cy.get(`[data-cy="residente"]`).should('have.value', 'object');
cy.get(`[data-cy="societa"]`).type('polyester forage');
cy.get(`[data-cy="societa"]`).should('have.value', 'polyester forage');
cy.get(`[data-cy="sede"]`).type('once');
cy.get(`[data-cy="sede"]`).should('have.value', 'once');
cy.get(`[data-cy="codfiscale"]`).type('ha');
cy.get(`[data-cy="codfiscale"]`).should('have.value', 'ha');
cy.get(`[data-cy="telefonoSoc"]`).type('serenade rationale meh');
cy.get(`[data-cy="telefonoSoc"]`).should('have.value', 'serenade rationale meh');
cy.get(`[data-cy="emailSoc"]`).type('oh hungrily wonderfully');
cy.get(`[data-cy="emailSoc"]`).should('have.value', 'oh hungrily wonderfully');
cy.get(entityCreateSaveButtonSelector).click();
cy.wait('@postEntityRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(201);
utenteApp = response.body;
});
cy.wait('@entitiesRequest').then(({ response }) => {
expect(response?.statusCode).to.equal(200);
});
cy.url().should('match', utenteAppPageUrlPattern);
});
});
});