Skip to content
Merged
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
14 changes: 7 additions & 7 deletions x-pack/test_serverless/api_integration/services/svl_cases/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import { CasesFindResponse } from '@kbn/cases-plugin/common/types/api';
import { kbnTestConfig, kibanaTestSuperuserServerless } from '@kbn/test';
import { FtrProviderContext } from '../../ftr_provider_context';

export interface User {
username: string;
password: string;
description?: string;
roles: string[];
}
Comment on lines +17 to +22
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see that User is used outside of this file?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still verifying these, but I these kinds of "export" additions were a kind of typescript errors that were something like an inferred type was private - these additions fixed those errors, but now that I'm re-verifying, both User and CommonSavedObjectAttributes works without export, so I'm puzzled 😕

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDE TypeScript errors work in mysterious ways 🤷

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it wasn't an IDE, it was through the typecheck command. But it no longer seems to be present, so we can undo these, or keep them


export function SvlCasesApiServiceProvider({ getService }: FtrProviderContext) {
const kbnServer = getService('kibanaServer');
const supertest = getService('supertest');

interface User {
username: string;
password: string;
description?: string;
roles: string[];
}

const superUser: User = {
username: 'superuser',
password: 'superuser',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ import { Case, Attachment } from '@kbn/cases-plugin/common/types/domain';
import { omit } from 'lodash';
import { FtrProviderContext } from '../../ftr_provider_context';

export function SvlCasesOmitServiceProvider({}: FtrProviderContext) {
interface CommonSavedObjectAttributes {
id?: string | null;
created_at?: string | null;
updated_at?: string | null;
version?: string | null;
[key: string]: unknown;
}
export interface CommonSavedObjectAttributes {
id?: string | null;
created_at?: string | null;
updated_at?: string | null;
version?: string | null;
[key: string]: unknown;
}
Comment on lines +12 to +18
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't see that CommonSavedObjectAttributes is used outside of this file?


export function SvlCasesOmitServiceProvider({}: FtrProviderContext) {
const savedObjectCommonAttributes = ['created_at', 'updated_at', 'version', 'id'];

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ Cypress.Commands.add('loginAsElasticUser', () => {
method: 'POST',
url: `${kibanaUrlWithoutAuth}/internal/security/login`,
body: {
providerType: basicProvider.type,
providerName: basicProvider.name,
providerType: basicProvider?.type,
providerName: basicProvider?.name,
currentURL: `${kibanaUrlWithoutAuth}/login`,
params: { username, password },
},
Expand Down