Skip to content

Commit

Permalink
Merge branch '2024.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Dec 27, 2024
2 parents fffb7f7 + 04b1a05 commit 244ee5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions tests/e2etests/src/test/HumanResources/employee.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ beforeAll(async () => {
await lib.getBrowser('Human Resources');
});

describe.skip('employee', () => {
describe('employee', () => {
describe('employee grid', () => {
test('show grid', async () => {
await expectPuppeteer(page).toClick('.x-tree-node span', {text: 'Mitarbeiter', visible: true});
await expectPuppeteer(page).toMatchElement('.x-grid3-hd-account_id');
});

test('select employee', async () => {
await expectPuppeteer(page).toClick('.x-grid3-col-account_id', {text: 'McBlack, James'});
await expectPuppeteer(page).toClick('.x-grid3-col-account_id', {text: 'James McBlack'});
});
});

Expand Down Expand Up @@ -268,7 +268,7 @@ describe.skip('employee', () => {
let employeeEditDialog, contractEditDialog
test('edit dialog', async () => {
await page.waitForTimeout(1000);
await expectPuppeteer(page).toClick('.x-grid3-col-account_id', {text: 'Wulf, Paul'});
await expectPuppeteer(page).toClick('.x-grid3-col-account_id', {text: 'Paul Wulf'});
employeeEditDialog = await lib.getEditDialog('Mitarbeiter bearbeiten');
await expectPuppeteer(employeeEditDialog).toClick('.x-tab-strip-text', {text: 'Verträge', visible:true});
});
Expand Down Expand Up @@ -342,11 +342,11 @@ describe.skip('employee', () => {
await contractEditDialog.waitForTimeout(1000);
});
test('edit workingtimeconverter', async () => {
await contractEditDialog.type('[class=new-row] input', 'Workingtime Converter');
await contractEditDialog.type('[class=new-row] input', 'Arbeitszeit Umwandler');
await contractEditDialog.waitForTimeout(1000);
let WorkingtimeConverter = lib.getNewWindow();
await expectPuppeteer(contractEditDialog).toMatchElement('.x-combo-list-item', {text: 'Workingtime Converter', visible:true});
await expectPuppeteer(contractEditDialog).toClick('.x-combo-list-item', {text: 'Workingtime Converter', visible:true});
await expectPuppeteer(contractEditDialog).toMatchElement('.x-combo-list-item', {text: 'Arbeitszeit Umwandler', visible:true});
await expectPuppeteer(contractEditDialog).toClick('.x-combo-list-item', {text: 'Arbeitszeit Umwandler', visible:true});
WorkingtimeConverter = await WorkingtimeConverter;
await WorkingtimeConverter.waitForTimeout(2000);
await expectPuppeteer(WorkingtimeConverter).toClick('button', {text: 'Ok'});
Expand All @@ -359,7 +359,7 @@ describe.skip('employee', () => {

test('check contract', async () => {
await page.waitForTimeout(2000);
await expectPuppeteer(page).toClick('.x-grid3-col-account_id', {text: 'Wulf, Paul'});
await expectPuppeteer(page).toClick('.x-grid3-col-account_id', {text: 'Paul Wulf'});
await page.waitForTimeout(2000);
employeeEditDialog = await lib.getEditDialog('Mitarbeiter bearbeiten');
await expectPuppeteer(employeeEditDialog).toClick('.x-tab-strip-text', {text: 'Verträge'});
Expand All @@ -379,7 +379,7 @@ describe.skip('employee', () => {
expect(await contractEditDialog.evaluate(() => document.querySelector('.x-grid3-body div:nth-child(2) .x-grid3-col-configRecord').textContent))
.toEqual(' Arbeitszeit wird ausgewertet von 06:00 bis 20:00. (Arbeitzeitlimitierung)');
expect(await contractEditDialog.evaluate(() => document.querySelector('.x-grid3-body div:nth-child(3) .x-grid3-col-configRecord').textContent))
.toEqual(Prefer workingtime over projecttime timesheets on a daily bases. (Workingtime Converter)');
.toEqual(Bevorzuge Arbeitszeit vor Projektzeit Stundenzettel auf täglicher Basis. (Arbeitszeit Umwandler)');

})
});
Expand Down
2 changes: 1 addition & 1 deletion tine20/HumanResources/js/ContractEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ Tine.HumanResources.ContractEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
onSaveAndClose: function () {
const start = this.getForm().findField('start_date').getValue()
const end = this.getForm().findField('end_date').getValue()
if (start > end) {
if (end && start > end) {
Ext.MessageBox.alert(
this.app.i18n._('Failed'),
this.app.i18n._('The start date of the contract must be before the end date!')
Expand Down

0 comments on commit 244ee5c

Please sign in to comment.