Skip to content

Commit

Permalink
rename to specs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mazuh committed Jan 23, 2024
1 parent 373ac31 commit 4f96d34
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/entities/management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ export interface Project {
uuid: string;
name: string;
sections: ProjectSection[];
requests: ProjectRequest[];
specs: ProjectRequestSpec[];
}

export interface ProjectSection {
uuid: string;
name: string;
}

export interface ProjectRequest {
export interface ProjectRequestSpec {
uuid: string;
url: string;
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
headers: ProjectRequestHeader[];
headers: ProjectRequestSpecHeader[];
body: string;
}

export interface ProjectRequestHeader {
export interface ProjectRequestSpecHeader {
key: string;
value: string;
isEnabled: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { act, fireEvent, render, screen } from "@testing-library/react";
import { ProjectsManagementPage } from "./ProjectsManagementPage";
import * as OPFSProjectsListingService from "./opfs-projects-listing-service";

describe("ProjectsManagementPage", () => {
describe("Projects listing management page", () => {
beforeEach(() => {
jest.clearAllMocks();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {

/**
* Based on stored filenames in the projects private directory,
* generates a list of entries.
* generates a list of specs.
*
* Each entry, because of such shallow approach, is more like a "pointer",
* the full data regarding the project is inside the file and must be handled
Expand Down Expand Up @@ -63,7 +63,7 @@ export async function persistNewProjectListingItem(
uuid: item.uuid,
name: item.name,
sections: [],
requests: [],
specs: [],
});

return item;
Expand Down Expand Up @@ -120,7 +120,7 @@ export async function updateProjectListingItem(
...item,
// TODO: this is erasing previous sections and requests.
sections: [],
requests: [],
specs: [],
});

await removeProjectListingItem(found);
Expand Down

0 comments on commit 4f96d34

Please sign in to comment.