Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/1293 kr unit autocomplete #1322

Merged
merged 118 commits into from
Jan 31, 2025
Merged
Changes from 1 commit
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
7ba4f8a
refactor action plan
kcinay055679 Jan 27, 2025
9cc7ccc
add create and update func
kcinay055679 Jan 27, 2025
33f67b6
clean up
kcinay055679 Jan 27, 2025
41aa0dc
check actions are now checkable
kcinay055679 Jan 27, 2025
0bc8599
add subject to control new items
kcinay055679 Jan 27, 2025
b86d841
fix checkin form
kcinay055679 Jan 27, 2025
aaeceb4
exclude failing e2e tests
kcinay055679 Jan 28, 2025
75fec38
use only formarray in actionPlan
kcinay055679 Jan 28, 2025
9f4fcbe
fix actionplan unit tests
kcinay055679 Jan 28, 2025
2245cc8
fix pipeline
kcinay055679 Jan 28, 2025
61b8d9a
clean up
kcinay055679 Jan 28, 2025
2d4ef4b
fix pipeline
kcinay055679 Jan 28, 2025
aafd726
make pipeline happy
kcinay055679 Jan 28, 2025
0930bf6
optionally disable movement functionality
kcinay055679 Jan 28, 2025
d0cee0f
disable cdk drag properly
kcinay055679 Jan 28, 2025
60125d2
add actionpoint validation
kcinay055679 Jan 28, 2025
6a532e2
fix styling of actionplan
kcinay055679 Jan 30, 2025
6a95caf
fix bug that did not let you delete action plans with set value
Miguel7373 Jan 30, 2025
d88dd8a
rework buttons in objective form that the e2e test goes through and c…
Miguel7373 Jan 30, 2025
783952d
remove skip of e2e test in check-in
Miguel7373 Jan 30, 2025
fd04962
action plan has min length
kcinay055679 Jan 30, 2025
b3dfa0d
Replace cy.wait 1000 with an interceptor wait
RandomTannenbaum Jan 31, 2025
1b7b49e
Remove .only
RandomTannenbaum Jan 31, 2025
d4b81e4
fix styling of action plan elem while dragging
kcinay055679 Jan 31, 2025
4a5733a
implement review
kcinay055679 Jan 31, 2025
960502f
place init logic in parent component
kcinay055679 Jan 31, 2025
4fe95e6
show only valid items in check-in form action plan
kcinay055679 Jan 31, 2025
fc6750c
items are deleted when saved
kcinay055679 Jan 31, 2025
b64c8e3
implement new delete logic in key-result form component
kcinay055679 Jan 31, 2025
d19099b
ich bin der antonn
kcinay055679 Jan 31, 2025
f6700de
refactor action plan
kcinay055679 Jan 27, 2025
bd0dd70
add customUnit class
kcinay055679 Jan 21, 2025
ddac440
create model for Unit and flyway script
kcinay055679 Jan 21, 2025
8467f45
split up sql file for better readability
kcinay055679 Jan 21, 2025
96ff358
add unit repo, persistence busineess and validator
kcinay055679 Jan 21, 2025
57bb741
fix backend unit tests
kcinay055679 Jan 21, 2025
c7c357a
fix integration tests
kcinay055679 Jan 21, 2025
ae87575
create services for uniut
kcinay055679 Jan 21, 2025
c3a9bd6
set cascading stye to merge
kcinay055679 Jan 22, 2025
2c01c63
run formatter
kcinay055679 Jan 22, 2025
5cb383d
clean up tests
kcinay055679 Jan 22, 2025
f6fd512
add negative IT test
kcinay055679 Jan 22, 2025
f8b1e11
add unit update int tests
kcinay055679 Jan 23, 2025
48e9199
add functionality for update unit
kcinay055679 Jan 23, 2025
21a865a
fix formatter
kcinay055679 Jan 23, 2025
b9d39e6
add get and delete functionality and write IT
kcinay055679 Jan 23, 2025
b98027a
fix architecture tests
kcinay055679 Jan 23, 2025
292874f
enable jpa auditing on securityconfig
kcinay055679 Jan 23, 2025
23d7ee6
add unittest 'IT' for UnitController
kcinay055679 Jan 23, 2025
8486c0b
fix formatter
kcinay055679 Jan 23, 2025
ba3fc58
finish IT for unit controller
kcinay055679 Jan 23, 2025
8a37399
add unit auth service tests
kcinay055679 Jan 23, 2025
cf26104
add business validation test
kcinay055679 Jan 23, 2025
c5ab082
add persistence IT logic to set current user
kcinay055679 Jan 24, 2025
8510d73
remove complexity of SpringSecurityAuditorAware
kcinay055679 Jan 24, 2025
b93c8e3
remove unitControllerITIT
kcinay055679 Jan 24, 2025
4d6bc85
make formatter happy
kcinay055679 Jan 24, 2025
b1bda8e
fix backend unit tests
kcinay055679 Jan 24, 2025
f714a62
add autocomplete for unit
kcinay055679 Jan 27, 2025
232ed0d
retrive units from backen
kcinay055679 Jan 27, 2025
85f0ce3
unit can now be on the fly created and are shown propperly
kcinay055679 Jan 27, 2025
270013c
refactor unit from enum to class
kcinay055679 Jan 27, 2025
555238a
show create icon only if not existing
kcinay055679 Jan 27, 2025
2b0628c
add confirm dialog before create new
kcinay055679 Jan 27, 2025
513286b
add manage units dialog
kcinay055679 Jan 28, 2025
70a0c53
add is default property to model
kcinay055679 Jan 28, 2025
2332915
add isDefault to db
kcinay055679 Jan 28, 2025
72edc5e
add isDefault into the frontend
kcinay055679 Jan 28, 2025
d46c4a2
show default units in dialog
kcinay055679 Jan 28, 2025
237a22c
add and refactor save untis method
kcinay055679 Jan 28, 2025
fbac973
refactor jest tests
kcinay055679 Jan 28, 2025
c4585b6
fix autocomplete in e2e
kcinay055679 Jan 28, 2025
b70f112
fix unit transformation pipe
kcinay055679 Jan 28, 2025
4c1d881
fix backend unit tests
kcinay055679 Jan 28, 2025
26eb519
fix unit tests
kcinay055679 Jan 28, 2025
2a1f373
add action-plan to unit management
kcinay055679 Jan 28, 2025
3a34f45
integrate actionPlan in manage metrics
kcinay055679 Jan 28, 2025
f5089f6
add submit functionality
kcinay055679 Jan 28, 2025
0c1b792
use proper base style
kcinay055679 Jan 28, 2025
3fbc0ca
finish base functionality
kcinay055679 Jan 28, 2025
949e52b
set number as default value
kcinay055679 Jan 28, 2025
8888b33
fix styling of unit management
kcinay055679 Jan 30, 2025
da21b15
fix jest tests
kcinay055679 Jan 30, 2025
2135745
fix unit tests and formatting
kcinay055679 Jan 30, 2025
c8df151
fix backen unit tests
kcinay055679 Jan 30, 2025
395c597
fix unit test
kcinay055679 Jan 30, 2025
fbbc629
fix
kcinay055679 Jan 30, 2025
26bc444
format
kcinay055679 Jan 30, 2025
2cf2b62
add manage-units jest tests
kcinay055679 Jan 30, 2025
0a2a1a8
fix jest tests
kcinay055679 Jan 30, 2025
9db1d98
add validation
kcinay055679 Jan 30, 2025
03ebfb3
fomrat
kcinay055679 Jan 30, 2025
6c27685
fix jest tests
kcinay055679 Jan 30, 2025
7eeafe0
show label
kcinay055679 Jan 30, 2025
e485ce1
fix error message in frontend
kcinay055679 Jan 30, 2025
481b416
Fix existing e2e tests and add new ones
ManuelMoeri Jan 30, 2025
6888648
fix e2e
kcinay055679 Jan 30, 2025
e5886c9
fix rebase
kcinay055679 Jan 31, 2025
4898a1f
make formatter happy
kcinay055679 Jan 31, 2025
6e59a12
fix styling
kcinay055679 Jan 31, 2025
ce8c6c7
remove translation in autocomplete
kcinay055679 Jan 31, 2025
b6eda30
rename default units
kcinay055679 Jan 31, 2025
b5bfe5b
fix jest test
kcinay055679 Jan 31, 2025
bec9c92
Implement new unit dialog class for editing and adding units and writ…
RandomTannenbaum Jan 31, 2025
c11001b
Remove unwanted .only
RandomTannenbaum Jan 31, 2025
e9121af
add runInBand to package.json
kcinay055679 Jan 31, 2025
100d0b7
fix after rebase
kcinay055679 Jan 31, 2025
f0af9ec
define initFormGroupFn once
kcinay055679 Jan 31, 2025
663e1dd
fix styling
kcinay055679 Jan 31, 2025
3b8bbb4
fix jest test
kcinay055679 Jan 31, 2025
2163948
fix capitalization of unit
kcinay055679 Jan 31, 2025
0c26ace
hups
kcinay055679 Jan 31, 2025
6acf501
Fix frontend tests
RandomTannenbaum Jan 31, 2025
145a3cc
allow enter to create new
kcinay055679 Jan 31, 2025
dba6b85
implement review
kcinay055679 Jan 31, 2025
801e881
fix rebase
kcinay055679 Jan 31, 2025
a512d3d
fix swagger
kcinay055679 Jan 31, 2025
0557177
fix backend formatter
kcinay055679 Jan 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix e2e
kcinay055679 committed Jan 31, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 6888648f18a370ed278eb998a8e5b2c460f145e0
24 changes: 12 additions & 12 deletions frontend/cypress/e2e/check-in.cy.ts
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ describe('okr check-in', () => {
.addKeyResult()
.fillKeyResultTitle('Very important keyresult')
.withMetricValues(
UNIT_PERCENT, '21', undefined, '51'
UNIT_PERCENT.unitName, '21', undefined, '51'
)
.fillKeyResultDescription('This is my description')
.submit();
@@ -48,7 +48,7 @@ describe('okr check-in', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('This key-result will have errors')
.withMetricValues(UNIT_NUMBER, '21', '51')
.withMetricValues(UNIT_NUMBER.unitName, '21', '51')
.submit();

const detailPage = keyResultDetailPage
@@ -71,7 +71,7 @@ describe('okr check-in', () => {
.addKeyResult()
.fillKeyResultTitle('This keyresult is for the owner')
.withMetricValues(
UNIT_PERCENT, '21', undefined, '51'
UNIT_PERCENT.unitName, '21', undefined, '51'
)
.fillKeyResultDescription('This is my description')
.submit();
@@ -121,7 +121,7 @@ describe('okr check-in', () => {
.addKeyResult()
.fillKeyResultTitle('Very important keyresult')
.withMetricValues(
UNIT_PERCENT, '21', undefined, '51'
UNIT_PERCENT.unitName, '21', undefined, '51'
)
.fillKeyResultDescription('This is my description')
.submit();
@@ -145,7 +145,7 @@ describe('okr check-in', () => {
.addKeyResult()
.fillKeyResultTitle('This will not be good')
.withMetricValues(
UNIT_PERCENT, '21', undefined, '52'
UNIT_PERCENT.unitName, '21', undefined, '52'
)
.fillKeyResultDescription('This is my description')
.submit();
@@ -191,7 +191,7 @@ describe('okr check-in', () => {
.addKeyResult()
.fillKeyResultTitle('This will give a checkin list')
.withMetricValues(
UNIT_PERCENT, '21', undefined, '52'
UNIT_PERCENT.unitName, '21', undefined, '52'
)
.fillKeyResultDescription('This is my description')
.submit();
@@ -230,7 +230,7 @@ describe('okr check-in', () => {
.addKeyResult()
.fillKeyResultTitle('Here we edit a metric checkin')
.withMetricValues(
UNIT_CHF, '10', undefined, '300'
UNIT_CHF.unitName, '10', undefined, '300'
)
.fillKeyResultDescription('This is my description')
.submit();
@@ -267,7 +267,7 @@ describe('okr check-in', () => {
.addKeyResult()
.fillKeyResultTitle('A new KeyResult for checking checkin list')
.withMetricValues(
UNIT_EUR, '10', undefined, '300'
UNIT_EUR.unitName, '10', undefined, '300'
)
.fillKeyResultDescription('This is my description')
.submit();
@@ -291,7 +291,7 @@ describe('okr check-in', () => {
.addKeyResult()
.fillKeyResultTitle('There is another kr with fte')
.withMetricValues(
UNIT_FTE, '10', undefined, '300'
UNIT_FTE.unitName, '10', undefined, '300'
)
.fillKeyResultDescription('This is my description')
.submit();
@@ -351,7 +351,7 @@ describe('okr check-in', () => {
.addKeyResult(undefined, 'draft objective title')
.fillKeyResultTitle('I am a metric keyresult for testing')
.withMetricValues(
UNIT_PERCENT, '21', undefined, '52'
UNIT_PERCENT.unitName, '21', undefined, '52'
)
.fillKeyResultDescription('This is my description')
.submit();
@@ -376,7 +376,7 @@ describe('okr check-in', () => {
.addKeyResult(undefined, objectiveName)
.fillKeyResultTitle('I am a keyresult metric')
.withMetricValues(
UNIT_PERCENT, '45', undefined, '60'
UNIT_PERCENT.unitName, '45', undefined, '60'
)
.fillKeyResultDescription('Description')
.submit();
@@ -402,7 +402,7 @@ describe('okr check-in', () => {
overviewPage.addKeyResult('Puzzle ITC', 'Wir wollen die Kundenzufriedenheit steigern')
.fillKeyResultTitle(keyResultTitle)
.withMetricValues(
UNIT_NUMBER, '1', undefined, '5'
UNIT_NUMBER.unitName, '1', undefined, '5'
)
.addActionPlanElement('First action')
.addActionPlanElement('Second action')
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/duplicate-objective.cy.ts
Original file line number Diff line number Diff line change
@@ -112,7 +112,7 @@ describe('functionality of duplicating objectives and their belonging key-result
.addKeyResult('LoremIpsum', objectiveTitle)
.fillKeyResultTitle('A metric keyResult with lots of values')
.withMetricValues(
UNIT_CHF, '1', undefined, '5'
UNIT_CHF.unitName, '1', undefined, '5'
)
.fillKeyResultDescription('Its very sunny today.')
.addActionPlanElement('Action')
77 changes: 22 additions & 55 deletions frontend/cypress/e2e/key-result.cy.ts
Original file line number Diff line number Diff line change
@@ -2,17 +2,18 @@ import * as users from '../fixtures/users.json';
import CyOverviewPage from '../support/helper/dom-helper/pages/overviewPage';
import KeyResultDetailPage from '../support/helper/dom-helper/pages/keyResultDetailPage';
import KeyResultDialog from '../support/helper/dom-helper/dialogs/keyResultDialog';
import { UNIT_CHF, UNIT_PERCENT } from '../../src/app/shared/test-data';

let overviewPage = new CyOverviewPage();
let keyResultDetailPage = new KeyResultDetailPage();
describe('okr key-result', () => {
let overviewPage = new CyOverviewPage();
let keyResultDetailPage = new KeyResultDetailPage();

beforeEach(() => {
overviewPage = new CyOverviewPage();
keyResultDetailPage = new KeyResultDetailPage();
cy.loginAsUser(users.gl);
});
beforeEach(() => {
overviewPage = new CyOverviewPage();
keyResultDetailPage = new KeyResultDetailPage();
cy.loginAsUser(users.gl);
});

describe('okr key-result', () => {
it('should create new metric key-result', () => {
const keyResultDialog = overviewPage
.addKeyResult()
@@ -22,25 +23,25 @@ describe('okr key-result', () => {
.fillKeyResultDescription('This is my description');

keyResultDialog.withMetricValues(
'PERCENT', '999999999999999999999999999999', '7', undefined
UNIT_PERCENT.unitName, '999999999999999999999999999999', '7', undefined
);
keyResultDialog.checkOnDialog(() => cy.contains('Baseline darf maximal 20 Zeichen lang sein.'));

keyResultDialog.withMetricValues(
'PERCENT', '0', '7', undefined
UNIT_PERCENT.unitName, '0', '7', undefined
);
cy.getByTestId('stretch-goal')
.should('have.value', '10');

keyResultDialog.withMetricValues(
'PERCENT', '0', undefined, '100'
UNIT_PERCENT.unitName, '0', undefined, '100'
);
cy.getByTestId('target-goal')
.should('have.value', '70');

keyResultDialog
.withMetricValues(
'PERCENT', '21', undefined, '52'
UNIT_PERCENT.unitName, '21', undefined, '52'
)
.submit();
keyResultDetailPage.visit('I am a metric keyresult');
@@ -92,7 +93,7 @@ describe('okr key-result', () => {
.checkForDialogTextMetric()
.fillKeyResultTitle('I am a metric keyresult with a new one')
.withMetricValues(
'PERCENT', '21', undefined, '52'
UNIT_PERCENT.unitName, '21', undefined, '52'
)
.fillOwner('Bob Baumeister')
.fillKeyResultDescription('This is my description when creating and then open a new')
@@ -176,7 +177,7 @@ describe('okr key-result', () => {
.addKeyResult()
.fillKeyResultTitle('We want not to change metric keyresult title')
.withMetricValues(
'PERCENT', '0', undefined, '10'
UNIT_PERCENT.unitName, '0', undefined, '10'
)
.checkForDialogTextMetric()
.fillKeyResultDescription('This is my description')
@@ -193,7 +194,7 @@ describe('okr key-result', () => {
.checkOnDialog(() => cy.getByTestId('stretch-goal')
.should('have.value', '10'))
.withMetricValues(
'PERCENT', '0', '70', undefined
UNIT_PERCENT.unitName, '0', '70', undefined
)
.run(cy.getByTestId('ordinal-tab')
.click())
@@ -206,7 +207,7 @@ describe('okr key-result', () => {
.checkOnDialog(() => cy.getByTestId('stretch-goal')
.should('have.value', '100'))
.withMetricValues(
'PERCENT', '5', '8.5', undefined
UNIT_PERCENT.unitName, '5', '8.5', undefined
)
.checkOnDialog(() => cy.getByTestId('stretch-goal')
.should('have.value', '10'))
@@ -250,7 +251,7 @@ describe('okr key-result', () => {
KeyResultDialog.do()
.fillKeyResultTitle('This is my new title for the new metric keyresult')
.withMetricValues(
'PERCENT', '21', undefined, '56'
UNIT_PERCENT.unitName, '21', undefined, '56'
)
.fillKeyResultDescription('This is my new description')
.submit();
@@ -330,15 +331,15 @@ describe('okr key-result', () => {
KeyResultDialog.do()
.fillKeyResultTitle('My title')
.withMetricValues(
'CHF', 'abc', undefined, '123'
UNIT_CHF.unitName, 'abc', undefined, '123'
);
cy.getByTestId('submit')
.should('be.disabled');
cy.contains('Baseline muss eine Zahl sein.');

KeyResultDialog.do()
.withMetricValues(
'PERCENT', '45', undefined, '52'
UNIT_PERCENT.unitName, '45', undefined, '52'
);
cy.getByTestId('submit')
.should('not.be.disabled');
@@ -350,15 +351,15 @@ describe('okr key-result', () => {

KeyResultDialog.do()
.withMetricValues(
'PERCENT', '45', undefined, 'abc'
UNIT_PERCENT.unitName, '45', undefined, 'abc'
);
cy.getByTestId('submit')
.should('be.disabled');
cy.contains('Stretch Goal muss eine Zahl sein.');

KeyResultDialog.do()
.withMetricValues(
'PERCENT', '45', undefined, '83'
UNIT_PERCENT.unitName, '45', undefined, '83'
);
cy.getByTestId('submit')
.should('not.be.disabled');
@@ -467,37 +468,3 @@ describe('okr key-result', () => {
.run(cy.buttonShouldBePrimary('submit'));
});
});

describe('metric key-result edit units', () => {
it('should be able to add a custom unit and save it', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('This key-result has a new value!')
.editMetricValue('Bitcoins', 0)
.withMetricValues(
'Bitcoins', '0', '7', '10'
)
.submit();

// Should does not work yet, once the value is displayed on the detail view of the key-result correctly this will work
overviewPage.getKeyResultByName('This key-result has a new value!')
.click()
.should('contain', 'Bitcoins');
});

it('should be able to edit a custom unit and save it', () => {
overviewPage
.getKeyResultByName('This key-result has a new value!')
.click();

keyResultDetailPage
.editKeyResult()
.editMetricValue('Dogecoin', 1)
.submit();
});

it('should not save the custom unit when the save button is not clicked', () => {

});
});

2 changes: 1 addition & 1 deletion frontend/cypress/e2e/scoring.cy.ts
Original file line number Diff line number Diff line change
@@ -120,7 +120,7 @@ function setupMetricKr(
.addKeyResult()
.fillKeyResultTitle(name)
.withMetricValues(
UNIT_PERCENT, baseline.toString(), undefined, stretchGoal.toString()
UNIT_PERCENT.unitName, baseline.toString(), undefined, stretchGoal.toString()
)
.submit();
KeyResultDetailPage.do()
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/tab.cy.ts
Original file line number Diff line number Diff line change
@@ -214,7 +214,7 @@ describe('tabbing workflows', () => {
overviewPage
.addOngoingKeyResult()
.fillKeyResultTitle('A metric Keyresult for tabbing tests')
.withMetricValues(UNIT_CHF, '10', '100')
.withMetricValues(UNIT_CHF.unitName, '10', '100')
.submit();
KeyResultDetailPage.do()
.visit('A metric Keyresult for tabbing tests');