Skip to content

Commit

Permalink
Rename all cypress tests to start with lowercase letters
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomTannenbaum committed Dec 16, 2024
1 parent a1b3118 commit ebe4d40
Show file tree
Hide file tree
Showing 13 changed files with 128 additions and 128 deletions.
22 changes: 11 additions & 11 deletions frontend/cypress/e2e/check-in.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CheckInDialog from '../support/helper/dom-helper/dialogs/checkInDialog';
import CheckInHistoryDialog from '../support/helper/dom-helper/dialogs/checkInHistoryDialog';
import ConfirmDialog from '../support/helper/dom-helper/dialogs/confirmDialog';

describe('OKR checkin', () => {
describe('okr check-in', () => {
let overviewPage = new CyOverviewPage();
let keyResultDetailPage = new KeyResultDetailPage();

Expand All @@ -17,7 +17,7 @@ describe('OKR checkin', () => {
cy.loginAsUser(users.gl);
});

it(`Should create checkin metric`, () => {
it(`should create check-in metric`, () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('Very important keyresult')
Expand All @@ -39,7 +39,7 @@ describe('OKR checkin', () => {
cy.contains('We bought a new house');
});

it(`Should create checkin metric with confidence 0`, () => {
it(`should create check-in metric with confidence 0`, () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('Very important keyresult')
Expand All @@ -61,7 +61,7 @@ describe('OKR checkin', () => {
cy.contains('We bought a new house');
});

it(`Should create checkin metric with value below baseline`, () => {
it(`should create check-in metric with value below baseline`, () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('This will not be good')
Expand All @@ -81,7 +81,7 @@ describe('OKR checkin', () => {
cy.contains('Letztes Check-in (' + getCurrentDate() + ')');
});

it('Should create checkin ordinal', () => {
it('should create check-in ordinal', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('A new ordinal keyresult for our company')
Expand All @@ -103,7 +103,7 @@ describe('OKR checkin', () => {
cy.contains('Letztes Check-in (' + getCurrentDate() + ')');
});

it('Should generate checkin list', () => {
it('should generate check-in list', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('This will give a checkin list')
Expand Down Expand Up @@ -140,7 +140,7 @@ describe('OKR checkin', () => {
cy.contains('Wert: 50%');
});

it('Should edit metric checkin', () => {
it('should edit metric check-in', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('Here we edit a metric checkin')
Expand Down Expand Up @@ -171,7 +171,7 @@ describe('OKR checkin', () => {
cy.contains('We bought a new sheep');
});

it('Should generate correct labels in checkin history list', () => {
it('should generate correct labels in check-in history list', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('A new KeyResult for checking checkin list')
Expand Down Expand Up @@ -213,7 +213,7 @@ describe('OKR checkin', () => {
cy.contains('Wert: 30 FTE');
});

it('Should edit ordinal checkin', () => {
it('should edit ordinal check-in', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('For editing ordinal checkin')
Expand All @@ -240,7 +240,7 @@ describe('OKR checkin', () => {
cy.contains('STRETCH');
});

it(`Should display confirm dialog when creating checkin on draft objective`, () => {
it(`should display confirm dialog when creating check-in on draft objective`, () => {
overviewPage.addObjective().fillObjectiveTitle('draft objective title').selectQuarter('3').submitDraftObjective();
overviewPage.visitNextQuarter();
overviewPage
Expand All @@ -257,7 +257,7 @@ describe('OKR checkin', () => {
);
});

it(`Should only display last value div if last checkin is present`, () => {
it(`should only display last value div if last check-in is present`, () => {
const objectiveName = uniqueSuffix('new objective');

overviewPage.addObjective().fillObjectiveTitle(objectiveName).selectQuarter('3').submit();
Expand Down
4 changes: 2 additions & 2 deletions frontend/cypress/e2e/duplicated-scoring.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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';

describe('E2E test for scoring adjustment on objective duplicate', () => {
describe('e2e test for scoring adjustment on objective duplicate', () => {
let overviewPage = new CyOverviewPage();
let keyResultDetailPage = new KeyResultDetailPage();

Expand All @@ -12,7 +12,7 @@ describe('E2E test for scoring adjustment on objective duplicate', () => {
cy.loginAsUser(users.gl);
});

it('Should duplicate ordinal checkin and validate value of scoring component', () => {
it('should duplicate ordinal check-in and validate value of scoring component', () => {
overviewPage
.addKeyResult('Puzzle ITC', 'Wir wollen die Kundenzufriedenheit steigern')
.fillKeyResultTitle('stretch keyresult for testing')
Expand Down
18 changes: 9 additions & 9 deletions frontend/cypress/e2e/key-result.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import KeyResultDetailPage from '../support/helper/dom-helper/pages/keyResultDet
import { Unit } from '../../src/app/shared/types/enums/Unit';
import KeyResultDialog from '../support/helper/dom-helper/dialogs/keyResultDialog';

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

Expand All @@ -14,7 +14,7 @@ describe('OKR keyresult', () => {
cy.loginAsUser(users.gl);
});

it('Should create new metric keyresult', () => {
it('should create new metric key-result', () => {
overviewPage
.addKeyResult()
.checkForDialogTextMetric()
Expand All @@ -38,7 +38,7 @@ describe('OKR keyresult', () => {
cy.contains('Key Result bearbeiten');
});

it('Should create new ordinal keyresult', () => {
it('should create new ordinal key-result', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('I am a ordinal keyresult')
Expand Down Expand Up @@ -66,7 +66,7 @@ describe('OKR keyresult', () => {
cy.contains('Key Result bearbeiten');
});

it('Should create new keyresult and save and new', () => {
it('should create new key-result and save and new', () => {
overviewPage
.addKeyResult()
.checkForDialogTextMetric()
Expand All @@ -79,7 +79,7 @@ describe('OKR keyresult', () => {
KeyResultDialog.do().checkForDialogTextMetric();
});

it('Should create and edit keyresult with action plan', () => {
it('should create and edit key-result with action plan', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('This is a keyresult with an action plan')
Expand All @@ -106,7 +106,7 @@ describe('OKR keyresult', () => {
cy.getByTestId('action-input').should('have.length', 3);
});

it('Should edit a keyresult without type change', () => {
it('should edit a key-result without type change', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('We want not to change keyresult title')
Expand Down Expand Up @@ -139,7 +139,7 @@ describe('OKR keyresult', () => {
cy.contains('This is my new description');
});

it('Should edit a keyresult with type change', () => {
it('should edit a key-result with type change', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('Here we want to change keyresult title')
Expand Down Expand Up @@ -172,7 +172,7 @@ describe('OKR keyresult', () => {
cy.contains('This is my new description');
});

it('Should check validation in keyresult dialog', () => {
it('should check validation in key-result dialog', () => {
overviewPage.addKeyResult().checkForDialogTextMetric();
cy.getByTestId('submit').should('be.disabled');
KeyResultDialog.do()
Expand Down Expand Up @@ -245,7 +245,7 @@ describe('OKR keyresult', () => {
cy.getByTestId('submit').should('not.be.disabled');
});

it('Should delete existing keyresult', () => {
it('should delete existing key-result', () => {
overviewPage
.addKeyResult()
.fillKeyResultTitle('A keyresult to delete')
Expand Down
8 changes: 4 additions & 4 deletions frontend/cypress/e2e/login.cy.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import * as users from '../fixtures/users.json';

describe('OKR login', () => {
describe('okr login', () => {
beforeEach(() => {
cy.loginAsUser(users.gl);
});

it('Should display correct username after login', () => {
it('should display correct username after login', () => {
cy.title().should('equal', 'Puzzle OKR');
cy.getByTestId('user-name').contains(users.gl.name);
});

it('Should login and logout', () => {
it('should login and logout', () => {
cy.title().should('equal', 'Puzzle OKR');
cy.getByTestId('user-options').click();
cy.getByTestId('logout').click();
Expand All @@ -20,7 +20,7 @@ describe('OKR login', () => {
});
});

it('Should open correct help page when clicking help button', () => {
it('should open correct help page when clicking help button', () => {
cy.window().then((win) => {
cy.stub(win, 'open').as('openWindow');
});
Expand Down
20 changes: 10 additions & 10 deletions frontend/cypress/e2e/objective-backlog.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import * as users from '../fixtures/users.json';
import CyOverviewPage from '../support/helper/dom-helper/pages/overviewPage';
import ObjectiveDialog from '../support/helper/dom-helper/dialogs/objectiveDialog';

describe('OKR objective backlog', () => {
describe('okr objective backlog', () => {
let overviewPage = new CyOverviewPage();

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

it(`Should not have save button when creating objective in backlog quarter`, () => {
it(`should not have save button when creating objective in backlog quarter`, () => {
overviewPage
.addObjective()
.fillObjectiveTitle('Objective in quarter backlog')
Expand All @@ -25,7 +25,7 @@ describe('OKR objective backlog', () => {
cy.contains('Objective in quarter backlog');
});

it(`Should edit objective and move it to backlog`, () => {
it(`should edit objective and move it to backlog`, () => {
overviewPage.addObjective().fillObjectiveTitle('Move to another quarter on edit').submitDraftObjective();

overviewPage
Expand All @@ -42,7 +42,7 @@ describe('OKR objective backlog', () => {
cy.contains('This goes now to backlog');
});

it(`Should not be able to select backlog quarter when editing ongoing objective`, () => {
it(`should not be able to select backlog quarter when editing ongoing objective`, () => {
overviewPage.addObjective().fillObjectiveTitle('We can not move this to backlog').submit();

overviewPage
Expand All @@ -55,7 +55,7 @@ describe('OKR objective backlog', () => {
cy.get('select#quarter').should('not.contain', 'Backlog');
});

it(`Should release objective to another quarter from backlog`, () => {
it(`should release objective to another quarter from backlog`, () => {
overviewPage.visitBacklogQuarter();
overviewPage.addObjective().fillObjectiveTitle('We can not release this').submitDraftObjective();

Expand All @@ -80,7 +80,7 @@ describe('OKR objective backlog', () => {
cy.contains('This is our first released objective');
});

it(`Should edit objective title in backlog`, () => {
it(`should edit objective title in backlog`, () => {
overviewPage.visitBacklogQuarter();
overviewPage.addObjective().fillObjectiveTitle('This is possible for edit').submitDraftObjective();

Expand All @@ -95,7 +95,7 @@ describe('OKR objective backlog', () => {
overviewPage.getObjectiveByNameAndState('My new title', 'draft');
});

it(`Should edit objective in backlog and change quarter`, () => {
it(`should edit objective in backlog and change quarter`, () => {
overviewPage.visitBacklogQuarter();
overviewPage.addObjective().fillObjectiveTitle('This goes to other quarter later').submitDraftObjective();

Expand All @@ -111,7 +111,7 @@ describe('OKR objective backlog', () => {
overviewPage.getObjectiveByNameAndState('This goes to other quarter later', 'draft');
});

it(`Should duplicate objective in backlog`, () => {
it(`should duplicate objective in backlog`, () => {
overviewPage.visitBacklogQuarter();
overviewPage.addObjective().fillObjectiveTitle('Ready for duplicate in backlog').submitDraftObjective();

Expand All @@ -127,7 +127,7 @@ describe('OKR objective backlog', () => {
overviewPage.getObjectiveByNameAndState('This is a new duplication in backlog', 'draft');
});

it('Should duplicate objective from backlog to another quarter', () => {
it('should duplicate objective from backlog to another quarter', () => {
overviewPage.visitBacklogQuarter();
overviewPage.addObjective().fillObjectiveTitle('Ready for duplicate to another quarter').submitDraftObjective();
overviewPage
Expand All @@ -144,7 +144,7 @@ describe('OKR objective backlog', () => {
overviewPage.getObjectiveByNameAndState('New duplication from backlog', 'draft').should('exist');
});

it(`Should duplicate ongoing objective to backlog`, () => {
it(`should duplicate ongoing objective to backlog`, () => {
overviewPage.addObjective().fillObjectiveTitle('Possible to duplicate into backlog').submit();

overviewPage
Expand Down
16 changes: 8 additions & 8 deletions frontend/cypress/e2e/objective-crud.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as users from '../fixtures/users.json';
import CyOverviewPage from '../support/helper/dom-helper/pages/overviewPage';
import ObjectiveDialog from '../support/helper/dom-helper/dialogs/objectiveDialog';

describe('CRUD operations', () => {
describe('crud operations', () => {
let overviewPage = new CyOverviewPage();

beforeEach(() => {
Expand All @@ -14,7 +14,7 @@ describe('CRUD operations', () => {
['ongoing objective title', 'save', 'ongoing-icon.svg'],
['draft objective title', 'save-draft', 'draft-icon.svg'],
].forEach(([objectiveTitle, buttonTestId, icon]) => {
it(`Should create objective without keyresults`, () => {
it(`should create objective without key-results`, () => {
overviewPage.addObjective().fillObjectiveTitle(objectiveTitle).selectQuarter('3');
cy.getByTestId(buttonTestId).click();
overviewPage.visitNextQuarter();
Expand All @@ -25,7 +25,7 @@ describe('CRUD operations', () => {
});
});

it(`Should display error message when title not set`, () => {
it(`should display error message when title not set`, () => {
overviewPage.addObjective();
cy.getByTestId('title').first().type('title').clear();
cy.contains('Titel muss folgende Länge haben: 2-250 Zeichen');
Expand All @@ -34,14 +34,14 @@ describe('CRUD operations', () => {
cy.getByTestId('cancel').should('not.be.disabled');
});

it(`Should cancel creating an objective`, () => {
it(`should cancel creating an objective`, () => {
const objectiveTitle = 'this is a canceled objective';
overviewPage.addObjective().selectQuarter('3').cancel();
overviewPage.visitNextQuarter();
cy.contains(objectiveTitle).should('not.exist');
});

it(`Should delete existing objective`, () => {
it(`should delete existing objective`, () => {
overviewPage.getFirstObjective().findByTestId('three-dot-menu').click();
overviewPage.selectFromThreeDotMenu('Objective bearbeiten');
ObjectiveDialog.do()
Expand All @@ -53,20 +53,20 @@ describe('CRUD operations', () => {
.submit();
});

it(`Should open objective detail view via click`, () => {
it(`should open objective detail view via click`, () => {
overviewPage.getFirstObjective().find('.title').click();
cy.url().should('include', 'objective');
});

it(`Should edit objective`, () => {
it(`should edit objective`, () => {
const updatedTitle = 'This is an updated title';
overviewPage.getFirstObjective().findByTestId('three-dot-menu').click();
overviewPage.selectFromThreeDotMenu('Objective bearbeiten');
ObjectiveDialog.do().fillObjectiveTitle(updatedTitle).submit();
cy.contains(updatedTitle).should('exist');
});

it(`Should duplicate objective`, () => {
it(`should duplicate objective`, () => {
const duplicatedTitle = 'This is a duplicated objective';
overviewPage.getFirstObjective().findByTestId('three-dot-menu').click();
overviewPage.selectFromThreeDotMenu('Objective duplizieren');
Expand Down
Loading

0 comments on commit ebe4d40

Please sign in to comment.