mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Cases] Add migration test for the cases table (#168326)
This commit is contained in:
parent
b5bf4a186c
commit
f947274f58
2 changed files with 74 additions and 2 deletions
|
@ -333,6 +333,7 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
|
||||
describe('Lens visualization as persistable attachment', () => {
|
||||
const myDashboardName = `My-dashboard-${uuidv4()}`;
|
||||
|
||||
before(async () => {
|
||||
await esArchiver.loadIfNeeded('x-pack/test/functional/es_archives/logstash_functional');
|
||||
await kibanaServer.importExport.load(
|
||||
|
@ -362,6 +363,8 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
await kibanaServer.importExport.unload(
|
||||
'x-pack/test/functional/fixtures/kbn_archiver/lens/lens_basic.json'
|
||||
);
|
||||
|
||||
await cases.api.deleteAllCases();
|
||||
});
|
||||
|
||||
it('adds lens visualization to a new case from dashboard', async () => {
|
||||
|
|
|
@ -62,8 +62,6 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
},
|
||||
secrets: { email: 'elastic@elastic.co', apiToken: '123' },
|
||||
});
|
||||
|
||||
await cases.navigation.navigateToSingleCase('cases', CASE_ID);
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
|
@ -75,6 +73,10 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
});
|
||||
|
||||
describe('Case view page', function () {
|
||||
before(async () => {
|
||||
await cases.navigation.navigateToSingleCase('cases', CASE_ID);
|
||||
});
|
||||
|
||||
it('does not show any error toasters', async () => {
|
||||
expect(await toasts.getToastCount()).to.be(0);
|
||||
});
|
||||
|
@ -285,5 +287,72 @@ export default ({ getPageObject, getService }: FtrProviderContext) => {
|
|||
await testSubjects.exists('case-view-assignees');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Cases table', function () {
|
||||
before(async () => {
|
||||
await cases.navigation.navigateToApp();
|
||||
});
|
||||
|
||||
it('does not show any error toasters', async () => {
|
||||
expect(await toasts.getToastCount()).to.be(0);
|
||||
});
|
||||
|
||||
it('shows the title correctly', async () => {
|
||||
const title = await testSubjects.find('case-details-link');
|
||||
expect(await title.getVisibleText()).equal('Upgrade test in Kibana');
|
||||
});
|
||||
|
||||
it('shows the tags correctly', async () => {
|
||||
const tags = ['upgrade', 'test', 'kibana'];
|
||||
|
||||
for (const tag of tags) {
|
||||
const tagElement = await testSubjects.find(`case-table-column-tags-${tag}`);
|
||||
expect(await tagElement.getVisibleText()).equal(tag);
|
||||
}
|
||||
});
|
||||
|
||||
it('shows the status correctly', async () => {
|
||||
const status = await testSubjects.find('case-status-badge-open');
|
||||
expect(await status.getVisibleText()).equal('Open');
|
||||
});
|
||||
|
||||
it('shows the severity correctly', async () => {
|
||||
const severity = await testSubjects.find('case-table-column-severity-low');
|
||||
expect(await severity.getVisibleText()).equal('Low');
|
||||
});
|
||||
|
||||
it('shows the count of comments correctly', async () => {
|
||||
const comments = await testSubjects.find('case-table-column-commentCount');
|
||||
expect(await comments.getVisibleText()).equal('4');
|
||||
});
|
||||
|
||||
it('shows the creation date correctly', async () => {
|
||||
const comments = await testSubjects.find('case-table-column-createdAt');
|
||||
expect(await comments.getVisibleText()).equal('Jul 22, 2022 @ 13:40:43');
|
||||
});
|
||||
|
||||
it('shows the update date correctly', async () => {
|
||||
const comments = await testSubjects.find('case-table-column-updatedAt');
|
||||
expect(await comments.getVisibleText()).equal('Jul 22, 2022 @ 13:46:32');
|
||||
});
|
||||
|
||||
it('shows the external service column correctly', async () => {
|
||||
const link = await testSubjects.find('case-table-column-external');
|
||||
const upToDate = await testSubjects.find('case-table-column-external-upToDate');
|
||||
|
||||
expect(await link.getVisibleText()).equal('ROC-526\n(opens in a new tab or window)');
|
||||
expect(await upToDate.getVisibleText()).equal('is up to date');
|
||||
});
|
||||
|
||||
it('shows the counts correctly', async () => {
|
||||
const openCases = await testSubjects.find('openStatsHeader');
|
||||
const inProgressCases = await testSubjects.find('inProgressStatsHeader');
|
||||
const closedCases = await testSubjects.find('closedStatsHeader');
|
||||
|
||||
expect(await openCases.getVisibleText()).equal('Open cases\n1');
|
||||
expect(await inProgressCases.getVisibleText()).equal('In progress cases\n0');
|
||||
expect(await closedCases.getVisibleText()).equal('Closed cases\n0');
|
||||
});
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue