Fix some type issues in x-pack/test_serverless (#167346)

## Summary

We're breaking #166813 up into smaller PRs in the interest of getting
PRs through sooner for type fixes. These are the changes for
`x-pack/test_serverless`.

## Reviewers
There are no code owners for these files, so I'm using the recently
edited suggestions

---------

Co-authored-by: Alex Szabo <delanni.alex@gmail.com>
Co-authored-by: Thomas Watson <w@tson.dk>
Co-authored-by: Alex Szabo <alex.szabo@elastic.co>
Co-authored-by: Thomas Watson <watson@elastic.co>
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Brad White 2023-09-27 07:22:34 -06:00 committed by GitHub
parent c666e4d29e
commit 563292f0e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 17 deletions

View file

@ -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[];
}
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',

View file

@ -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;
}
export function SvlCasesOmitServiceProvider({}: FtrProviderContext) {
const savedObjectCommonAttributes = ['created_at', 'updated_at', 'version', 'id'];
return {

View file

@ -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 },
},