Skip to content

Commit

Permalink
Linked Tests with requirements (avatarEditor)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lizardguard committed Feb 25, 2025
1 parent b3056e9 commit aa70f7d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const avatarEditorMock = mock<AvatarEditorViewModel>();
const avatarEditorControllerMock = mock<IAvatarEditorController>();

describe("AvatarEditorHairCategory", () => {
// ANF-ID: [EZZ0041, EZZ0049, ELG0035, ELG0036]
test("should render", () => {
avatarEditorMock.uiVisiblity = {
accessoireMenu: {
Expand All @@ -42,6 +43,7 @@ describe("AvatarEditorHairCategory", () => {
expect(container).toMatchSnapshot();
});

// ANF-ID: [EZZ0041, EZZ0049, ELG0035, ELG0036]
test.each([
["headgear", true, false, false, false],
["glasses", false, true, false, false],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const avatarEditorMock = mock<AvatarEditorViewModel>();
const avatarEditorControllerMock = mock<IAvatarEditorController>();

describe("AvatarEditorBodyCategory", () => {
// ANF-ID: [EZZ0050]
test("should render", () => {
avatarEditorMock.skinColor = new Observable<AvatarColor>({
id: 33,
Expand All @@ -28,6 +29,7 @@ describe("AvatarEditorBodyCategory", () => {
expect(container).toMatchSnapshot();
});

// ANF-ID: [EZZ0050]
test("click on colorpicker-button opens color picker", () => {
const container = render(
<AvatarEditorBodyCategory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const avatarEditorMock = mock<AvatarEditorViewModel>();
const avatarEditorControllerMock = mock<IAvatarEditorController>();

describe("AvatarEditorClothingCategory", () => {
// ANF-ID: [EZZ0042, EZZ0043, EZZ0044, EZZ0045, EZZ0046, EZZ0047]
test("should render", () => {
avatarEditorMock.uiVisiblity = {
clothingMenu: {
Expand All @@ -27,9 +28,9 @@ describe("AvatarEditorClothingCategory", () => {
},
} as AvatarEditorUI;

avatarEditorMock.shirt = new Observable<AvatarShirtModels>("none");
avatarEditorMock.pants = new Observable<AvatarPantsModels>("none");
avatarEditorMock.shoes = new Observable<AvatarShoesModels>("none");
avatarEditorMock.shirt = new Observable<AvatarShirtModels>("none" as any);
avatarEditorMock.pants = new Observable<AvatarPantsModels>("none" as any);
avatarEditorMock.shoes = new Observable<AvatarShoesModels>("none" as any);
avatarEditorMock.shirtColor = new Observable<AvatarColor>({
id: 33,
nameKey: "Brown 2",
Expand All @@ -55,6 +56,7 @@ describe("AvatarEditorClothingCategory", () => {
expect(container).toMatchSnapshot();
});

// ANF-ID: [EZZ0042, EZZ0043, EZZ0044]
test.skip.each([
["shirt", true, false, false],
["pants", false, true, false],
Expand All @@ -70,9 +72,9 @@ describe("AvatarEditorClothingCategory", () => {
},
} as AvatarEditorUI;

avatarEditorMock.shirt = new Observable<AvatarShirtModels>("none");
avatarEditorMock.pants = new Observable<AvatarPantsModels>("none");
avatarEditorMock.shoes = new Observable<AvatarShoesModels>("none");
avatarEditorMock.shirt = new Observable<AvatarShirtModels>("none" as any);
avatarEditorMock.pants = new Observable<AvatarPantsModels>("none" as any);
avatarEditorMock.shoes = new Observable<AvatarShoesModels>("none" as any);
avatarEditorMock.shirtColor = new Observable<AvatarColor>({
id: 33,
nameKey: "Brown 2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const avatarEditorMock = mock<AvatarEditorViewModel>();
const avatarEditorControllerMock = mock<IAvatarEditorController>();

describe("AvatarEditorFaceCategory", () => {
// ANF-ID: [EZZ0037, EZZ0038, EZZ0039, EZZ0040]
test("should render", () => {
avatarEditorMock.uiVisiblity = {
faceMenu: {
Expand All @@ -36,6 +37,7 @@ describe("AvatarEditorFaceCategory", () => {
expect(container).toMatchSnapshot();
});

// ANF-ID: [EZZ0037, EZZ0038, EZZ0039, EZZ0040]
test.each([
["eyebrows", true, false, false, false, "Brows_1"],
["eyes", false, true, false, false, "Neural_Eyes_1"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const avatarEditorMock = mock<AvatarEditorViewModel>();
const avatarEditorControllerMock = mock<IAvatarEditorController>();

describe("AvatarEditorHairCategory", () => {
// ANF-ID: [EZZ0035, EZZ0036]
test("should render", () => {
avatarEditorMock.uiVisiblity = {
hairMenu: {
Expand All @@ -42,6 +43,7 @@ describe("AvatarEditorHairCategory", () => {
expect(container).toMatchSnapshot();
});

// ANF-ID: [EZZ0035, EZZ0036]
test.each([
["hair", true, false],
["beard", false, true],
Expand Down Expand Up @@ -79,6 +81,7 @@ describe("AvatarEditorHairCategory", () => {
},
);

// ANF-ID: [EZZ0048]
test("click on colorpicker-button opens color picker", () => {
avatarEditorMock.uiVisiblity = {
hairMenu: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ describe("AvatarEditorPreview", () => {
CoreDIContainer.restore();
});

// ANF-ID: [EZZ0055]
test("should render", () => {
useBuilderMock([undefined, controllerMock]);

Expand Down

0 comments on commit aa70f7d

Please sign in to comment.