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
1 change: 1 addition & 0 deletions .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
retention-days: 30

- name: Set timestamp.
if: always()
id: timestamp
run: echo "TIMESTAMP=$(date +%Y%m%d_%H%M%S_%3N)" >> $GITHUB_ENV

Expand Down
2 changes: 1 addition & 1 deletion src/webview/homescreenView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export class HomescreenViewProvider implements vscode.WebviewViewProvider {
</div>

<div class="hs-actions">
<button id="hs-btn-library" class="hs-action" data-command="showLibrary">
<button id="hs-btn-library" class="hs-action" data-command="showLibrary" data-testid="hs-browse-library-button">
<span class="hs-action-icon hs-action-icon--blue" aria-hidden="true">
<svg width="15" height="15" viewBox="0 0 16 16" fill="currentColor"><path d="M1 2.828c.885-.37 2.154-.769 3.388-.893 1.33-.134 2.458.063 3.112.752v9.746c-.935-.53-2.12-.603-3.213-.493-1.18.12-2.37.461-3.287.811V2.828zm7.5-.141c.654-.689 1.782-.886 3.112-.752 1.234.124 2.503.523 3.388.893v9.923c-.918-.35-2.107-.692-3.287-.81-1.094-.111-2.278-.039-3.213.492V2.687zM8 1.783C7.015.936 5.587.81 4.287.94c-1.514.153-3.042.672-3.994 1.105A.5.5 0 0 0 0 2.5v11a.5.5 0 0 0 .707.455c.882-.4 2.303-.881 3.68-1.02 1.409-.142 2.59.087 3.223.877a.5.5 0 0 0 .78 0c.633-.79 1.814-1.019 3.222-.877 1.378.139 2.8.62 3.681 1.02A.5.5 0 0 0 16 13.5v-11a.5.5 0 0 0-.293-.455c-.952-.433-2.48-.952-3.994-1.105C10.413.809 8.985.936 8 1.783z"/></svg>
</span>
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"allure-commandline": "^2.38.1",
"cloudinary": "^2.9.0",
"expect-webdriverio": "^5.6.5",
"wdio-video-reporter": "^6.2.0",
"wdio-vscode-service": "^6.1.4"
"wdio-vscode-service": "^6.1.4",
"webdriverio": "^9.27.0"
},
"scripts": {
"test:e2e": "rm -rf allure-report allure-results && wdio run ./wdio.conf.ts",
Expand Down
167 changes: 3 additions & 164 deletions test/e2e/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/e2e/specs/loadMlAssets.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ describe('Asset Explorer Tetsts', () => {
const expectedItems = [firstAssetPublicID, secondAssetPublicID];

await activityBarUtils.openView('Cloudinary');
await sideBarViewUtils.homeScreenViewPage.clickBrowseLibraryButton();

await sideBarViewUtils.validateSideBarViewTitle(expectedTitle);

Expand Down
1 change: 1 addition & 0 deletions test/e2e/specs/searchAssetFromSideBar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ describe('Search asset from side bar', () => {

it('should find the uploaded asset via sidebar search', async () => {
await activityBarUtils.openView('Cloudinary');
await sideBarViewUtils.homeScreenViewPage.clickBrowseLibraryButton();

await sideBarViewUtils.clickAction(SideBarViewActions.SEARCH);

Expand Down
2 changes: 2 additions & 0 deletions test/e2e/specs/uploadFromSideBarView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ describe('Upload asset from side bar Upload button', () => {

it('should upload an asset using the side bar Upload button with custom public ID', async () => {
await activityBarUtils.openView('Cloudinary');
await sideBarViewUtils.homeScreenViewPage.clickBrowseLibraryButton();

await sideBarViewUtils.clickAction(SideBarViewActions.UPLOAD);

await uploadToCloudinaryTab.switchTo();
Expand Down
23 changes: 23 additions & 0 deletions test/e2e/src/utils/wdioUtils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import allureReporter from '@wdio/allure-reporter'
import { $ } from '@wdio/globals';
import { ClickOptions } from 'webdriverio';

/**
* Utility class for interacting with the WebDriverIO browser.
*/
class WdioUtils {
/**
* Clicks on an element.
* @param selector - The selector of the element to click.
*/
public async click(selector: string, options?: ClickOptions): Promise<void> {
await allureReporter.addStep(`Click an element '${selector}'`);
const element = $(selector);
await element.waitForExist();
await element.waitForClickable();
return element.click(options);
}

}

export default new WdioUtils();
Loading
Loading