Skip to content

Commit

Permalink
revert to single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
kcinay055679 committed Dec 23, 2024
1 parent cb75cb5 commit 91c40b3
Show file tree
Hide file tree
Showing 225 changed files with 5,232 additions and 5,229 deletions.
6 changes: 3 additions & 3 deletions frontend/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { defineConfig } from "cypress";
import { defineConfig } from 'cypress';

export default defineConfig({
e2e: {
baseUrl: "http://pitc.okr.localhost:4200",
baseUrl: 'http://pitc.okr.localhost:4200',
experimentalMemoryManagement: true,
testIsolation: true,
viewportWidth: 1920,
viewportHeight: 1080
},
env: {
login_url: "http://localhost:8544"
login_url: 'http://localhost:8544'
}
});
330 changes: 165 additions & 165 deletions frontend/cypress/e2e/check-in.cy.ts

Large diffs are not rendered by default.

126 changes: 63 additions & 63 deletions frontend/cypress/e2e/duplicate-objective.cy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,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";
import ObjectiveDialog from "../support/helper/dom-helper/dialogs/objectiveDialog";
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 ObjectiveDialog from '../support/helper/dom-helper/dialogs/objectiveDialog';

let overviewPage = new CyOverviewPage();

Expand All @@ -10,33 +10,33 @@ beforeEach(() => {
cy.loginAsUser(users.gl);
});

