-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added public ui tests * activity test edit
- Loading branch information
Showing
7 changed files
with
133 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/*----------------------------------------------------------------------------------------------- | ||
* Copyright (c) Red Hat, Inc. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE file in the project root for license information. | ||
*-----------------------------------------------------------------------------------------------*/ | ||
import { InputBox, Workbench, EditorView } from 'vscode-extension-tester'; | ||
import { expect } from 'chai'; | ||
|
||
export function commandPaletteTest() : void{ | ||
|
||
describe('Tekton Command Palette Test', () => { | ||
|
||
before(async function() { | ||
this.timeout(20000); | ||
await new EditorView().closeAllEditors(); | ||
}); | ||
|
||
it('Search Tekton', async function(){ | ||
this.timeout(20000); | ||
await new Workbench().openCommandPrompt(); | ||
const paletteInput = await InputBox.create(); | ||
await paletteInput.setText('> tekton'); | ||
|
||
const tektonPicks = await paletteInput.getQuickPicks(); | ||
expect(tektonPicks).not.empty; | ||
}); | ||
|
||
after(async function() { | ||
this.timeout(20000); | ||
await new EditorView().closeAllEditors(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/*----------------------------------------------------------------------------------------------- | ||
* Copyright (c) Red Hat, Inc. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE file in the project root for license information. | ||
*-----------------------------------------------------------------------------------------------*/ | ||
import { SideBarView, ActivityBar, EditorView } from 'vscode-extension-tester'; | ||
import { expect } from 'chai'; | ||
import { views } from '../common/constants'; | ||
|
||
export function extensionActivityTest() : void{ | ||
|
||
describe('Tekton Activity Test', () => { | ||
|
||
before(async function() { | ||
this.timeout(20000); | ||
await new EditorView().closeAllEditors(); | ||
}); | ||
|
||
it('Check Tekton Pipelines Exists', async function(){ | ||
this.timeout(20000); | ||
const tektonPip = await new ActivityBar().getViewControl(views.TEKTON_TITLE); | ||
expect(tektonPip).not.undefined; | ||
}); | ||
|
||
it('Check Tekton View Categories', async function(){ | ||
this.timeout(20000); | ||
await (await new ActivityBar().getViewControl(views.TEKTON_TITLE)).openView(); | ||
const tektonCats = await new SideBarView().getContent().getSections(); | ||
expect(tektonCats.length).equals(3); | ||
expect(await Promise.all(tektonCats.map(async item => await item.getTitle()))).to.has.members(views.TEKTON_CATS); | ||
}); | ||
|
||
it('Check Tekton Pipelines Actions', async function(){ | ||
this.timeout(20000); | ||
await (await new ActivityBar().getViewControl(views.TEKTON_TITLE)).openView(); | ||
const tektonPipSection = await new SideBarView().getContent().getSection(views.TEKTON_TITLE); | ||
await tektonPipSection.expand(); | ||
expect(tektonPipSection.isExpanded()); | ||
|
||
|
||
const actions = await tektonPipSection.getActions(); | ||
expect(actions.length).greaterThan(0); | ||
}); | ||
|
||
after(async function() { | ||
this.timeout(20000); | ||
await new EditorView().closeAllEditors(); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/*----------------------------------------------------------------------------------------------- | ||
* Copyright (c) Red Hat, Inc. All rights reserved. | ||
* Licensed under the MIT License. See LICENSE file in the project root for license information. | ||
*-----------------------------------------------------------------------------------------------*/ | ||
import { ActivityBar, EditorView, ExtensionsViewItem } from 'vscode-extension-tester'; | ||
import { expect } from 'chai'; | ||
|
||
export function extensionViewTest() : void{ | ||
|
||
describe('Tekton Extension View Test', () => { | ||
|
||
before(async function() { | ||
this.timeout(20000); | ||
await new EditorView().closeAllEditors(); | ||
}); | ||
|
||
it('Check Tekton Installation And Information', async function(){ | ||
this.timeout(20000); | ||
const extensionView = await (await new ActivityBar().getViewControl('Extensions')).openView(); | ||
const installedSection = await extensionView.getContent().getSection('Installed'); | ||
const tektonItem = await installedSection.findItem('@installed Tekton Pipelines') as ExtensionsViewItem; | ||
expect(tektonItem).not.undefined; | ||
|
||
const tektonTitle = await tektonItem.getTitle(); | ||
const tektonInstalled = await tektonItem.isInstalled(); | ||
const tektonAuthor = await tektonItem.getAuthor(); | ||
expect(tektonTitle).equals('Tekton Pipelines'); | ||
expect(tektonInstalled).is.true; | ||
expect(tektonAuthor).equals('Red Hat'); | ||
}); | ||
|
||
after(async function() { | ||
this.timeout(20000); | ||
await new EditorView().closeAllEditors(); | ||
}); | ||
}); | ||
} |