Skip to content

Commit

Permalink
lint-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lakshmi2506 committed Feb 2, 2024
1 parent 6bf7707 commit b3a1018
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 43 deletions.
95 changes: 53 additions & 42 deletions docs/api/schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -980,6 +980,42 @@ paths:
schema:
$ref: '#/components/schemas/ScratchOrg'
description: ''
/api/scratch-orgs/{id}/listmetadata/:
post:
operationId: scratch_orgs_listmetadata_create
description: Manage Salesforce scratch orgs.
parameters:
- in: path
name: id
schema:
type: string
format: HashID
description: A unique integer value identifying this scratch org.
required: true
tags:
- scratch-orgs
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ListMetadataRequest'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/ListMetadataRequest'
multipart/form-data:
schema:
$ref: '#/components/schemas/ListMetadataRequest'
required: true
security:
- tokenAuth: []
- cookieAuth: []
responses:
'202':
content:
application/json:
schema:
$ref: '#/components/schemas/ScratchOrg'
description: ''
/api/scratch-orgs/{id}/log/:
get:
operationId: scratch_orgs_log_retrieve
Expand Down Expand Up @@ -1072,32 +1108,6 @@ paths:
schema:
$ref: '#/components/schemas/ScratchOrg'
description: ''

/api/scratch-orgs/{id}/listmetadata/:
post:
operationId: scratch_orgs_listmetadata
description: Queue a job that retrieves the components for a given non source trackable metadata type.
parameters:
- in: path
name: id
schema:
type: string
format: HashID
description: A unique integer value identifying this scratch org.
required: true
tags:
- scratch-orgs
security:
- tokenAuth: []
- cookieAuth: []
responses:
'202':
content:
application/json:
schema:
$ref: '#/components/schemas/ListMetadataRequest'
description: ''

/api/tasks/:
get:
operationId: tasks_list
Expand Down Expand Up @@ -1697,13 +1707,6 @@ components:
required:
- commit_message
- yaml_path
ListMetadataRequest:
type: object
properties:
desired_type: string
minLength: 1
required:
- desired_type
CommitRequest:
type: object
properties:
Expand Down Expand Up @@ -2114,6 +2117,14 @@ components:
state:
type: object
additionalProperties: {}
ListMetadataRequest:
type: object
properties:
desired_type:
type: string
minLength: 1
required:
- desired_type
MinimalUser:
type: object
properties:
Expand Down Expand Up @@ -2543,11 +2554,6 @@ components:
type: string
format: HashID
readOnly: true
non_source_changes:
type: object
additionalProperties: {}
readOnly: true
nullable: true
description:
type: string
description_rendered:
Expand Down Expand Up @@ -2594,10 +2600,6 @@ components:
has_unsaved_changes:
type: boolean
readOnly: true
has_non_source_changes:
type: boolean
readOnly: true
nullable: true
ignored_changes:
type: object
additionalProperties: {}
Expand Down Expand Up @@ -2660,6 +2662,13 @@ components:
is_omnistudio_installed:
type: boolean
readOnly: true
non_source_changes:
type: object
additionalProperties: {}
readOnly: true
has_non_source_changes:
type: boolean
readOnly: true
required:
- currently_parsing_datasets
- currently_reassigning_user
Expand All @@ -2673,6 +2682,7 @@ components:
- expires_at
- has_been_visited
- has_ignored_changes
- has_non_source_changes
- has_unsaved_changes
- id
- ignored_changes
Expand All @@ -2684,6 +2694,7 @@ components:
- latest_commit
- latest_commit_at
- latest_commit_url
- non_source_changes
- org_config_name
- org_type
- owner
Expand Down
2 changes: 1 addition & 1 deletion metecho/api/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ def queue_get_unsaved_changes(self, *, force_get=False, originating_user_id):

get_unsaved_changes_job.delay(self, originating_user_id=originating_user_id)

def queue_get_nonsource_components(self, *, originating_user_id, desired_type: str):
def queue_get_nonsource_components(self, *, originating_user_id, desired_type):
from .jobs import get_nonsource_components_job

self.currently_refreshing_changes = True
Expand Down
10 changes: 10 additions & 0 deletions metecho/api/tests/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,16 @@ def test_get_unsaved_changes(self, scratch_org_factory):

assert get_unsaved_changes_job.delay.called

def test_get_nonsource_components(self,scratch_org_factory):
with ExitStack() as stack:
get_non_source_components_job= stack.enter_context(
patch("metecho.api.jobs.get_nonsource_components_job")
)
scratch_org = scratch_org_factory()
scratch_org.queue_get_nonsource_components(originating_user_id=None,desired_type='')

assert get_non_source_components_job.delay.called

def test_get_unsaved_changes__bail_early(self, scratch_org_factory):
with ExitStack() as stack:
get_unsaved_changes_job = stack.enter_context(
Expand Down
2 changes: 2 additions & 0 deletions src/js/components/tour/play.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export const getDemoOrg = ({
has_been_visited: true,
valid_target_directories: {},
currently_parsing_datasets: false,
has_non_source_changes: false,
non_source_changes: {}
};
};

Expand Down
4 changes: 4 additions & 0 deletions src/stories/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,8 @@ export const sampleDevOrg = {
last_checked_unsaved_changes_at: null,
valid_target_directories: {},
currently_parsing_datasets: false,
has_non_source_changes: false,
non_source_changes: {},
};

export const sampleScratchOrg = {
Expand Down Expand Up @@ -852,6 +854,8 @@ export const sampleScratchOrg = {
last_checked_unsaved_changes_at: null,
valid_target_directories: {},
currently_parsing_datasets: false,
has_non_source_changes: false,
non_source_changes: {},
};

export const sampleIssue1 = {
Expand Down

0 comments on commit b3a1018

Please sign in to comment.