From da2dee8248568ebd8fb85b3518df7b589f33ecf1 Mon Sep 17 00:00:00 2001 From: Maja Grubic Date: Wed, 2 Mar 2022 16:19:40 +0100 Subject: [PATCH] Remove unnecessary visual regression files --- test/scripts/jenkins_visual_regression.sh | 29 ----------- .../jenkins_xpack_visual_regression.sh | 31 ----------- .../ftr_provider_context.d.ts | 25 --------- x-pack/test/visual_regression/config.js | 28 ---------- .../visual_regression/tests/login_page.js | 51 ------------------- 5 files changed, 164 deletions(-) delete mode 100755 test/scripts/jenkins_visual_regression.sh delete mode 100755 test/scripts/jenkins_xpack_visual_regression.sh delete mode 100644 test/visual_regression/ftr_provider_context.d.ts delete mode 100644 x-pack/test/visual_regression/config.js delete mode 100644 x-pack/test/visual_regression/tests/login_page.js diff --git a/test/scripts/jenkins_visual_regression.sh b/test/scripts/jenkins_visual_regression.sh deleted file mode 100755 index 42fd4d63a9171..0000000000000 --- a/test/scripts/jenkins_visual_regression.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env bash - -set -e - -function report { - if [[ -z "$PR_SOURCE_BRANCH" ]]; then - node src/dev/failed_tests/cli - else - echo "Failure issues not created on pull requests" - - fi -} - -trap report EXIT - -node scripts/build --debug --oss; -linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-oss-*-linux-x86_64.tar.gz')" -installDir="$PARENT_DIR/install/kibana" -mkdir -p "$installDir" -tar -xzf "$linuxBuild" -C "$installDir" --strip=1 - -export TEST_BROWSER_HEADLESS=1 - -checks-reporter-with-killswitch "Kibana visual regression tests" \ - yarn run percy exec \ - node scripts/functional_tests \ - --debug --bail \ - --kibana-install-dir "$installDir" \ - --config test/visual_regression/config.ts; diff --git a/test/scripts/jenkins_xpack_visual_regression.sh b/test/scripts/jenkins_xpack_visual_regression.sh deleted file mode 100755 index f4d94f63d1112..0000000000000 --- a/test/scripts/jenkins_xpack_visual_regression.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env bash - -set -e - -function report { - if [[ -z "$PR_SOURCE_BRANCH" ]]; then - node src/dev/failed_tests/cli - else - echo "Failure issues not created on pull requests" - - fi -} - -trap report EXIT - -node scripts/build --debug --no-oss; -linuxBuild="$(find "$KIBANA_DIR/target" -name 'kibana-*-linux-x86_64.tar.gz')" -installDir="$PARENT_DIR/install/kibana" -mkdir -p "$installDir" -tar -xzf "$linuxBuild" -C "$installDir" --strip=1 - -export TEST_BROWSER_HEADLESS=1 - -cd "$XPACK_DIR" - -checks-reporter-with-killswitch "X-Pack visual regression tests" \ - yarn run percy exec \ - node scripts/functional_tests \ - --debug --bail \ - --kibana-install-dir "$installDir" \ - --config test/visual_regression/config.js; diff --git a/test/visual_regression/ftr_provider_context.d.ts b/test/visual_regression/ftr_provider_context.d.ts deleted file mode 100644 index b7c1cd2193249..0000000000000 --- a/test/visual_regression/ftr_provider_context.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { GenericFtrProviderContext } from '@kbn/test/types/ftr'; - -import { pageObjects } from '../functional/page_objects'; -import { services } from './services'; - -export type FtrProviderContext = GenericFtrProviderContext; diff --git a/x-pack/test/visual_regression/config.js b/x-pack/test/visual_regression/config.js deleted file mode 100644 index 5afd417501336..0000000000000 --- a/x-pack/test/visual_regression/config.js +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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 { services as ossVisualRegressionServices } from '../../../test/visual_regression/services'; - -export default async function ({ readConfigFile }) { - const functionalConfig = await readConfigFile(require.resolve('../functional/config')); - - return { - ...functionalConfig.getAll(), - - testFiles: [ - require.resolve('./tests/login_page'), - ], - - services: { - ...functionalConfig.get('services'), - visualTesting: ossVisualRegressionServices.visualTesting, - }, - - junit: { - reportName: 'X-Pack Visual Regression Tests', - }, - }; -} diff --git a/x-pack/test/visual_regression/tests/login_page.js b/x-pack/test/visual_regression/tests/login_page.js deleted file mode 100644 index e100d48a24299..0000000000000 --- a/x-pack/test/visual_regression/tests/login_page.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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. - */ - -export default function ({ getService, getPageObjects }) { - const esArchiver = getService('esArchiver'); - const visualTesting = getService('visualTesting'); - const testSubjects = getService('testSubjects'); - const retry = getService('retry'); - const PageObjects = getPageObjects(['common']); - - describe('Security', () => { - describe('Login Page', () => { - before(async () => { - await esArchiver.load('empty_kibana'); - await PageObjects.security.logout(); - }); - - after(async () => { - await esArchiver.unload('empty_kibana'); - }); - - afterEach(async () => { - await PageObjects.security.logout(); - }); - - it('renders login page', async () => { - await PageObjects.common.navigateToApp('login'); - await retry.waitFor('login page visible', async () => ( - await testSubjects.exists('loginSubmit') - )); - - await visualTesting.snapshot(); - }); - - it('renders failed login', async () => { - await PageObjects.security.loginPage.login('wrong-user', 'wrong-password', { - expectSuccess: false, - }); - - await retry.waitFor('login error visible', async () => ( - await testSubjects.exists('loginErrorMessage') - )); - - await visualTesting.snapshot(); - }); - }); - }); -}