Skip to content

Commit

Permalink
Merge branch 'master' into FE-5153_decimal-props-value-not-reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
edleeks87 authored Jun 1, 2022
2 parents fefd829 + 4c086fb commit 850aa95
Show file tree
Hide file tree
Showing 16 changed files with 60 additions and 31 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run 20 copies of the current job in parallel
# run 15 copies of the current job in parallel
containers:
[
1,
Expand All @@ -38,11 +38,6 @@ jobs:
13,
14,
15,
16,
17,
18,
19,
20,
]
container: cypress/browsers:node14.17.6-slim-chrome100-ff99-edge
steps:
Expand Down Expand Up @@ -117,10 +112,11 @@ jobs:
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run 1 copy of the current job in parallel
# run 2 copy of the current job in parallel
containers:
[
1
1,
2,
]
container: cypress/browsers:node14.17.6-slim-chrome100-ff99-edge
steps:
Expand Down Expand Up @@ -188,15 +184,19 @@ jobs:
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run 6 copies of the current job in parallel
# run 10 copies of the current job in parallel
containers:
[
1,
2,
3,
4,
5,
6
6,
7,
8,
9,
10,
]
container: cypress/browsers:node14.17.6-slim-chrome100-ff99-edge
steps:
Expand Down
3 changes: 3 additions & 0 deletions cypress/integration/accessibility/a11y-eighth-part.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(526, 600);
3 changes: 3 additions & 0 deletions cypress/integration/accessibility/a11y-eleventh-part.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(751, 825);
2 changes: 1 addition & 1 deletion cypress/integration/accessibility/a11y-fifth-part.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(601, 750);
tests(301, 375);
2 changes: 1 addition & 1 deletion cypress/integration/accessibility/a11y-first-part.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(0, 150);
tests(0, 75);
2 changes: 1 addition & 1 deletion cypress/integration/accessibility/a11y-fourth-part.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(451, 600);
tests(226, 300);
3 changes: 3 additions & 0 deletions cypress/integration/accessibility/a11y-ninth-part.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(601, 675);
2 changes: 1 addition & 1 deletion cypress/integration/accessibility/a11y-second-part.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(151, 300);
tests(76, 150);
3 changes: 3 additions & 0 deletions cypress/integration/accessibility/a11y-seventh-part.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(451, 525);
2 changes: 1 addition & 1 deletion cypress/integration/accessibility/a11y-sixth-part.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(751);
tests(376, 450);
3 changes: 3 additions & 0 deletions cypress/integration/accessibility/a11y-tenth-part.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(676, 750);
2 changes: 1 addition & 1 deletion cypress/integration/accessibility/a11y-third-part.test.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(301, 450);
tests(151, 225);
3 changes: 3 additions & 0 deletions cypress/integration/accessibility/a11y-twelfth-part.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import tests from "../../support/accessibility/a11y-utils";

tests(826);
23 changes: 13 additions & 10 deletions src/components/date/date.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,14 @@ import { verifyRequiredAsterisk } from "../../../cypress/support/component-helpe
import CypressMountWithProviders from "../../../cypress/support/component-helper/cypress-mount";

