Skip to content
This repository has been archived by the owner on Jun 29, 2023. It is now read-only.

fix(shell-center-row): Error when no action-bar is provided #1032

Merged
merged 8 commits into from
Jul 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ export class CalciteShellCenterRow {
</div>
) : null;

const children = [actionBarNode, contentNode];
if (actionBar.position === "end") {
const children: VNode[] = [actionBarNode, contentNode];

if (actionBar?.position === "end") {
children.reverse();
}

Expand Down
8 changes: 5 additions & 3 deletions src/tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ export interface SetUpPageOptions {
withPeerDependencies: boolean;
}

export async function setUpPage(content: string, options?: SetUpPageOptions): Promise<E2EPage> {
const page = await newE2EPage();
await page.setContent(content);
export async function setUpPage(html: string, options?: SetUpPageOptions): Promise<E2EPage> {
const page = await newE2EPage({
html,
failOnConsoleError: true
});

if (options?.withPeerDependencies) {
await page.addScriptTag({
Expand Down