Skip to content

Commit

Permalink
fix: calendar test corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkPhoenix2704 committed May 6, 2024
1 parent 0b8f6fb commit fde2e23
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
19 changes: 14 additions & 5 deletions packages/nc-gui/components/smartsheet/calendar/SideMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,13 @@ onClickOutside(searchRef, toggleSearch)
</a-input>
</div>
<div class="mx-4 gap-2 flex items-center">
<NcButton v-if="!showSearch" size="small" type="secondary" @click="clickSearch">
<NcButton
v-if="!showSearch"
data-testid="nc-calendar-sidebar-search-btn"
size="small"
type="secondary"
@click="clickSearch"
>
<component :is="iconMap.search" />
</NcButton>
Expand Down Expand Up @@ -464,10 +470,13 @@ onClickOutside(searchRef, toggleSearch)
v-if="calendarRange?.length && !isCalendarMetaLoading"
:ref="sideBarListRef"
:class="{
'!h-[calc(100vh-13.5rem)]': width <= 1440,
'h-[calc(100vh-36.2rem)]': activeCalendarView === ('day' as const) || activeCalendarView === ('week' as const) && width >= 1440,
'h-[calc(100vh-25.1rem)]': activeCalendarView === ('month' as const) || activeCalendarView === ('year' as const) && width >= 1440,
'h-[calc(100vh-16rem)]': width <= 1440 && !showSearch,
'h-[calc(100vh-19rem)]': width <= 1440 && showSearch,
'!h-[calc(100vh-30.4rem)]': activeCalendarView === ('day' as const) || activeCalendarView === ('week' as const) && width >= 1440,
'!h-[calc(100vh-33.4rem)]': (activeCalendarView === ('day' as const) || activeCalendarView === ('week' as const) && width >= 1440) && showSearch,
'h-[calc(100vh-23.3rem)]': activeCalendarView === ('month' as const) || activeCalendarView === ('year' as const) && width >= 1440,
'h-[calc(100vh-26.3rem)]': (activeCalendarView === ('month' as const) || activeCalendarView === ('year' as const) && width >= 1440) && showSearch ,
}"
class="nc-scrollbar-md pl-4 pr-4 overflow-y-auto"
data-testid="nc-calendar-side-menu-list"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class CalendarSideMenuPage extends BasePage {

readonly prev_btn: Locator;
readonly next_btn: Locator;

readonly searchToggleBtn: Locator;
constructor(parent: CalendarPage) {
super(parent.rootPage);
this.parent = parent;
Expand All @@ -18,6 +18,8 @@ export class CalendarSideMenuPage extends BasePage {

this.next_btn = this.get().getByTestId('nc-calendar-next-btn');
this.prev_btn = this.get().getByTestId('nc-calendar-prev-btn');

this.searchToggleBtn = this.get().getByTestId('nc-calendar-sidebar-search-btn');
}

get() {
Expand All @@ -31,7 +33,11 @@ export class CalendarSideMenuPage extends BasePage {
}

async searchRecord({ query }: { query: string }) {
if (await this.searchToggleBtn.isVisible()) {
await this.searchToggleBtn.click();
}
const searchInput = this.get().getByTestId('nc-calendar-sidebar-search');

await searchInput.fill(query);
}

Expand Down

1 comment on commit fde2e23

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR changes have been deployed. Please run the following command to verify:

docker run -d -p 8888:8080 nocodb/nocodb-timely:0.205.0-pr-8379-20240506-0721

Please sign in to comment.