-
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.
Merge branch 'master' into rcsl/add-flight-change-illus
- Loading branch information
Showing
85 changed files
with
205 additions
and
121 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
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
103 changes: 103 additions & 0 deletions
103
packages/orbit-components/src/Layout/Layout.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,103 @@ | ||
import * as React from "react"; | ||
|
||
import Wizard, { WizardStep } from "../Wizard"; | ||
import Card, { CardSection } from "../Card"; | ||
|
||
import Layout, { LayoutColumn } from "."; | ||
|
||
const Fill = ({ children }) => <div style={{ backgroundColor: "honeydew" }}>{children}</div>; | ||
|
||
export function LayoutStorySearch() { | ||
return ( | ||
<Layout type="Search"> | ||
<LayoutColumn> | ||
<Fill>Filters</Fill> | ||
</LayoutColumn> | ||
<LayoutColumn> | ||
<Fill>Results</Fill> | ||
</LayoutColumn> | ||
<LayoutColumn> | ||
<Fill>Sidebar</Fill> | ||
</LayoutColumn> | ||
</Layout> | ||
); | ||
} | ||
|
||
export function LayoutStoryBooking() { | ||
return ( | ||
<Layout type="Booking"> | ||
<LayoutColumn> | ||
<Fill>Wizard</Fill> | ||
</LayoutColumn> | ||
<LayoutColumn> | ||
<Fill>Form</Fill> | ||
</LayoutColumn> | ||
<LayoutColumn> | ||
<Fill>Summary</Fill> | ||
</LayoutColumn> | ||
</Layout> | ||
); | ||
} | ||
|
||
export function LayoutStoryMMB() { | ||
return ( | ||
<Layout type="MMB"> | ||
<LayoutColumn> | ||
<Fill>Main</Fill> | ||
</LayoutColumn> | ||
</Layout> | ||
); | ||
} | ||
|
||
export function LayoutStoryWizard() { | ||
return ( | ||
<Layout type="Booking"> | ||
<LayoutColumn> | ||
<Fill> | ||
{/* eslint-disable-next-line orbit-components/unique-id */} | ||
<Wizard activeStep={3} completedSteps={3} id="wizard"> | ||
<WizardStep title="Search" /> | ||
<WizardStep title="Passenger details" /> | ||
<WizardStep title="Ticket fare" /> | ||
<WizardStep title="Customize your trip" /> | ||
<WizardStep title="Overview & Payment" /> | ||
</Wizard> | ||
</Fill> | ||
</LayoutColumn> | ||
<LayoutColumn> | ||
<Fill>Form</Fill> | ||
</LayoutColumn> | ||
<LayoutColumn> | ||
<Fill>Summary</Fill> | ||
</LayoutColumn> | ||
</Layout> | ||
); | ||
} | ||
|
||
export function LayoutStoryCard() { | ||
return ( | ||
<Layout type="Booking"> | ||
<LayoutColumn> | ||
<Card> | ||
<CardSection> | ||
<Fill>Wizard</Fill> | ||
</CardSection> | ||
</Card> | ||
</LayoutColumn> | ||
<LayoutColumn> | ||
<Card> | ||
<CardSection> | ||
<Fill>Form</Fill> | ||
</CardSection> | ||
</Card> | ||
</LayoutColumn> | ||
<LayoutColumn> | ||
<Card> | ||
<CardSection> | ||
<Fill>Summary</Fill> | ||
</CardSection> | ||
</Card> | ||
</LayoutColumn> | ||
</Layout> | ||
); | ||
} |
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,53 @@ | ||
import * as React from "react"; | ||
import { test, expect } from "@playwright/experimental-ct-react"; | ||
|
||
import { | ||
LayoutStorySearch, | ||
LayoutStoryBooking, | ||
LayoutStoryMMB, | ||
LayoutStoryWizard, | ||
LayoutStoryCard, | ||
} from "./Layout.ct-story"; | ||
import RenderInRtl from "../utils/rtl/RenderInRtl"; | ||
|
||
test.describe("visual Layout", () => { | ||
test("search", async ({ mount }) => { | ||
const component = await mount(<LayoutStorySearch />); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
|
||
test("booking", async ({ mount }) => { | ||
const component = await mount(<LayoutStoryBooking />); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
|
||
test("mmb", async ({ mount }) => { | ||
const component = await mount(<LayoutStoryMMB />); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
|
||
test("rtl", async ({ mount }) => { | ||
const component = await mount( | ||
<RenderInRtl> | ||
<LayoutStoryBooking /> | ||
</RenderInRtl>, | ||
); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
|
||
test("wizard", async ({ mount }) => { | ||
const component = await mount(<LayoutStoryWizard />); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
|
||
test("card", async ({ mount }) => { | ||
const component = await mount(<LayoutStoryCard />); | ||
|
||
await expect(component).toHaveScreenshot(); | ||
}); | ||
}); |
Binary file added
BIN
+4.27 KB
...s/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+4.15 KB
...ts/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+4.66 KB
...Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+4.29 KB
.../Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+5.16 KB
.../Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+3.46 KB
...c/Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+4.81 KB
...Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+3.35 KB
.../Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+4.58 KB
.../Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+3.28 KB
...c/Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+4.64 KB
...ts/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+3.16 KB
...nts/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-booking-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
+5.4 KB
...ents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+4.96 KB
...nents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+5.75 KB
...rc/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+5.06 KB
...src/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+7.67 KB
...src/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+4.42 KB
.../src/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+5.78 KB
...rc/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+3.61 KB
...src/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+5.41 KB
...src/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+3.52 KB
.../src/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+6.68 KB
...nents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+3.89 KB
...onents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-card-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
+1.4 KB
...nents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-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
+1.38 KB
...onents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Desktop-linux.png
Oops, something went wrong.
Binary file added
BIN
+1.4 KB
...src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Large-Desktop-darwin.png
Oops, something went wrong.
Binary file added
BIN
+1.38 KB
.../src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Large-Desktop-linux.png
Oops, something went wrong.
Binary file added
BIN
+1.35 KB
.../src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Large-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+923 Bytes
...s/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Large-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+1.24 KB
...src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Medium-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+891 Bytes
.../src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Medium-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+1.21 KB
.../src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Small-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+883 Bytes
...s/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Small-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+1.44 KB
...onents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Tablet-darwin.png
Oops, something went wrong.
Binary file added
BIN
+956 Bytes
...ponents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-mmb-1-Tablet-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.45 KB
...nents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Desktop-darwin.png
Oops, something went wrong.
Binary file added
BIN
+4.31 KB
...onents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Desktop-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.49 KB
...src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Large-Desktop-darwin.png
Oops, something went wrong.
Binary file added
BIN
+4.28 KB
.../src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Large-Desktop-linux.png
Oops, something went wrong.
Binary file added
BIN
+5.24 KB
.../src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Large-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+3.4 KB
...s/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Large-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.85 KB
...src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Medium-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+3.29 KB
.../src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Medium-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.61 KB
.../src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Small-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+3.21 KB
...s/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Small-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.7 KB
...onents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Tablet-darwin.png
Oops, something went wrong.
Binary file added
BIN
+3.12 KB
...ponents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-rtl-1-Tablet-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.71 KB
...ts/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Desktop-darwin.png
Oops, something went wrong.
Binary file added
BIN
+4.2 KB
...nts/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Desktop-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.46 KB
.../Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Large-Desktop-darwin.png
Oops, something went wrong.
Binary file added
BIN
+4.02 KB
...c/Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Large-Desktop-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.87 KB
...c/Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Large-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+3.52 KB
...rc/Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Large-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.58 KB
.../Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Medium-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+2.85 KB
...c/Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Medium-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.24 KB
...c/Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Small-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+2.8 KB
...rc/Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Small-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+4.66 KB
...nts/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Tablet-darwin.png
Oops, something went wrong.
Binary file added
BIN
+2.97 KB
...ents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-search-1-Tablet-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.8 KB
...ts/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Desktop-darwin.png
Oops, something went wrong.
Binary file added
BIN
+12.1 KB
...nts/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Desktop-linux.png
Oops, something went wrong.
Binary file added
BIN
+13.9 KB
.../Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Large-Desktop-darwin.png
Oops, something went wrong.
Binary file added
BIN
+12.6 KB
...c/Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Large-Desktop-linux.png
Oops, something went wrong.
Binary file added
BIN
+14.2 KB
...c/Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Large-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+10 KB
...rc/Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Large-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.78 KB
.../Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Medium-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+4.76 KB
...c/Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Medium-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+6.48 KB
...c/Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Small-Mobile-darwin.png
Oops, something went wrong.
Binary file added
BIN
+4.67 KB
...rc/Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Small-Mobile-linux.png
Oops, something went wrong.
Binary file added
BIN
+12.7 KB
...nts/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-1-Tablet-darwin.png
Oops, something went wrong.
Binary file added
BIN
+9.36 KB
...ents/src/Layout/Layout.ct.tsx-snapshots/visual-Layout-wizard-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
Oops, something went wrong.