Skip to content

Commit

Permalink
Merge branch 'master' into icon-button-playwright-refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
divyajindel authored Nov 1, 2023
2 parents 6dc0a93 + 1db9c98 commit 361d0c5
Show file tree
Hide file tree
Showing 45 changed files with 904 additions and 197 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [123.2.0](https://github.com/Sage/carbon/compare/v123.1.0...v123.2.0) (2023-10-30)


### Features

* **confirm:** make data tag props available on cancel and confirm buttons ([2c69101](https://github.com/Sage/carbon/commit/2c691011688c5186a7d20f8af7e6acd768e5a0e8)), closes [#6374](https://github.com/Sage/carbon/issues/6374)

## [123.1.0](https://github.com/Sage/carbon/compare/v123.0.1...v123.1.0) (2023-10-27)


### Features

* **action-popover:** disabled items can no longer be focused ([208148b](https://github.com/Sage/carbon/commit/208148b2d5009db64fa3ce4d8ad86250c860c523))

### [123.0.1](https://github.com/Sage/carbon/compare/v123.0.0...v123.0.1) (2023-10-27)


Expand Down
4 changes: 2 additions & 2 deletions cypress/components/flat-table/flat-table.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ context("Tests for Flat Table component", () => {
it.skip("should render Flat Table with multiple sticky row headers, stickyAlignment set to right", () => {
cy.viewport(700, 700);

CypressMountWithProviders(<stories.FlatTableMutipleStickyComponent />);
CypressMountWithProviders(<stories.FlatTableMultipleStickyComponent />);

flatTableBodyRowByPosition(1)
.find("td")
Expand Down Expand Up @@ -2932,7 +2932,7 @@ context("Tests for Flat Table component", () => {
it.skip("should render Flat Table with multiple sticky row headers for accessibility tests", () => {
cy.viewport(700, 700);

CypressMountWithProviders(<stories.FlatTableMutipleStickyComponent />);
CypressMountWithProviders(<stories.FlatTableMultipleStickyComponent />);
cy.checkAccessibility();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ context("Tests for GroupedCharacter component", () => {
["right", "end"],
["left", "start"],
] as [GroupedCharacterProps["labelAlign"], string][])(
"should use %s as labelAligment and render it with %s as css properties",
"should use %s as labelAlignment and render it with %s as css properties",
(alignment, cssProp) => {
CypressMountWithProviders(
<GroupedCharacterComponent labelInline labelAlign={alignment} />
Expand Down
8 changes: 4 additions & 4 deletions cypress/components/menu/menu.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -333,12 +333,12 @@ context("Testing Menu component", () => {
searchDefaultInput().tab();
searchCrossIcon().parent().should("have.focus");

const bouding = (element: JQuery<Element>) => {
const bounding = (element: JQuery<Element>) => {
return element[0].getBoundingClientRect();
};

searchCrossIcon()
.then(($el) => bouding($el))
.then(($el) => bounding($el))
.as("position");

cy.get("@position")
Expand Down Expand Up @@ -627,7 +627,7 @@ context("Testing Menu component", () => {
"center",
"flex-start",
"flex-end",
])("should verify Menu alignItmes is %s", (alignment) => {
])("should verify Menu alignItems is %s", (alignment) => {
CypressMountWithProviders(<MenuComponent alignItems={alignment} />);

menu().should("have.css", "align-items", alignment);
Expand Down Expand Up @@ -1501,7 +1501,7 @@ context("Testing Menu component", () => {
"text-top",
"top",
])(
"should pass accessibility tests for Menu when alignItmes is %s",
"should pass accessibility tests for Menu when alignItems is %s",
(alignment) => {
CypressMountWithProviders(<MenuComponent verticalAlign={alignment} />);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ context("Tests for MultiActionButton component", () => {
});
});

describe("user interactions with MultiActionutton", () => {
describe("user interactions with MultiActionButton", () => {
describe("pressing ArrowUp while MultiActionButton is open", () => {
it("should move focus to previous child button and should not loop to last button when first is focused", () => {
CypressMountWithProviders(
Expand Down Expand Up @@ -448,7 +448,7 @@ context("Tests for MultiActionButton component", () => {
});
});

describe("user interactions with MultiActionutton when wrapping the child buttons in a custom component", () => {
describe("user interactions with MultiActionButton when wrapping the child buttons in a custom component", () => {
describe("pressing ArrowUp while MultiActionButton is open", () => {
it("should move focus to previous child button and should not loop to last button when first is focused", () => {
CypressMountWithProviders(
Expand Down
2 changes: 1 addition & 1 deletion cypress/components/number/number.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ context("Tests for Number component", () => {
["right", "end"],
["left", "start"],
] as [NumberProps["labelAlign"], string][])(
"should use %s as labelAligment and render it with flex-%s as css properties",
"should use %s as labelAlignment and render it with flex-%s as css properties",
(alignment, cssProp) => {
CypressMountWithProviders(
<NumberInputComponent labelInline labelAlign={alignment} />
Expand Down
6 changes: 3 additions & 3 deletions cypress/components/pager/pager.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ context("Test for Pager component", () => {
});
});

describe("check funtionality for Pager component", () => {
describe("check functionality for Pager component", () => {
it.each([-1, -10, -100, ...testData])(
"should set totalRecords out of scope to %s",
(totalRecords) => {
Expand Down Expand Up @@ -379,14 +379,14 @@ context("Test for Pager component", () => {
viewportWidth,
showItemsAssertion,
firstAndLastArrowsAssertion,
totalRecordsAssetion
totalRecordsAssertion
) => {
cy.viewport(viewportWidth, 768);

CypressMountWithProviders(<PagerComponentResponsive />);

showLabelBefore().should(showItemsAssertion);
pagerSummary().should(totalRecordsAssetion);
pagerSummary().should(totalRecordsAssertion);
firstArrow().should(firstAndLastArrowsAssertion);
lastArrow().should(firstAndLastArrowsAssertion);
nextArrow().should("be.visible");
Expand Down
2 changes: 1 addition & 1 deletion cypress/components/password/password.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ context("Tests for Password component", () => {
["right", "end"],
["left", "start"],
] as [PasswordProps["labelAlign"], string][])(
"should use %s as labelAligment and render it with %s as css properties",
"should use %s as labelAlignment and render it with %s as css properties",
(alignment, cssProp) => {
CypressMountWithProviders(
<PasswordComponent labelInline labelAlign={alignment} />
Expand Down
2 changes: 1 addition & 1 deletion cypress/components/switch/switch.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ context("Testing Switch component", () => {
["warning", VALIDATION.WARNING],
["info", VALIDATION.INFO],
])(
"verify Switch component is verifyed with appropriate border color for validations",
"verify Switch component is verified with appropriate border color for validations",
(type, validation) => {
CypressMountWithProviders(<SwitchComponentValidations />);

Expand Down
16 changes: 8 additions & 8 deletions cypress/components/tooltip/tooltip.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@ context("Tests for Tooltip component", () => {
});

describe("Accessibility tests for Tooltip component", () => {
it("should pass accessibilty tests for Tooltip Default story", () => {
it("should pass accessibility tests for Tooltip Default story", () => {
CypressMountWithProviders(<stories.Default />);

getDataElementByValue("main-text").click();
cy.checkAccessibility();
});

it("should pass accessibilty tests for Tooltip Controlled story", () => {
it("should pass accessibility tests for Tooltip Controlled story", () => {
CypressMountWithProviders(<stories.Controlled />);

getDataElementByValue("main-text").eq(0).click();
Expand All @@ -228,7 +228,7 @@ context("Tests for Tooltip component", () => {
["left", 2],
["right", 3],
])(
"should pass accessibilty tests for Tooltip Positioning story %s position",
"should pass accessibility tests for Tooltip Positioning story %s position",
(position, button) => {
CypressMountWithProviders(<stories.Positioning />);

Expand All @@ -237,20 +237,20 @@ context("Tests for Tooltip component", () => {
}
);

it("should pass accessibilty tests for Tooltip FlipBehviourOverrides story", () => {
CypressMountWithProviders(<stories.FlipBehviourOverrides />);
it("should pass accessibility tests for Tooltip FlipBehaviourOverrides story", () => {
CypressMountWithProviders(<stories.FlipBehaviourOverrides />);

cy.checkAccessibility();
});

it("should pass accessibilty tests for Tooltip LargeTooltip story", () => {
it("should pass accessibility tests for Tooltip LargeTooltip story", () => {
CypressMountWithProviders(<stories.LargeTooltip />);

getDataElementByValue("main-text").click();
cy.checkAccessibility();
});

it("should pass accessibilty tests for Tooltip Types story", () => {
it("should pass accessibility tests for Tooltip Types story", () => {
CypressMountWithProviders(<stories.Types />);

getDataElementByValue("main-text").eq(1).click();
Expand All @@ -259,7 +259,7 @@ context("Tests for Tooltip component", () => {
cy.checkAccessibility();
});

it("should pass accessibilty tests for Tooltip ColorOverrides story", () => {
it("should pass accessibility tests for Tooltip ColorOverrides story", () => {
CypressMountWithProviders(<stories.ColorOverrides />);

getDataElementByValue("main-text").click();
Expand Down
16 changes: 8 additions & 8 deletions cypress/components/vertical-menu/vertical-menu.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -487,53 +487,53 @@ context("Testing Vertical Menu component", () => {
});

describe("should check the accessibility tests", () => {
it("should check accessiblity for verticalMenuComponent", () => {
it("should check accessibility for verticalMenuComponent", () => {
CypressMountWithProviders(<Default />);

cy.checkAccessibility();
});

it("should check accessiblity for verticalMenuComponent open", () => {
it("should check accessibility for verticalMenuComponent open", () => {
CypressMountWithProviders(<Default />);

verticalMenuItem().tab().tab().click();
cy.checkAccessibility();
});

it("should check accessiblity for verticalMenuComponent Active", () => {
it("should check accessibility for verticalMenuComponent Active", () => {
CypressMountWithProviders(
<VerticalMenuItemCustom active={(isOpen) => !isOpen} />
);

cy.checkAccessibility();
});

it("should check accessiblity for verticalMenuComponent Adornment", () => {
it("should check accessibility for verticalMenuComponent Adornment", () => {
CypressMountWithProviders(<stories.Adornment />);

cy.checkAccessibility();
});

it("should check accessiblity for verticalMenuComponent CustomItemHeight", () => {
it("should check accessibility for verticalMenuComponent CustomItemHeight", () => {
CypressMountWithProviders(<stories.CustomItemHeight />);

cy.checkAccessibility();
});

it("should check accessiblity for verticalMenuComponent CustomItemPadding", () => {
it("should check accessibility for verticalMenuComponent CustomItemPadding", () => {
CypressMountWithProviders(<stories.CustomItemPadding />);

cy.checkAccessibility();
});

it("should check accessiblity for verticalMenuComponent FullScreen", () => {
it("should check accessibility for verticalMenuComponent FullScreen", () => {
cy.viewport(320, 599);
CypressMountWithProviders(<VerticalMenuFullScreenCustom />);

cy.checkAccessibility();
});

it("should check accessiblity for verticalMenuComponent FullScreen open", () => {
it("should check accessibility for verticalMenuComponent FullScreen open", () => {
cy.viewport(320, 599);
CypressMountWithProviders(<VerticalMenuFullScreenCustom isOpen />);

Expand Down
Loading

0 comments on commit 361d0c5

Please sign in to comment.