diff --git a/packages/theme/styles/popups.scss b/packages/theme/styles/popups.scss index 31e5ae1f23..aab96f82ca 100644 --- a/packages/theme/styles/popups.scss +++ b/packages/theme/styles/popups.scss @@ -194,7 +194,6 @@ height: max-content; overflow-x: hidden; overflow-y: auto; - scrollbar-width: thin; &::-webkit-scrollbar { width: 0; } .box { diff --git a/packages/ui/src/components/Button.svelte b/packages/ui/src/components/Button.svelte index 5812b007b7..9c44f0692d 100644 --- a/packages/ui/src/components/Button.svelte +++ b/packages/ui/src/components/Button.svelte @@ -57,6 +57,7 @@ export let title: string | undefined = undefined export let borderStyle: 'solid' | 'dashed' | 'none' = 'solid' export let id: string | undefined = undefined + export let dataId: string | undefined = undefined export let input: HTMLButtonElement | undefined = undefined export let showTooltip: LabelAndProps | undefined = undefined export let short: boolean = false @@ -154,6 +155,7 @@ on:mousemove on:mouseleave {id} + data-id={dataId} > {#if icon && !loading}
diff --git a/packages/ui/src/components/NotificationToast.svelte b/packages/ui/src/components/NotificationToast.svelte index aba306a501..0a6b7a3777 100644 --- a/packages/ui/src/components/NotificationToast.svelte +++ b/packages/ui/src/components/NotificationToast.svelte @@ -43,7 +43,7 @@ $: icon = getIcon() -
+
{#if icon} @@ -60,7 +60,7 @@ {title}
{#if onClose !== undefined} -
@@ -76,7 +76,7 @@
+ + + + { + selectedTab = result.detail.id + }} + /> + + + +
+ {#if selectedTab === 'general'} + + {:else if selectedTab === 'users'} + + {:else if selectedTab === 'statistics'} + + {:else if selectedTab === 'statistics-front'} + + {:else if selectedTab === 'statistics-collab'} + + {:else if selectedTab === 'account'} + + {/if} +
+
diff --git a/tests/sanity/tests/custom-atributes/class-properties-page.ts b/tests/sanity/tests/custom-atributes/class-properties-page.ts index 8275ec1704..741010b2e1 100644 --- a/tests/sanity/tests/custom-atributes/class-properties-page.ts +++ b/tests/sanity/tests/custom-atributes/class-properties-page.ts @@ -31,7 +31,7 @@ export class ClassProperties { inputName = (): Locator => this.page.getByPlaceholder('Name') createButton = (): Locator => this.page.getByRole('button', { name: 'Create' }) enterTextString = (): Locator => this.page.getByPlaceholder('Type text...') - confirmChange = (): Locator => this.page.locator('.ml-2 > .antiButton') + confirmChange = (): Locator => this.page.locator('.selectPopup button') async selectDataType (dataType: DataType): Promise { switch (dataType) { diff --git a/tests/sanity/tests/model/channel-page.ts b/tests/sanity/tests/model/channel-page.ts index 442a772b38..7226e1c78a 100644 --- a/tests/sanity/tests/model/channel-page.ts +++ b/tests/sanity/tests/model/channel-page.ts @@ -14,17 +14,33 @@ export class ChannelPage { readonly channelTab = (): Locator => this.page.getByRole('link', { name: 'Channels' }).getByRole('button') readonly channelTable = (): Locator => this.page.getByRole('table') readonly channel = (channel: string): Locator => this.page.getByRole('button', { name: channel }) + readonly channelNameOnDetail = (channel: string): Locator => + this.page + .locator('span.labelOnPanel', { hasText: 'Name' }) + .locator('xpath=following-sibling::div[1]') + .locator('button', { hasText: channel }) + readonly chooseChannel = (channel: string): Locator => this.page.getByRole('button', { name: channel }) - readonly closePopupWindow = (): Locator => this.page.locator('.root > div > .antiButton').first() + readonly closePopupWindow = (): Locator => this.page.locator('.notifyPopup button[data-id="btnNotifyClose"]') readonly openAddMemberToChannel = (userName: string): Locator => this.page.getByRole('button', { name: userName }) readonly addMemberToChannelButton = (userName: string): Locator => this.page.getByText(userName) readonly joinChannelButton = (): Locator => this.page.getByRole('button', { name: 'Join' }) - readonly addEmojiButton = (): Locator => this.page.locator('.root > button').first() + readonly addEmojiButton = (): Locator => + this.page.locator('.activityMessage-actionPopup > button[data-id$="AddReactionAction"]') + readonly selectEmoji = (emoji: string): Locator => this.page.getByText(emoji) - readonly saveMessageButton = (): Locator => this.page.locator('.root > button:nth-child(2)') - readonly pinMessageButton = (): Locator => this.page.locator('.root > button:nth-child(3)') - readonly replyButton = (): Locator => this.page.locator('.root > button:nth-child(4)') - readonly openMoreButton = (): Locator => this.page.locator('.root > button:nth-child(5)') + readonly saveMessageButton = (): Locator => + this.page.locator('.activityMessage-actionPopup > button[data-id$="SaveForLaterAction"]') + + readonly pinMessageButton = (): Locator => + this.page.locator('.activityMessage-actionPopup > button[data-id$="PinMessageAction"]') + + readonly replyButton = (): Locator => + this.page.locator('.activityMessage-actionPopup > button[data-id$="ReplyToThreadAction"]') + + readonly openMoreButton = (): Locator => + this.page.locator('.activityMessage-actionPopup > button[data-id="btnMoreActions"]') + readonly messageSaveMarker = (): Locator => this.page.locator('.saveMarker') readonly saveMessageTab = (): Locator => this.page.getByRole('button', { name: 'Saved' }) readonly pinnedMessageButton = (): Locator => this.page.getByRole('button', { name: 'pinned' }) @@ -36,7 +52,7 @@ export class ChannelPage { readonly deleteMessageButton = (): Locator => this.page.getByRole('button', { name: 'Delete' }) readonly updateButton = (): Locator => this.page.getByRole('button', { name: 'Update' }) readonly openChannelDetails = (): Locator => this.page.locator('.hulyHeader-buttonsGroup > .antiButton') - readonly changeChannelNameConfirm = (): Locator => this.page.locator('.ml-2 > .antiButton') + readonly changeChannelNameConfirm = (): Locator => this.page.locator('.selectPopup button') readonly privateOrPublicChangeButton = (change: string, autoJoin: boolean): Locator => this.page .locator('span.labelOnPanel', { hasText: autoJoin ? 'Auto join' : 'Private' }) @@ -64,7 +80,7 @@ export class ChannelPage { } async changeChannelName (channel: string): Promise { - await this.channel(channel).nth(2).click() + await this.channelNameOnDetail(channel).click() await this.page.keyboard.type('New Channel Name') await this.changeChannelNameConfirm().click() } diff --git a/tests/sanity/tests/model/documents/document-content-page.ts b/tests/sanity/tests/model/documents/document-content-page.ts index 363eca9346..5d6de50ea6 100644 --- a/tests/sanity/tests/model/documents/document-content-page.ts +++ b/tests/sanity/tests/model/documents/document-content-page.ts @@ -11,7 +11,7 @@ export class DocumentContentPage extends CommonPage { readonly buttonDocumentTitle = (): Locator => this.page.locator('div[class*="main-content"] div.title input') readonly inputContent = (): Locator => this.page.locator('div.textInput div.tiptap') - readonly buttonToolbarLink = (): Locator => this.page.locator('div.text-editor-toolbar button:nth-child(10)') + readonly buttonToolbarLink = (): Locator => this.page.locator('div.text-editor-toolbar button[data-id="btnLink"]') readonly inputFormLink = (): Locator => this.page.locator('form[id="text-editor:string:Link"] input') readonly buttonFormLinkSave = (): Locator => this.page.locator('form[id="text-editor:string:Link"] button[type="submit"]') diff --git a/tests/sanity/tests/model/planning/planning-page.ts b/tests/sanity/tests/model/planning/planning-page.ts index f5b1f14947..7f7e36406f 100644 --- a/tests/sanity/tests/model/planning/planning-page.ts +++ b/tests/sanity/tests/model/planning/planning-page.ts @@ -21,12 +21,8 @@ export class PlanningPage extends CalendarPage { readonly inputPopupCreateTitle = (): Locator => this.popup().locator('input[type="text"]') readonly inputPopupCreateDescription = (): Locator => this.popup().locator('div.tiptap') readonly inputPanelCreateDescription = (): Locator => this.panel().locator('div.tiptap') - readonly buttonPopupCreateDueDate = (): Locator => - this.popup().locator('div.block:first-child div.flex-row-center button:nth-child(3)') - - readonly buttonPanelCreateDueDate = (): Locator => - this.panel().locator('div.slots-content div.flex-row-top.justify-between div.flex-row-center button:first-child') - + readonly buttonPopupCreateDueDate = (): Locator => this.popup().locator('button#dueDateButton') + readonly buttonPanelCreateDueDate = (): Locator => this.panel().locator('button#dueDateButton') readonly buttonPopupCreatePriority = (): Locator => this.popup().locator('button#priorityButton') readonly buttonPanelCreatePriority = (): Locator => this.panel().locator('button#priorityButton') readonly buttonPopupCreateVisible = (): Locator => this.popup().locator('button#visibleButton') diff --git a/tests/sanity/tests/model/tracker/issues-page.ts b/tests/sanity/tests/model/tracker/issues-page.ts index 5a589f495c..f1004db822 100644 --- a/tests/sanity/tests/model/tracker/issues-page.ts +++ b/tests/sanity/tests/model/tracker/issues-page.ts @@ -113,7 +113,12 @@ export class IssuesPage extends CommonTrackerPage { createdTab = (): Locator => this.page.locator('[data-id="tab-created"]') subscribedTab = (): Locator => this.page.locator('[data-id="tab-subscribed"]') issueListPanel = (): Locator => this.page.locator('.hulyComponent') - notTrackButton = (): Locator => this.page.locator('button:has-text("Appleseed John") >> nth=1') + notTrackButton = (): Locator => + this.page + .locator('span.labelOnPanel', { hasText: 'Collaborators' }) + .locator('xpath=following-sibling::div[1]') + .locator('button') + selectPopup = (): Locator => this.page.locator('.selectPopup >> button:has-text("Appleseed John")') notificationTimeoutSetting = (timeout: string): Promise => { return this.page.evaluate((timeout) => { @@ -136,7 +141,7 @@ export class IssuesPage extends CommonTrackerPage { issueName = (name: string): Locator => this.page.locator(`text="${name}"`) issuesButton = (): Locator => this.page.locator('text="Issues"') viewButton = (): Locator => this.page.locator('button[data-id="btn-viewOptions"]') - orderingButton = (): Locator => this.page.locator('.ordering >> nth=0') + orderingButton = (): Locator => this.page.locator('.ordering button') modifiedDateMenuItem = (): Locator => this.page.locator('button.menu-item', { hasText: 'Modified date' }) estimationContainer = (): Locator => this.page.locator('.estimation-container').first() addTimeReportButton = (): Locator => this.page.locator('button:has-text("Add time report")') @@ -158,7 +163,7 @@ export class IssuesPage extends CommonTrackerPage { dueDateButton = (): Locator => this.page.locator('button:has-text("Due date")') specificDay = (day: string): Locator => this.page.locator(`.date-popup-container div.day >> text=${day}`).first() inputTextPlaceholder = (): Locator => this.page.getByPlaceholder('Type text...') - confirmInput = (): Locator => this.page.locator('.ml-2 > .antiButton') + confirmInput = (): Locator => this.page.locator('.selectPopup button') async navigateToIssues (): Promise { await this.page.click('text="Issues"')