Skip to content

Commit

Permalink
Add preferences setup check for the VscodeYamlPlugin test (#20493)
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Okhrimenko <[email protected]>
  • Loading branch information
Ohrimenko1988 authored Sep 21, 2021
1 parent 7a63972 commit 35d8f58
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/e2e/tests/plugins/VscodeYamlPlugin.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { Logger } from '../../utils/Logger';
import { WorkspaceHandlingTests } from '../../testsLibrary/WorkspaceHandlingTests';
import CheReporter from '../../driver/CheReporter';
import { BrowserTabsUtil } from '../../utils/BrowserTabsUtil';
import { TopMenu } from '../../pageobjects/ide/TopMenu';
import { QuickOpenContainer } from '../../pageobjects/ide/QuickOpenContainer';

const ide: Ide = e2eContainer.get(CLASSES.Ide);
const projectTree: ProjectTree = e2eContainer.get(CLASSES.ProjectTree);
Expand All @@ -30,6 +32,8 @@ const browserTabsUtil: BrowserTabsUtil = e2eContainer.get(CLASSES.BrowserTabsUti
const preferencesHandler: PreferencesHandler = e2eContainer.get(CLASSES.PreferencesHandler);
const workspaceHandlingTests: WorkspaceHandlingTests = e2eContainer.get(CLASSES.WorkspaceHandlingTests);
const workspaceNameHandler: WorkspaceNameHandler = e2eContainer.get(CLASSES.WorkspaceNameHandler);
const topMenu: TopMenu = e2eContainer.get(CLASSES.TopMenu);
const quickOpenContainer: QuickOpenContainer = e2eContainer.get(CLASSES.QuickOpenContainer);

const devfileUrl: string = 'https://raw.githubusercontent.com/eclipse/che/main/tests/e2e/files/devfiles/plugins/VscodeYamlPlugin.yaml';
const factoryUrl: string = `${TestConstants.TS_SELENIUM_BASE_URL}/f?url=${devfileUrl}`;
Expand Down Expand Up @@ -67,6 +71,13 @@ suite('The "VscodeYamlPlugin" userstory', async () => {
});

suite('Check the "vscode-yaml" plugin', async () => {
test('Check preferences setup', async () => {
await topMenu.selectOption('View', 'Find Command...');
await quickOpenContainer.typeAndSelectSuggestion('Preferences:', 'Preferences: Open Preferences (JSON)');
await editor.selectTab('settings.json');
await editor.waitText('settings.json', 'yaml-schema.json', 60_000, 10_000);
});

test('Check autocomplete', async () => {
await projectTree.expandPathAndOpenFile(pathToFile, yamlFileName);
await editor.waitSuggestion(yamlFileName, 'from', 60000, 18, 5);
Expand Down

0 comments on commit 35d8f58

Please sign in to comment.