-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
44 changed files
with
78 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
packages/orbit-components/src/SkipLink/SkipLink.ct-story.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import * as React from "react"; | ||
|
||
import SkipLink from "."; | ||
|
||
export default function SkipLinkStory() { | ||
return ( | ||
<div className="p-md bg-cloud-light"> | ||
<div className="h-xxxl"> | ||
<SkipLink | ||
dataTest="SkipLink" | ||
links={[ | ||
{ | ||
href: "", | ||
name: "Go go go!", | ||
}, | ||
]} | ||
/> | ||
</div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as React from "react"; | ||
import { test, expect } from "@playwright/experimental-ct-react"; | ||
|
||
import SkipLinkStory from "./SkipLink.ct-story"; | ||
import RenderInRtl from "../utils/rtl/RenderInRtl"; | ||
|
||
test.describe("visual SkipLink", () => { | ||
const forceShow = () => { | ||
const link = document.querySelector("[data-test=SkipLink]>a"); | ||
link?.classList.remove("[&:not(:focus)]:sr-only"); | ||
}; | ||
|
||
test("default", async ({ mount }) => { | ||
const component = await mount(<SkipLinkStory />); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
|
||
test("focus", async ({ mount }) => { | ||
const component = await mount(<SkipLinkStory />); | ||
await component.evaluate(forceShow); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
|
||
test("rtl", async ({ mount }) => { | ||
const component = await mount( | ||
<RenderInRtl> | ||
<SkipLinkStory /> | ||
</RenderInRtl>, | ||
); | ||
await component.evaluate(forceShow); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
}); |
Binary file added
BIN
+608 Bytes
...SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Desktop-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+608 Bytes
.../SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+692 Bytes
...nk/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Large-Desktop-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+692 Bytes
...ink/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Large-Desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.16 KB
...ink/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Large-Mobile-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+423 Bytes
...Link/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Large-Mobile-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+952 Bytes
...nk/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Medium-Mobile-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+381 Bytes
...ink/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Medium-Mobile-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+798 Bytes
...ink/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Small-Mobile-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+350 Bytes
...Link/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Small-Mobile-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.44 KB
.../SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Tablet-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+474 Bytes
...c/SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-default-1-Tablet-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.93 KB
...c/SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Desktop-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.78 KB
...rc/SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.01 KB
...Link/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Large-Desktop-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.85 KB
...pLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Large-Desktop-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.08 KB
...pLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Large-Mobile-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.74 KB
...ipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Large-Mobile-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.78 KB
...Link/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Medium-Mobile-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.68 KB
...pLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Medium-Mobile-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.65 KB
...pLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Small-Mobile-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.64 KB
...ipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Small-Mobile-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.37 KB
...rc/SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Tablet-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.82 KB
...src/SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-focus-1-Tablet-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.6 KB
...src/SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Desktop-darwin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.77 KB
.../src/SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Desktop-linux.png
Oops, something went wrong.
Binary file added
BIN
+2.68 KB
...ipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Large-Desktop-darwin.png
Oops, something went wrong.
Binary file added
BIN
+2.85 KB
...kipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Large-Desktop-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.1 KB
...kipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Large-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+1.75 KB
...SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Large-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+2.85 KB
...ipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Medium-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+1.68 KB
...kipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Medium-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+2.66 KB
...kipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Small-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+1.64 KB
...SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Small-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+3.4 KB
.../src/SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Tablet-darwin.png
Oops, something went wrong.
Binary file added
BIN
+1.82 KB
...s/src/SkipLink/SkipLink.ct.tsx-snapshots/visual-SkipLink-rtl-1-Tablet-linux.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters