FIX: do not display empty state while fetching bot conversations (#1320)
* FIX: do not display empty state while fetching bot conversations * skip test in playwright and fix implementation * tiny css fix, missing padding
This commit is contained in:
parent
f1b7cc8f7a
commit
d62c76d1e8
|
@ -93,8 +93,9 @@ export default {
|
|||
@tracked loadedSevenDayLabel = false;
|
||||
@tracked loadedThirtyDayLabel = false;
|
||||
@tracked loadedMonthLabels = new Set();
|
||||
page = 0;
|
||||
@tracked isLoading = true;
|
||||
isFetching = false;
|
||||
page = 0;
|
||||
totalTopicsCount = 0;
|
||||
|
||||
constructor() {
|
||||
|
@ -123,8 +124,10 @@ export default {
|
|||
}
|
||||
|
||||
get emptyStateComponent() {
|
||||
if (!this.isLoading) {
|
||||
return AiBotSidebarEmptyState;
|
||||
}
|
||||
}
|
||||
|
||||
get text() {
|
||||
return i18n(
|
||||
|
@ -214,6 +217,8 @@ export default {
|
|||
this.attachScrollListener();
|
||||
} catch {
|
||||
this.isFetching = false;
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -389,6 +389,10 @@ body.has-ai-conversations-sidebar {
|
|||
color: var(--primary-high);
|
||||
font-size: var(--font-down-2);
|
||||
|
||||
&__progress {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
||||
&:hover,
|
||||
&:focus-visible {
|
||||
.d-icon {
|
||||
|
|
|
@ -137,15 +137,17 @@ RSpec.describe "AI Bot - Homepage", type: :system do
|
|||
expect(page).to have_no_css(".ai-bot-upload")
|
||||
end
|
||||
|
||||
xit "allows removing an upload before submission" do
|
||||
it "allows removing an upload before submission" do
|
||||
skip "TODO: fix this test for playwright"
|
||||
|
||||
ai_pm_homepage.visit
|
||||
expect(ai_pm_homepage).to have_homepage
|
||||
|
||||
file_path = file_from_fixtures("logo.png", "images").path
|
||||
attach_file([file_path]) { find(".ai-bot-upload-btn", visible: true).click }
|
||||
|
||||
expect(page).to have_css(".ai-bot-upload", count: 1)
|
||||
|
||||
# TODO: for some reason this line fails in playwright
|
||||
find(".ai-bot-upload__remove").click
|
||||
|
||||
expect(page).to have_no_css(".ai-bot-upload")
|
||||
|
|
Loading…
Reference in New Issue