Files
nocodb/tests/playwright/pages/Dashboard/common/Toolbar/SearchData.ts
Ramesh Mane d372228080 Nc fix: Misc Design Fixes II (#8461)
* fix(nc-gui): team & settings tab ui fixes

* fix(nc-gui): update sidebar base text color on hover and selected state

* fix(nc-gui): sidebar base, table menu height issue

* fix(nc-gui): sidebar view menu alignment issue

* fix(nc-gui): sidebar view menu height and active state color

* fix(nc-gui): update global search ui

* fix(nc-gui): grid row hover style update

* fix(nc-gui): topbar font weight issue

* fix(nc-gui): team & setting tab user list margin top issue

* fix(nc-gui): workspace icon color issue

* fix(test): update global search test cases
2024-05-11 20:06:11 +05:30

30 lines
764 B
TypeScript

import BasePage from '../../../Base';
import { ToolbarPage } from './index';
import { expect } from '@playwright/test';
export class ToolbarSearchDataPage extends BasePage {
readonly toolbar: ToolbarPage;
constructor(toolbar: ToolbarPage) {
super(toolbar.rootPage);
this.toolbar = toolbar;
}
get() {
return this.rootPage.getByTestId('search-data-input');
}
async verify(query: string) {
const searchEnableBtn = await this.rootPage
.waitForSelector('[data-testid="nc-global-search-show-input"]', { timeout: 100 })
.catch(() => null);
if (searchEnableBtn) {
await searchEnableBtn.click();
await this.get().waitFor({ state: 'visible' });
}
expect(await this.get().inputValue()).toBe(query);
}
}