Skip to content

Commit

Permalink
Fix existing tests
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Ho <dxho@amazon.com>
  • Loading branch information
derek-ho committed Aug 8, 2024
1 parent 2174a3b commit 6bf5b8e
Show file tree
Hide file tree
Showing 8 changed files with 785 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,26 +245,46 @@ exports[`Audit logs render when AuditLoggingSettings.enabled is true 1`] = `
coreStart={
Object {
"http": 1,
"uiSettings": Object {
"get": [MockFunction],
},
}
}
dataSourcePickerReadOnly={false}
navigation={Object {}}
depsStart={
Object {
"navigation": Object {},
}
}
selectedDataSource={
Object {
"id": "test",
}
}
setDataSource={[MockFunction]}
/>
<EuiPageHeader>
<EuiTitle
size="l"
>
<h3>
Audit logging
</h3>
</EuiTitle>
</EuiPageHeader>
<PageHeader
coreStart={
Object {
"http": 1,
"uiSettings": Object {
"get": [MockFunction],
},
}
}
fallBackComponent={
<EuiPageHeader>
<EuiTitle
size="l"
>
<h3>
Audit logging
</h3>
</EuiTitle>
</EuiPageHeader>
}
navigation={Object {}}
/>
<EuiSpacer />
<EuiPanel>
<EuiForm>
Expand Down Expand Up @@ -655,26 +675,46 @@ exports[`Audit logs should load access error component 1`] = `
coreStart={
Object {
"http": 1,
"uiSettings": Object {
"get": [MockFunction],
},
}
}
dataSourcePickerReadOnly={false}
navigation={Object {}}
depsStart={
Object {
"navigation": Object {},
}
}
selectedDataSource={
Object {
"id": "test",
}
}
setDataSource={[MockFunction]}
/>
<EuiPageHeader>
<EuiTitle
size="l"
>
<h3>
Audit logging
</h3>
</EuiTitle>
</EuiPageHeader>
<PageHeader
coreStart={
Object {
"http": 1,
"uiSettings": Object {
"get": [MockFunction],
},
}
}
fallBackComponent={
<EuiPageHeader>
<EuiTitle
size="l"
>
<h3>
Audit logging
</h3>
</EuiTitle>
</EuiPageHeader>
}
navigation={Object {}}
/>
<EuiSpacer />
<AccessErrorComponent
loading={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,35 @@ exports[`Auth view should load access error component 1`] = `
}
}
dataSourcePickerReadOnly={false}
navigation={Object {}}
depsStart={
Object {
"navigation": Object {},
}
}
selectedDataSource={
Object {
"id": "test",
}
}
setDataSource={[MockFunction]}
/>
<EuiTitle
size="l"
>
<h1>
Authentication and authorization
</h1>
</EuiTitle>
<PageHeader
coreStart={
Object {
"http": 1,
}
}
fallBackComponent={
<EuiTitle
size="l"
>
<h1>
Authentication and authorization
</h1>
</EuiTitle>
}
navigation={Object {}}
/>
<AccessErrorComponent
loading={false}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,49 @@ exports[`Permission list page AccessError component should load access error co
coreStart={
Object {
"http": 1,
"uiSettings": Object {
"get": [MockFunction] {
"calls": Array [
Array [
"home:useNewHomePage",
],
Array [
"home:useNewHomePage",
],
Array [
"home:useNewHomePage",
],
Array [
"home:useNewHomePage",
],
Array [
"home:useNewHomePage",
],
],
"results": Array [
Object {
"type": "return",
"value": false,
},
Object {
"type": "return",
"value": false,
},
Object {
"type": "return",
"value": false,
},
Object {
"type": "return",
"value": false,
},
Object {
"type": "return",
"value": false,
},
],
},
},
}
}
dataSourcePickerReadOnly={false}
Expand All @@ -19,15 +62,110 @@ exports[`Permission list page AccessError component should load access error co
}
setDataSource={[MockFunction]}
/>
<EuiPageHeader>
<EuiTitle
size="l"
>
<h1>
Permissions
</h1>
</EuiTitle>
</EuiPageHeader>
<PageHeader
controlControls={
Array [
Object {
"isLoading": false,
"renderComponent": <EuiFlexItem>
<EuiSmallButtonEmpty
onClick={[Function]}
>
Create from blank
</EuiSmallButtonEmpty>
<EuiSmallButtonEmpty
disabled={false}
id="create-from-selection"
onClick={[Function]}
>
Create from selection
</EuiSmallButtonEmpty>
</EuiFlexItem>,
},
]
}
coreStart={
Object {
"http": 1,
"uiSettings": Object {
"get": [MockFunction] {
"calls": Array [
Array [
"home:useNewHomePage",
],
Array [
"home:useNewHomePage",
],
Array [
"home:useNewHomePage",
],
Array [
"home:useNewHomePage",
],
Array [
"home:useNewHomePage",
],
],
"results": Array [
Object {
"type": "return",
"value": false,
},
Object {
"type": "return",
"value": false,
},
Object {
"type": "return",
"value": false,
},
Object {
"type": "return",
"value": false,
},
Object {
"type": "return",
"value": false,
},
],
},
},
}
}
descriptionControls={
Array [
Object {
"isLoading": false,
"renderComponent": <EuiText
color="subdued"
size="xs"
>
Permissions are individual actions, such as cluster:admin/snapshot/restore, which lets you restore snapshots. Action groups
<br />
are reusable collections of permissions, such as MANAGE_SNAPSHOTS, which lets you view, take, delete, and restore
<br />
snapshots. You can often meet your security needs using the default action groups, but you might find it convenient to create
<br />
your own.
<ExternalLink
href="https://opensearch.org/docs/latest/security-plugin/access-control/default-action-groups/"
/>
</EuiText>,
},
]
}
fallBackComponent={
<EuiPageHeader>
<EuiTitle
size="l"
>
<h1>
Permissions
</h1>
</EuiTitle>
</EuiPageHeader>
}
/>
<AccessErrorComponent
loading={false}
/>
Expand Down
Loading

0 comments on commit 6bf5b8e

Please sign in to comment.