Skip to content

Commit

Permalink
add link on home if new
Browse files Browse the repository at this point in the history
  • Loading branch information
qdraw committed Feb 29, 2024
1 parent 7376964 commit 43caf2c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const WarningBoxNoPhotosFilter: React.FunctionComponent<IWarningBoxNoPhot

const MessageNoPhotosInFolder = language.key(localization.MessageNoPhotosInFolder);
const MessageItemsOutsideFilter = language.key(localization.MessageItemsOutsideFilter);

const MessageReadMoreHere = language.key(localization.MessageReadMoreHere);
const MessageNewUserNoPhotosInFolder = language.key(
localization.MessageNewUserNoPhotosInFolder
);
Expand Down Expand Up @@ -54,7 +54,11 @@ export const WarningBoxNoPhotosFilter: React.FunctionComponent<IWarningBoxNoPhot
href={new UrlQuery().UrlPreferencesPage()}
data-test="list-view-no-photos-in-folder"
>
{MessageNewUserNoPhotosInFolder} {MessageNoPhotosInFolder}
{MessageNewUserNoPhotosInFolder}{" "}
<a target="_blank" href={new UrlQuery().DocsGettingStartedFirstSteps()} rel="noreferrer">
{MessageReadMoreHere}.
</a>{" "}
{MessageNoPhotosInFolder}
</a>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { IFileIndexItem, newIFileIndexItemArray } from "../../../interfaces/IFil
import { Router } from "../../../router-app/router-app";
import * as FlatListItem from "../../atoms/flat-list-item/flat-list-item";
import * as ListImageChildItem from "../../atoms/list-image-child-item/list-image-child-item";
import ItemListView from "./item-list-view";
import * as ShiftSelectionHelper from "./internal/shift-selection-helper";
import ItemListView from "./item-list-view";

describe("ItemListView", () => {
it("renders (without state component)", () => {
Expand Down Expand Up @@ -69,9 +69,10 @@ describe("ItemListView", () => {
const component = render(
<ItemListView iconList={true} fileIndexItems={[]} subPath="/" colorClassUsage={[]} />
);
expect(component.container.textContent).toBe(
"New? Set your drive location in the settings. There are no photos in this folder"
expect(component.container.textContent).toContain(
"New? Set your drive location in the settings."
);
expect(component.container.textContent).toContain("There are no photos in this folder");
});

it("text should be: There are no photos in this folder", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ export const Default = () => {

Default.storyName = "default";

export const HomeNoContent = () => {
Router.navigate("/");
return <ItemListView subPath="/" iconList={true} fileIndexItems={[]} colorClassUsage={[]} />;
};

HomeNoContent.storyName = "home no content";

export const _8ItemsSelectionDisabled = () => {
Router.navigate("/");
return (
Expand Down

0 comments on commit 43caf2c

Please sign in to comment.