describe("Functionality of duplicating objectives and their belonging keyResults", () => {
const firstKeyResultName = "New structure that rewards funny guys and innovation before the end of Q1.";
const secondKeyResultName = "Monthly town halls between our people and leadership teams over the next four months.";
const thirdKeyResultName = "High employee satisfaction scores (80%+) throughout the year.";
describe('Functionality of duplicating objectives and their belonging keyResults', () => {
const firstKeyResultName = 'New structure that rewards funny guys and innovation before the end of Q1.';
const secondKeyResultName = 'Monthly town halls between our people and leadership teams over the next four months.';
const thirdKeyResultName = 'High employee satisfaction scores (80%+) throughout the year.';

it("Should be able to duplicate a objective into this quarter, including all keyResults", () => {
const duplicatedTitle = "This is a duplicated objective with all keyResults";
it('Should be able to duplicate a objective into this quarter, including all keyResults', () => {
const duplicatedTitle = 'This is a duplicated objective with all keyResults';

overviewPage
.duplicateObjective("Build a company culture that kills the competition.")
.duplicateObjective('Build a company culture that kills the competition.')
.fillObjectiveTitle(duplicatedTitle)
.submit();

cy.contains(duplicatedTitle);
overviewPage.getKeyResultOfObjective(duplicatedTitle, firstKeyResultName)
.should("exist");
.should('exist');
overviewPage.getKeyResultOfObjective(duplicatedTitle, secondKeyResultName)
.should("exist");
.should('exist');
overviewPage.getKeyResultOfObjective(duplicatedTitle, thirdKeyResultName)
.should("exist");
.should('exist');
});

it("Should be able to duplicate a objective into this quarter, only including one keyResult", () => {
const duplicatedTitle = "This is a duplicated objective with one keyResult";
it('Should be able to duplicate a objective into this quarter, only including one keyResult', () => {
const duplicatedTitle = 'This is a duplicated objective with one keyResult';

overviewPage
.duplicateObjective("Build a company culture that kills the competition.")
.duplicateObjective('Build a company culture that kills the competition.')
.fillObjectiveTitle(duplicatedTitle)
.excludeKeyResults([secondKeyResultName,
thirdKeyResultName])
Expand All @@ -46,105 +46,105 @@ describe("Functionality of duplicating objectives and their belonging keyResults

overviewPage
.getAllKeyResultsOfObjective(duplicatedTitle)
.should("not.contain", secondKeyResultName)
.should("not.contain", thirdKeyResultName);
.should('not.contain', secondKeyResultName)
.should('not.contain', thirdKeyResultName);
});

it("Should not show option to select keyResults when objective with no keyResults is being duplicated", () => {
const duplicatedTitle = "This is a duplicated objective without any keyResults";
it('Should not show option to select keyResults when objective with no keyResults is being duplicated', () => {
const duplicatedTitle = 'This is a duplicated objective without any keyResults';

overviewPage.duplicateObjective("should not appear on staging, no sea takimata sanctus est Lorem ipsum dolor sit amet.");
cy.contains("Key Results:")
.should("not.exist");
overviewPage.duplicateObjective('should not appear on staging, no sea takimata sanctus est Lorem ipsum dolor sit amet.');
cy.contains('Key Results:')
.should('not.exist');
ObjectiveDialog.do()
.fillObjectiveTitle(duplicatedTitle)
.submit();

overviewPage.getObjectiveByName(duplicatedTitle)
.should("exist");
.should('exist');
});

it("Should be able to duplicate a objective into the next quarter, including all keyResults", () => {
const duplicatedTitle = "This is a default objective with all keyResults in quarter 3!";
it('Should be able to duplicate a objective into the next quarter, including all keyResults', () => {
const duplicatedTitle = 'This is a default objective with all keyResults in quarter 3!';

overviewPage
.duplicateObjective("Build a company culture that kills the competition.")
.duplicateObjective('Build a company culture that kills the competition.')
.fillObjectiveTitle(duplicatedTitle)
.selectQuarter("3")
.selectQuarter('3')
.submit();

overviewPage.visitNextQuarter();

cy.contains(duplicatedTitle);
overviewPage.getKeyResultOfObjective(duplicatedTitle, firstKeyResultName)
.should("exist");
.should('exist');
overviewPage.getKeyResultOfObjective(duplicatedTitle, secondKeyResultName)
.should("exist");
.should('exist');
overviewPage.getKeyResultOfObjective(duplicatedTitle, thirdKeyResultName)
.should("exist");
.should('exist');
});

it("Should not duplicate objective when cancel button is clicked", () => {
const duplicatedTitle = "This is a never existing objective";
it('Should not duplicate objective when cancel button is clicked', () => {
const duplicatedTitle = 'This is a never existing objective';

overviewPage
.duplicateObjective("Build a company culture that kills the competition.")
.duplicateObjective('Build a company culture that kills the competition.')
.fillObjectiveTitle(duplicatedTitle)
.fillObjectiveDescription("Wow this is a very nice description!")
.fillObjectiveDescription('Wow this is a very nice description!')
.cancel();

cy.contains(duplicatedTitle)
.should("not.exist");
.should('not.exist');
});
});

describe("Verify functionality of scoring adjustment on duplicated objectives", () => {
describe('Verify functionality of scoring adjustment on duplicated objectives', () => {
const keyresultDetailPage = new KeyResultDetailPage();

it("Duplicate ordinal checkin and validate value of scoring component", () => {
it('Duplicate ordinal checkin and validate value of scoring component', () => {
overviewPage
.addKeyResult("Puzzle ITC", "Wir wollen die Kundenzufriedenheit steigern")
.fillKeyResultTitle("stretch keyresult for testing")
.withOrdinalValues("Ex. val", "Ex. val", "Ex. val")
.addKeyResult('Puzzle ITC', 'Wir wollen die Kundenzufriedenheit steigern')
.fillKeyResultTitle('stretch keyresult for testing')
.withOrdinalValues('Ex. val', 'Ex. val', 'Ex. val')
.submit();

cy.contains("stretch keyresult for testing");
cy.contains('stretch keyresult for testing');
keyresultDetailPage
.visit("stretch keyresult for testing")
.visit('stretch keyresult for testing')
.createCheckIn()
.selectOrdinalCheckInZone("stretch")
.selectOrdinalCheckInZone('stretch')
.setCheckInConfidence(8)
.fillCheckInCommentary("Testveränderungen")
.fillCheckInInitiatives("Testmassnahmen")
.fillCheckInCommentary('Testveränderungen')
.fillCheckInInitiatives('Testmassnahmen')
.submit();

cy.intercept("GET", "**/overview?*")
.as("indexPage");
cy.intercept('GET', '**/overview?*')
.as('indexPage');
keyresultDetailPage.close();
cy.wait("@indexPage");
cy.wait('@indexPage');

overviewPage
.duplicateObjective("Wir wollen die Kundenzufriedenheit steigern")
.fillObjectiveTitle("A duplicated Objective for this tool")
.selectQuarter("3")
.duplicateObjective('Wir wollen die Kundenzufriedenheit steigern')
.fillObjectiveTitle('A duplicated Objective for this tool')
.selectQuarter('3')
.submit();

overviewPage.checkForToaster("Das Objective wurde erfolgreich erstellt.", "success");
overviewPage.checkForToaster('Das Objective wurde erfolgreich erstellt.', 'success');

overviewPage.visitNextQuarter();

overviewPage
.getKeyResultByName("stretch keyresult for testing")
.findByTestId("scoring-component")
.findByTestId("fail")
.as("fail-area");
.getKeyResultByName('stretch keyresult for testing')
.findByTestId('scoring-component')
.findByTestId('fail')
.as('fail-area');

cy.get("@fail-area")
cy.get('@fail-area')
.should(($fail) => {
expect($fail).not.to.have.css("score-red");
expect($fail).not.to.have.css("score-yellow");
expect($fail).not.to.have.css("score-green");
expect($fail).not.to.have.css("score-stretch");
expect($fail).not.to.have.css('score-red');
expect($fail).not.to.have.css('score-yellow');
expect($fail).not.to.have.css('score-green');
expect($fail).not.to.have.css('score-stretch');
});
});
});
Loading

0 comments on commit 91c40b3

Please sign in to comment.