Skip to content

Commit

Permalink
fix: addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhMani-okta committed Aug 14, 2024
1 parent bfc362e commit 5b8acf7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
16 changes: 1 addition & 15 deletions packages/odyssey-react-mui/src/Callout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,7 @@ export const CalloutTestSelectors = {
},
},
},
//labels ? something that is a child of the selector rather than a separate feature
// text: {
// selector: {
// method: "ByText",
// templateVariableNames: ["text"],
// text: "${text}",
// },
// },
// title: {
// selector: {
// method: "ByText",
// templateVariableNames: ["title"],
// text: "${title}",
// },
// },
// label: ["description", "title"],
selector: {
method: "ByRole",
options: {
Expand Down
1 change: 1 addition & 0 deletions packages/odyssey-react-mui/src/TextField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { type FeatureTestSelector } from "./test-selectors";

export const TextFieldTestSelectors = {
feature: {
// label: ["errorMessage", "hint", "label"],
description: {
selector: {
method: "ByText",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ export const Error: StoryObj<typeof TextField> = {
defaultValue: "",
},
play: async ({ canvasElement, step }) => {
await step("has visible label", async () => {
await step("has visible error message", async () => {
const element = queryOdysseySelector({
canvas: within(canvasElement),
componentName: "TextField",
Expand All @@ -269,7 +269,7 @@ export const ErrorsList: StoryObj<typeof TextField> = {
defaultValue: "",
},
play: async ({ canvasElement, step }) => {
await step("has visible label", async () => {
await step("has visible error messages", async () => {
const element = queryOdysseySelector({
canvas: within(canvasElement),
componentName: "TextField",
Expand Down Expand Up @@ -307,7 +307,7 @@ export const Hint: StoryObj<typeof TextField> = {
}).element;

expect(element).toHaveAccessibleDescription(
/Specify your destination within the Sol system./,
"Specify your destination within the Sol system.",
);
});
},
Expand Down

0 comments on commit 5b8acf7

Please sign in to comment.