Skip to content
Closed
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
11 changes: 4 additions & 7 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
* @contentstack/marketplace-pr-reviewers
.github/workflows/sca-scan.yml @contentstack/security-admin

* @contentstack/developer-ecosystem-pr-reviewers
.github/workflows/ @contentstack/security-admin
**/.snyk @contentstack/security-admin

.github/workflows/policy-scan.yml @contentstack/security-admin

.github/workflows/issues-jira.yml @contentstack/security-admin
**/CODEOWNERS @contentstack/security-admin
**/.gitguardian.yaml @contentstack/security-admin
31 changes: 0 additions & 31 deletions .github/workflows/issues-jira.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/sca-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
jobs:
security-sca:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
Expand Down
24 changes: 21 additions & 3 deletions __test__/uiLocation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { AxiosRequestConfig, AxiosResponse } from "axios";

import postRobot from "post-robot";

import UiLocation from "../src/uiLocation";
import {
IAppConfigInitData,
IAssetSidebarInitData,
Expand All @@ -14,8 +13,9 @@ import {
LocationType,
Region,
} from "../src/types";
import { RequestOption } from "../src/types/common.types";
import { RequestConfig } from "../src/types/api.type";
import { RequestOption } from "../src/types/common.types";
import UiLocation from "../src/uiLocation";

jest.mock("post-robot");
jest.mock("wolfy87-eventemitter");
Expand Down Expand Up @@ -310,7 +310,13 @@ describe("UI Location", () => {
const config = await uiLocation.getConfig();
expect(config).toEqual({});
expect(postRobotSendToParentMock).toHaveBeenLastCalledWith(
"getConfig", {"context": {"extensionUID": "extension_uid", "installationUID": "installation_uid"}}
"getConfig",
{
context: {
extensionUID: "extension_uid",
installationUID: "installation_uid",
},
}
);
});
});
Expand Down Expand Up @@ -458,6 +464,9 @@ describe("UI Location", () => {
const uiLocation = new UiLocation({
...initData,
type: "FIELD_MODIFIER_LOCATION",
schema: {
$uid: "",
},
} as IFieldModifierLocationInitData);
expect(uiLocation.location.FieldModifierLocation).toBeDefined();
expect(uiLocation.location.FieldModifierLocation).toHaveProperty(
Expand All @@ -478,6 +487,9 @@ describe("UI Location", () => {
const uiLocation = new UiLocation({
...initData,
type: "FULL_PAGE_LOCATION",
schema: {
$uid: "",
},
} as IFullPageLocationInitData);
expect(uiLocation.location.FullPage).toBeDefined();
expect(uiLocation.location.FullPage).toHaveProperty("stack");
Expand All @@ -487,6 +499,9 @@ describe("UI Location", () => {
const uiLocation = new UiLocation({
...initData,
type: "FIELD",
schema: {
$uid: "",
},
} as IFieldInitData);
expect(uiLocation.location.CustomField).toBeDefined();
expect(uiLocation.location.CustomField).toHaveProperty("field");
Expand All @@ -502,6 +517,9 @@ describe("UI Location", () => {
const uiLocation = new UiLocation({
...initData,
type: "",
schema: {
$uid: "",
},
} as any);
expect(uiLocation.location.CustomField).toBeDefined();
expect(uiLocation.location.CustomField).toHaveProperty("field");
Expand Down
Loading
Loading