const DAY_PICKER_PREFIX = "DayPicker-Day--";
const TODAY_CALENDAR = Cypress.dayjs().format("ddd D MMM YYYY");
const TODAY = Cypress.dayjs().format("ddd D MMM YYYY");
const DATE_INPUT = Cypress.dayjs("2022-05-01").format("DD/MM/YYYY");
const TODAY_DATE_INPUT = Cypress.dayjs().format("DD/MM/YYYY");
const NEXT_MONTH = Cypress.dayjs().add(1, "months").format("MMMM YYYY");
const ACTUAL_MONTH = Cypress.dayjs().format("MMMM YYYY");
const PREVIOUS_MONTH = Cypress.dayjs()
const NEXT_MONTH = Cypress.dayjs("2022-05-01")
.add(1, "months")
.format("MMMM YYYY");
const ACTUAL_MONTH = Cypress.dayjs("2022-05-01").format("MMMM YYYY");
const PREVIOUS_MONTH = Cypress.dayjs("2022-05-01")
.subtract(1, "months")
.format("MMMM YYYY");
const MIN_DATE = "04/04/2030";
Expand Down Expand Up @@ -158,13 +161,13 @@ context("Test for DateInput component", () => {

dateInput().clear().type(TODAY_DATE_INPUT);

dayPickerDay(TODAY_CALENDAR)
dayPickerDay(TODAY)
.should("have.attr", "aria-label")
.and("contains", TODAY_CALENDAR);
dayPickerDay(TODAY_CALENDAR)
.and("contains", TODAY);
dayPickerDay(TODAY)
.should("have.attr", "class")
.and("contains", `${DAY_PICKER_PREFIX}today`);
dayPickerDay(TODAY_CALENDAR)
dayPickerDay(TODAY)
.should("have.attr", "class")
.and("contains", `${DAY_PICKER_PREFIX}selected`);
});
Expand Down Expand Up @@ -223,7 +226,7 @@ context("Test for DateInput component", () => {
(arrow, month) => {
CypressMountWithProviders(<DateInputCustom />);

dateInput().clear().type(TODAY_DATE_INPUT);
dateInput().clear().type(DATE_INPUT);
dateInputParent().click();

getDataElementByValue(arrow).click();
Expand All @@ -246,7 +249,7 @@ context("Test for DateInput component", () => {
(arrow, month, key) => {
CypressMountWithProviders(<DateInputCustom />);

dateInput().clear().type(TODAY_DATE_INPUT);
dateInput().clear().type(DATE_INPUT);
dateInputParent().click();

dayPickerWrapper().focus();
Expand Down
8 changes: 6 additions & 2 deletions src/components/decimal/decimal.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ context("Tests for Decimal component", () => {
(precision, inputValue, outputValue) => {
CypressMountWithProviders(<Decimal precision={precision} />);

commonDataElementInputPreview().type(inputValue).blur({ force: true });
commonDataElementInputPreview()
.type(inputValue, { delay: 0 })
.blur({ force: true });
commonDataElementInputPreview().should("have.value", outputValue);
}
);
Expand Down Expand Up @@ -127,7 +129,9 @@ context("Tests for Decimal component", () => {
(locale, inputValue, outputValue) => {
CypressMountWithProviders(<Decimal locale={locale} precision={3} />);

commonDataElementInputPreview().type(inputValue).blur({ force: true });
commonDataElementInputPreview()
.type(inputValue, { delay: 0 })
.blur({ force: true });
commonDataElementInputPreview()
.invoke("val")
.then(($el) => {
Expand Down
10 changes: 7 additions & 3 deletions src/components/grouped-character/grouped-character.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ context("Tests for GroupedCharacter component", () => {
(group, inputValue, outputValue) => {
CypressMountWithProviders(<GroupedCharacterComponent groups={group} />);

commonDataElementInputPreview().type(inputValue).blur({ force: true });
commonDataElementInputPreview()
.type(inputValue, { delay: 0 })
.blur({ force: true });
commonDataElementInputPreview()
.invoke("val")
.then(($el) => {
Expand All @@ -87,7 +89,9 @@ context("Tests for GroupedCharacter component", () => {
<GroupedCharacterComponent separator={separator} />
);

commonDataElementInputPreview().type(inputValue).blur({ force: true });
commonDataElementInputPreview()
.type(inputValue, { delay: 0 })
.blur({ force: true });
commonDataElementInputPreview()
.invoke("val")
.then(($el) => {
Expand Down Expand Up @@ -197,7 +201,7 @@ context("Tests for GroupedCharacter component", () => {
);

commonDataElementInputPreview()
.type(inputValue)
.type(inputValue, { delay: 0 })
.blur({ force: true })
.then(() => {
// eslint-disable-next-line no-unused-expressions
Expand Down

0 comments on commit 850aa95

Please sign in to comment.