-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added files for a component integration test. The tests are failing r…
…ight now so we need to get those green. Added a functional test. Need to set up kbn-es to be able to set up a file repository before being able to run the functional tests.
- Loading branch information
John Dorlus
committed
Dec 21, 2019
1 parent
c6cac4a
commit 4d2b85f
Showing
7 changed files
with
86 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...plugins/snapshot_restore/__jest__/client_integration/helpers/repository_detail.helpers.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
import { EuiButton } from '@elastic/eui'; | ||
import { registerTestBed, TestBed } from '../../../../../../test_utils'; | ||
import { WithProviders } from './providers'; | ||
|
||
const initTestBed = registerTestBed<RepositoryDetailTestSubjects>(WithProviders(EuiButton), { | ||
doMountAsync: true, | ||
}); | ||
|
||
export interface RepositoryDetailTestBed extends TestBed<RepositoryDetailTestSubjects> { | ||
actions: { | ||
clickCleanupRepositoryButton: () => void; | ||
getResponseText: () => void; | ||
}; | ||
} | ||
|
||
export const setup = async (): Promise<RepositoryDetailTestBed> => { | ||
const testBed = await initTestBed(); | ||
|
||
// User actions | ||
const clickCleanupRepositoryButton = () => { | ||
testBed.find('cleanupRepositoryButton').simulate('click'); | ||
}; | ||
|
||
const getResponseText = () => { | ||
// | ||
}; | ||
return { | ||
...testBed, | ||
actions: { | ||
clickCleanupRepositoryButton, | ||
getResponseText, | ||
}, | ||
}; | ||
}; | ||
|
||
export type RepositoryDetailTestSubjects = TestSubjects; | ||
|
||
type TestSubjects = 'cleanupRepositoryButton' | `cleanupRepositoryResponseEditor`; |
8 changes: 8 additions & 0 deletions
8
x-pack/legacy/plugins/snapshot_restore/__jest__/client_integration/repository_detail.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
// TODO: Add Component Integration test for cleanup repository | ||
// TODO: Add component integration test for repository verification. | ||
// TODO: Add component integration test for repository detail. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters