mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-27 19:00:02 +00:00
[TSK-223] Workbench: App alias (Part 1) (#2162)
Signed-off-by: Anna <anna.no@xored.com>
This commit is contained in:
parent
ea54231b8e
commit
3b25cc2b83
@ -14,6 +14,9 @@ HR:
|
|||||||
Tracker:
|
Tracker:
|
||||||
- Manual issues ordering
|
- Manual issues ordering
|
||||||
|
|
||||||
|
Workbench
|
||||||
|
- Use application aliases in URL
|
||||||
|
|
||||||
## 0.6.29
|
## 0.6.29
|
||||||
|
|
||||||
Platform:
|
Platform:
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
// To help typescript locate view plugin properly
|
// To help typescript locate view plugin properly
|
||||||
import automation, { AutomationSupport } from '@anticrm/automation'
|
import automation, { AutomationSupport } from '@anticrm/automation'
|
||||||
import type { Board, Card, MenuPage, CommonBoardPreference, CardCover } from '@anticrm/board'
|
import { Board, Card, MenuPage, CommonBoardPreference, CardCover, boardId } from '@anticrm/board'
|
||||||
import type { Employee } from '@anticrm/contact'
|
import type { Employee } from '@anticrm/contact'
|
||||||
import { Class, DOMAIN_MODEL, IndexKind, Markup, Ref, Type } from '@anticrm/core'
|
import { Class, DOMAIN_MODEL, IndexKind, Markup, Ref, Type } from '@anticrm/core'
|
||||||
import {
|
import {
|
||||||
@ -140,6 +140,7 @@ export function createModel (builder: Builder): void {
|
|||||||
{
|
{
|
||||||
label: board.string.BoardApplication,
|
label: board.string.BoardApplication,
|
||||||
icon: board.icon.Board,
|
icon: board.icon.Board,
|
||||||
|
alias: boardId,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
navigatorModel: {
|
navigatorModel: {
|
||||||
spaces: [
|
spaces: [
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import activity from '@anticrm/activity'
|
import activity from '@anticrm/activity'
|
||||||
import { Calendar, Event, Reminder } from '@anticrm/calendar'
|
import { calendarId, Calendar, Event, Reminder } from '@anticrm/calendar'
|
||||||
import { Employee } from '@anticrm/contact'
|
import { Employee } from '@anticrm/contact'
|
||||||
import type { Domain, Markup, Ref, Timestamp } from '@anticrm/core'
|
import type { Domain, Markup, Ref, Timestamp } from '@anticrm/core'
|
||||||
import { IndexKind } from '@anticrm/core'
|
import { IndexKind } from '@anticrm/core'
|
||||||
@ -104,6 +104,7 @@ export function createModel (builder: Builder): void {
|
|||||||
{
|
{
|
||||||
label: calendar.string.ApplicationLabelCalendar,
|
label: calendar.string.ApplicationLabelCalendar,
|
||||||
icon: calendar.icon.Calendar,
|
icon: calendar.icon.Calendar,
|
||||||
|
alias: calendarId,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
component: calendar.component.Events
|
component: calendar.component.Events
|
||||||
},
|
},
|
||||||
|
@ -14,9 +14,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import activity from '@anticrm/activity'
|
import activity from '@anticrm/activity'
|
||||||
import type {
|
import {
|
||||||
Backlink,
|
Backlink,
|
||||||
Channel,
|
Channel,
|
||||||
|
chunterId,
|
||||||
ChunterMessage,
|
ChunterMessage,
|
||||||
ChunterSpace,
|
ChunterSpace,
|
||||||
Comment,
|
Comment,
|
||||||
@ -324,6 +325,7 @@ export function createModel (builder: Builder): void {
|
|||||||
{
|
{
|
||||||
label: chunter.string.ApplicationLabelChunter,
|
label: chunter.string.ApplicationLabelChunter,
|
||||||
icon: chunter.icon.Chunter,
|
icon: chunter.icon.Chunter,
|
||||||
|
alias: chunterId,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
navigatorModel: {
|
navigatorModel: {
|
||||||
specials: [
|
specials: [
|
||||||
|
@ -13,10 +13,11 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
|
|
||||||
import type {
|
import {
|
||||||
Channel,
|
Channel,
|
||||||
ChannelProvider,
|
ChannelProvider,
|
||||||
Contact,
|
Contact,
|
||||||
|
contactId,
|
||||||
Employee,
|
Employee,
|
||||||
EmployeeAccount,
|
EmployeeAccount,
|
||||||
Member,
|
Member,
|
||||||
@ -170,6 +171,7 @@ export function createModel (builder: Builder): void {
|
|||||||
{
|
{
|
||||||
label: contact.string.Contacts,
|
label: contact.string.Contacts,
|
||||||
icon: contact.icon.ContactApplication,
|
icon: contact.icon.ContactApplication,
|
||||||
|
alias: contactId,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
component: contact.component.Contacts
|
component: contact.component.Contacts
|
||||||
},
|
},
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
import { Employee } from '@anticrm/contact'
|
import { Employee } from '@anticrm/contact'
|
||||||
import { Arr, Class, Domain, DOMAIN_MODEL, IndexKind, Markup, Ref, Timestamp } from '@anticrm/core'
|
import { Arr, Class, Domain, DOMAIN_MODEL, IndexKind, Markup, Ref, Timestamp } from '@anticrm/core'
|
||||||
import type { Department, DepartmentMember, Request, RequestType, Staff } from '@anticrm/hr'
|
import { Department, DepartmentMember, hrId, Request, RequestType, Staff } from '@anticrm/hr'
|
||||||
import {
|
import {
|
||||||
ArrOf,
|
ArrOf,
|
||||||
Builder,
|
Builder,
|
||||||
@ -139,6 +139,7 @@ export function createModel (builder: Builder): void {
|
|||||||
{
|
{
|
||||||
label: hr.string.HRApplication,
|
label: hr.string.HRApplication,
|
||||||
icon: hr.icon.HR,
|
icon: hr.icon.HR,
|
||||||
|
alias: hrId,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
navigatorModel: {
|
navigatorModel: {
|
||||||
specials: [
|
specials: [
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import { Domain, IndexKind, Ref } from '@anticrm/core'
|
import { Domain, IndexKind, Ref } from '@anticrm/core'
|
||||||
import type { Category, Product, Variant } from '@anticrm/inventory'
|
import { Category, inventoryId, Product, Variant } from '@anticrm/inventory'
|
||||||
import { Builder, Collection, Index, Model, Prop, TypeRef, TypeString, UX } from '@anticrm/model'
|
import { Builder, Collection, Index, Model, Prop, TypeRef, TypeString, UX } from '@anticrm/model'
|
||||||
import attachment from '@anticrm/model-attachment'
|
import attachment from '@anticrm/model-attachment'
|
||||||
import core, { TAttachedDoc } from '@anticrm/model-core'
|
import core, { TAttachedDoc } from '@anticrm/model-core'
|
||||||
@ -114,6 +114,7 @@ export function createModel (builder: Builder): void {
|
|||||||
{
|
{
|
||||||
label: inventory.string.Inventory,
|
label: inventory.string.Inventory,
|
||||||
icon: inventory.icon.InventoryApplication,
|
icon: inventory.icon.InventoryApplication,
|
||||||
|
alias: inventoryId,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
navigatorModel: {
|
navigatorModel: {
|
||||||
specials: [
|
specials: [
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
// To help typescript locate view plugin properly
|
// To help typescript locate view plugin properly
|
||||||
import type { Employee } from '@anticrm/contact'
|
import type { Employee } from '@anticrm/contact'
|
||||||
import { Class, Doc, FindOptions, IndexKind, Ref } from '@anticrm/core'
|
import { Class, Doc, FindOptions, IndexKind, Ref } from '@anticrm/core'
|
||||||
import type { Customer, Funnel, Lead } from '@anticrm/lead'
|
import { Customer, Funnel, Lead, leadId } from '@anticrm/lead'
|
||||||
import { Builder, Collection, Index, Mixin, Model, Prop, TypeRef, TypeString, TypeMarkup, UX } from '@anticrm/model'
|
import { Builder, Collection, Index, Mixin, Model, Prop, TypeRef, TypeString, TypeMarkup, UX } from '@anticrm/model'
|
||||||
import attachment from '@anticrm/model-attachment'
|
import attachment from '@anticrm/model-attachment'
|
||||||
import chunter from '@anticrm/model-chunter'
|
import chunter from '@anticrm/model-chunter'
|
||||||
@ -24,7 +24,7 @@ import contact, { TContact } from '@anticrm/model-contact'
|
|||||||
import core from '@anticrm/model-core'
|
import core from '@anticrm/model-core'
|
||||||
import task, { actionTemplates, TSpaceWithStates, TTask } from '@anticrm/model-task'
|
import task, { actionTemplates, TSpaceWithStates, TTask } from '@anticrm/model-task'
|
||||||
import view, { createAction, actionTemplates as viewTemplates } from '@anticrm/model-view'
|
import view, { createAction, actionTemplates as viewTemplates } from '@anticrm/model-view'
|
||||||
import workbench, { Application } from '@anticrm/model-workbench'
|
import workbench from '@anticrm/model-workbench'
|
||||||
import setting from '@anticrm/setting'
|
import setting from '@anticrm/setting'
|
||||||
import lead from './plugin'
|
import lead from './plugin'
|
||||||
|
|
||||||
@ -101,6 +101,7 @@ export function createModel (builder: Builder): void {
|
|||||||
{
|
{
|
||||||
label: lead.string.LeadApplication,
|
label: lead.string.LeadApplication,
|
||||||
icon: lead.icon.LeadApplication,
|
icon: lead.icon.LeadApplication,
|
||||||
|
alias: leadId,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
navigatorModel: {
|
navigatorModel: {
|
||||||
specials: [
|
specials: [
|
||||||
@ -262,7 +263,7 @@ export function createModel (builder: Builder): void {
|
|||||||
action: workbench.actionImpl.Navigate,
|
action: workbench.actionImpl.Navigate,
|
||||||
actionProps: {
|
actionProps: {
|
||||||
mode: 'app',
|
mode: 'app',
|
||||||
application: lead.app.Lead as Ref<Application>
|
application: leadId
|
||||||
},
|
},
|
||||||
label: lead.string.GotoLeadApplication,
|
label: lead.string.GotoLeadApplication,
|
||||||
icon: view.icon.ArrowRight,
|
icon: view.icon.ArrowRight,
|
||||||
|
@ -40,7 +40,7 @@ import task, { TSpaceWithStates, TTask, actionTemplates } from '@anticrm/model-t
|
|||||||
import view, { createAction, actionTemplates as viewTemplates } from '@anticrm/model-view'
|
import view, { createAction, actionTemplates as viewTemplates } from '@anticrm/model-view'
|
||||||
import workbench, { Application, createNavigateAction } from '@anticrm/model-workbench'
|
import workbench, { Application, createNavigateAction } from '@anticrm/model-workbench'
|
||||||
import { IntlString } from '@anticrm/platform'
|
import { IntlString } from '@anticrm/platform'
|
||||||
import { Applicant, Candidate, Candidates, Vacancy } from '@anticrm/recruit'
|
import { Applicant, Candidate, Candidates, recruitId, Vacancy } from '@anticrm/recruit'
|
||||||
import { KeyBinding } from '@anticrm/view'
|
import { KeyBinding } from '@anticrm/view'
|
||||||
import setting from '@anticrm/setting'
|
import setting from '@anticrm/setting'
|
||||||
import recruit from './plugin'
|
import recruit from './plugin'
|
||||||
@ -161,6 +161,7 @@ export function createModel (builder: Builder): void {
|
|||||||
{
|
{
|
||||||
label: recruit.string.RecruitApplication,
|
label: recruit.string.RecruitApplication,
|
||||||
icon: recruit.icon.RecruitApplication,
|
icon: recruit.icon.RecruitApplication,
|
||||||
|
alias: recruitId,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
navigatorModel: {
|
navigatorModel: {
|
||||||
spaces: [],
|
spaces: [],
|
||||||
@ -571,8 +572,8 @@ export function createModel (builder: Builder): void {
|
|||||||
})
|
})
|
||||||
|
|
||||||
function createGotoSpecialAction (builder: Builder, id: string, key: KeyBinding, label: IntlString): void {
|
function createGotoSpecialAction (builder: Builder, id: string, key: KeyBinding, label: IntlString): void {
|
||||||
createNavigateAction(builder, key, label, {
|
createNavigateAction(builder, key, label, recruit.app.Recruit as Ref<Application>, {
|
||||||
application: recruit.app.Recruit as Ref<Application>,
|
application: recruitId,
|
||||||
mode: 'special',
|
mode: 'special',
|
||||||
special: id
|
special: id
|
||||||
})
|
})
|
||||||
@ -588,7 +589,7 @@ export function createModel (builder: Builder): void {
|
|||||||
action: workbench.actionImpl.Navigate,
|
action: workbench.actionImpl.Navigate,
|
||||||
actionProps: {
|
actionProps: {
|
||||||
mode: 'app',
|
mode: 'app',
|
||||||
application: recruit.app.Recruit as Ref<Application>,
|
application: recruitId,
|
||||||
special: talentsId
|
special: talentsId
|
||||||
},
|
},
|
||||||
label: recruit.string.GotoRecruitApplication,
|
label: recruit.string.GotoRecruitApplication,
|
||||||
|
@ -17,7 +17,7 @@ import { Builder, Mixin, Model } from '@anticrm/model'
|
|||||||
import { Ref, Domain, DOMAIN_MODEL } from '@anticrm/core'
|
import { Ref, Domain, DOMAIN_MODEL } from '@anticrm/core'
|
||||||
import core, { TClass, TDoc } from '@anticrm/model-core'
|
import core, { TClass, TDoc } from '@anticrm/model-core'
|
||||||
import setting from './plugin'
|
import setting from './plugin'
|
||||||
import type { Editable, Integration, IntegrationType, Handler, SettingsCategory } from '@anticrm/setting'
|
import { Editable, Integration, IntegrationType, Handler, SettingsCategory, settingId } from '@anticrm/setting'
|
||||||
import type { Asset, IntlString } from '@anticrm/platform'
|
import type { Asset, IntlString } from '@anticrm/platform'
|
||||||
import task from '@anticrm/task'
|
import task from '@anticrm/task'
|
||||||
import activity from '@anticrm/activity'
|
import activity from '@anticrm/activity'
|
||||||
@ -186,6 +186,7 @@ export function createModel (builder: Builder): void {
|
|||||||
{
|
{
|
||||||
label: setting.string.Setting,
|
label: setting.string.Setting,
|
||||||
icon: setting.icon.Setting,
|
icon: setting.icon.Setting,
|
||||||
|
alias: settingId,
|
||||||
hidden: true,
|
hidden: true,
|
||||||
component: setting.component.Settings
|
component: setting.component.Settings
|
||||||
},
|
},
|
||||||
|
@ -49,7 +49,8 @@ import {
|
|||||||
IssueStatusCategory,
|
IssueStatusCategory,
|
||||||
Project,
|
Project,
|
||||||
ProjectStatus,
|
ProjectStatus,
|
||||||
Team
|
Team,
|
||||||
|
trackerId
|
||||||
} from '@anticrm/tracker'
|
} from '@anticrm/tracker'
|
||||||
import { KeyBinding } from '@anticrm/view'
|
import { KeyBinding } from '@anticrm/view'
|
||||||
import tags from '@anticrm/tags'
|
import tags from '@anticrm/tags'
|
||||||
@ -450,6 +451,7 @@ export function createModel (builder: Builder): void {
|
|||||||
{
|
{
|
||||||
label: tracker.string.TrackerApplication,
|
label: tracker.string.TrackerApplication,
|
||||||
icon: tracker.icon.TrackerApplication,
|
icon: tracker.icon.TrackerApplication,
|
||||||
|
alias: trackerId,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
navigatorModel: {
|
navigatorModel: {
|
||||||
specials: [
|
specials: [
|
||||||
@ -527,8 +529,8 @@ export function createModel (builder: Builder): void {
|
|||||||
)
|
)
|
||||||
|
|
||||||
function createGotoSpecialAction (builder: Builder, id: string, key: KeyBinding, label: IntlString): void {
|
function createGotoSpecialAction (builder: Builder, id: string, key: KeyBinding, label: IntlString): void {
|
||||||
createNavigateAction(builder, key, label, {
|
createNavigateAction(builder, key, label, tracker.app.Tracker, {
|
||||||
application: tracker.app.Tracker,
|
application: trackerId,
|
||||||
mode: 'space',
|
mode: 'space',
|
||||||
spaceSpecial: id,
|
spaceSpecial: id,
|
||||||
spaceClass: tracker.class.Team
|
spaceClass: tracker.class.Team
|
||||||
@ -545,7 +547,7 @@ export function createModel (builder: Builder): void {
|
|||||||
action: workbench.actionImpl.Navigate,
|
action: workbench.actionImpl.Navigate,
|
||||||
actionProps: {
|
actionProps: {
|
||||||
mode: 'app',
|
mode: 'app',
|
||||||
application: tracker.app.Tracker
|
application: trackerId
|
||||||
},
|
},
|
||||||
label: tracker.string.GotoTrackerApplication,
|
label: tracker.string.GotoTrackerApplication,
|
||||||
icon: view.icon.ArrowRight,
|
icon: view.icon.ArrowRight,
|
||||||
|
@ -30,6 +30,7 @@ export { Application }
|
|||||||
export class TApplication extends TDoc implements Application {
|
export class TApplication extends TDoc implements Application {
|
||||||
label!: IntlString
|
label!: IntlString
|
||||||
icon!: Asset
|
icon!: Asset
|
||||||
|
alias!: string
|
||||||
hidden!: boolean
|
hidden!: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,9 +52,10 @@ export function createNavigateAction (
|
|||||||
builder: Builder,
|
builder: Builder,
|
||||||
key: KeyBinding,
|
key: KeyBinding,
|
||||||
label: IntlString,
|
label: IntlString,
|
||||||
config: {
|
application: Ref<Application>,
|
||||||
|
props: {
|
||||||
mode: 'app' | 'special' | 'space'
|
mode: 'app' | 'special' | 'space'
|
||||||
application: Ref<Application>
|
application?: string
|
||||||
special?: string
|
special?: string
|
||||||
space?: Ref<Space>
|
space?: Ref<Space>
|
||||||
spaceClass?: Ref<Class<Space>>
|
spaceClass?: Ref<Class<Space>>
|
||||||
@ -62,7 +64,7 @@ export function createNavigateAction (
|
|||||||
): void {
|
): void {
|
||||||
createAction(builder, {
|
createAction(builder, {
|
||||||
action: workbench.actionImpl.Navigate,
|
action: workbench.actionImpl.Navigate,
|
||||||
actionProps: config,
|
actionProps: props,
|
||||||
label,
|
label,
|
||||||
icon: view.icon.ArrowRight,
|
icon: view.icon.ArrowRight,
|
||||||
keyBinding: [key],
|
keyBinding: [key],
|
||||||
@ -71,7 +73,7 @@ export function createNavigateAction (
|
|||||||
target: core.class.Doc,
|
target: core.class.Doc,
|
||||||
context: {
|
context: {
|
||||||
mode: ['workbench', 'browser', 'editor', 'panel', 'popup'],
|
mode: ['workbench', 'browser', 'editor', 'panel', 'popup'],
|
||||||
application: config.application
|
application
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { ChunterMessage } from '@anticrm/chunter'
|
import { chunterId, ChunterMessage } from '@anticrm/chunter'
|
||||||
import contact, { EmployeeAccount, formatName } from '@anticrm/contact'
|
import contact, { EmployeeAccount, formatName } from '@anticrm/contact'
|
||||||
import { Account, Class, Client, Obj, Ref, Space, getCurrentAccount, Timestamp } from '@anticrm/core'
|
import { Account, Class, Client, Obj, Ref, Space, getCurrentAccount, Timestamp } from '@anticrm/core'
|
||||||
import { Asset } from '@anticrm/platform'
|
import { Asset } from '@anticrm/platform'
|
||||||
@ -58,7 +58,7 @@ export async function getDmName (client: Client, dm: Space): Promise<string> {
|
|||||||
export function getSpaceLink (id: Ref<Space>): string {
|
export function getSpaceLink (id: Ref<Space>): string {
|
||||||
const loc = getCurrentLocation()
|
const loc = getCurrentLocation()
|
||||||
|
|
||||||
loc.path[1] = chunter.app.Chunter
|
loc.path[1] = chunterId
|
||||||
loc.path[2] = id
|
loc.path[2] = id
|
||||||
loc.path.length = 3
|
loc.path.length = 3
|
||||||
loc.fragment = undefined
|
loc.fragment = undefined
|
||||||
|
@ -28,6 +28,7 @@ import core, {
|
|||||||
TxResult,
|
TxResult,
|
||||||
WithLookup
|
WithLookup
|
||||||
} from '@anticrm/core'
|
} from '@anticrm/core'
|
||||||
|
import { devModelId } from '@anticrm/devmodel'
|
||||||
import { Builder } from '@anticrm/model'
|
import { Builder } from '@anticrm/model'
|
||||||
import { getMetadata, IntlString, Resources } from '@anticrm/platform'
|
import { getMetadata, IntlString, Resources } from '@anticrm/platform'
|
||||||
import view from '@anticrm/view'
|
import view from '@anticrm/view'
|
||||||
@ -155,6 +156,7 @@ export async function Hook (client: Client): Promise<Client> {
|
|||||||
{
|
{
|
||||||
label: 'DevModel' as IntlString,
|
label: 'DevModel' as IntlString,
|
||||||
icon: view.icon.Model,
|
icon: view.icon.Model,
|
||||||
|
alias: devModelId,
|
||||||
hidden: false,
|
hidden: false,
|
||||||
navigatorModel: {
|
navigatorModel: {
|
||||||
spaces: [],
|
spaces: [],
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import { getCurrentAccount } from '@anticrm/core'
|
import { getCurrentAccount } from '@anticrm/core'
|
||||||
import login from '@anticrm/login'
|
import login from '@anticrm/login'
|
||||||
import { Avatar, createQuery } from '@anticrm/presentation'
|
import { Avatar, createQuery } from '@anticrm/presentation'
|
||||||
import setting, { SettingsCategory } from '@anticrm/setting'
|
import setting, { SettingsCategory, settingId } from '@anticrm/setting'
|
||||||
import { closePopup, getCurrentLocation, Icon, Label, navigate, setMetadataLocalStorage } from '@anticrm/ui'
|
import { closePopup, getCurrentLocation, Icon, Label, navigate, setMetadataLocalStorage } from '@anticrm/ui'
|
||||||
|
|
||||||
// const client = getClient()
|
// const client = getClient()
|
||||||
@ -43,7 +43,7 @@
|
|||||||
function selectCategory (sp: SettingsCategory): void {
|
function selectCategory (sp: SettingsCategory): void {
|
||||||
closePopup()
|
closePopup()
|
||||||
const loc = getCurrentLocation()
|
const loc = getCurrentLocation()
|
||||||
loc.path[1] = setting.ids.SettingApp
|
loc.path[1] = settingId
|
||||||
loc.path[2] = sp.name
|
loc.path[2] = sp.name
|
||||||
loc.path.length = 3
|
loc.path.length = 3
|
||||||
navigate(loc)
|
navigate(loc)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Class, Doc, Ref } from '@anticrm/core'
|
import { Class, Doc, Ref } from '@anticrm/core'
|
||||||
import { AttributesBar, getClient, KeyedAttribute } from '@anticrm/presentation'
|
import { AttributesBar, getClient, KeyedAttribute } from '@anticrm/presentation'
|
||||||
import setting from '@anticrm/setting'
|
import setting, { settingId } from '@anticrm/setting'
|
||||||
import { Button, getCurrentLocation, Label, navigate, Tooltip } from '@anticrm/ui'
|
import { Button, getCurrentLocation, Label, navigate, Tooltip } from '@anticrm/ui'
|
||||||
import { getFiltredKeys, isCollectionAttr } from '../utils'
|
import { getFiltredKeys, isCollectionAttr } from '../utils'
|
||||||
|
|
||||||
@ -65,7 +65,7 @@
|
|||||||
on:click={(ev) => {
|
on:click={(ev) => {
|
||||||
ev.stopPropagation()
|
ev.stopPropagation()
|
||||||
const loc = getCurrentLocation()
|
const loc = getCurrentLocation()
|
||||||
loc.path[1] = setting.ids.SettingApp
|
loc.path[1] = settingId
|
||||||
loc.path[2] = 'classes'
|
loc.path[2] = 'classes'
|
||||||
loc.path.length = 3
|
loc.path.length = 3
|
||||||
loc.query = { _class }
|
loc.query = { _class }
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
import { getCurrentAccount } from '@anticrm/core'
|
import { getCurrentAccount } from '@anticrm/core'
|
||||||
import login from '@anticrm/login'
|
import login from '@anticrm/login'
|
||||||
import { Avatar, createQuery, getClient } from '@anticrm/presentation'
|
import { Avatar, createQuery, getClient } from '@anticrm/presentation'
|
||||||
import setting, { SettingsCategory } from '@anticrm/setting'
|
import setting, { SettingsCategory, settingId } from '@anticrm/setting'
|
||||||
import {
|
import {
|
||||||
closePanel,
|
closePanel,
|
||||||
closePopup,
|
closePopup,
|
||||||
@ -57,7 +57,7 @@
|
|||||||
closePopup()
|
closePopup()
|
||||||
closePanel()
|
closePanel()
|
||||||
const loc = getCurrentLocation()
|
const loc = getCurrentLocation()
|
||||||
loc.path[1] = setting.ids.SettingApp
|
loc.path[1] = settingId
|
||||||
loc.path[2] = sp.name
|
loc.path[2] = sp.name
|
||||||
loc.path.length = 3
|
loc.path.length = 3
|
||||||
navigate(loc)
|
navigate(loc)
|
||||||
@ -91,7 +91,7 @@
|
|||||||
|
|
||||||
function getURLCategory (sp: SettingsCategory): string {
|
function getURLCategory (sp: SettingsCategory): string {
|
||||||
const loc = getCurrentLocation()
|
const loc = getCurrentLocation()
|
||||||
loc.path[1] = setting.ids.SettingApp
|
loc.path[1] = settingId
|
||||||
loc.path[2] = sp.name
|
loc.path[2] = sp.name
|
||||||
loc.path.length = 3
|
loc.path.length = 3
|
||||||
return locationToUrl(loc)
|
return locationToUrl(loc)
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
setClient(client)
|
setClient(client)
|
||||||
NotificationClientImpl.getClient()
|
NotificationClientImpl.getClient()
|
||||||
|
|
||||||
let currentApp: Ref<Application> | undefined
|
let currentAppAlias: string | undefined
|
||||||
let currentSpace: Ref<Space> | undefined
|
let currentSpace: Ref<Space> | undefined
|
||||||
let currentSpecial: string | undefined
|
let currentSpecial: string | undefined
|
||||||
let specialComponent: SpecialNavModel | undefined
|
let specialComponent: SpecialNavModel | undefined
|
||||||
@ -158,14 +158,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function syncLoc (loc: Location): Promise<void> {
|
async function syncLoc (loc: Location): Promise<void> {
|
||||||
const app = loc.path.length > 1 ? (loc.path[1] as Ref<Application>) : undefined
|
const app = loc.path.length > 1 ? loc.path[1] : undefined
|
||||||
const space = loc.path.length > 2 ? (loc.path[2] as Ref<Space>) : undefined
|
const space = loc.path.length > 2 ? (loc.path[2] as Ref<Space>) : undefined
|
||||||
const special = loc.path.length > 3 ? loc.path[3] : undefined
|
const special = loc.path.length > 3 ? loc.path[3] : undefined
|
||||||
|
|
||||||
if (currentApp !== app) {
|
if (currentAppAlias !== app) {
|
||||||
clear(1)
|
clear(1)
|
||||||
currentApp = app
|
currentAppAlias = app
|
||||||
currentApplication = await client.findOne(workbench.class.Application, { _id: currentApp })
|
currentApplication = await client.findOne(workbench.class.Application, { alias: app })
|
||||||
navigatorModel = currentApplication?.navigatorModel
|
navigatorModel = currentApplication?.navigatorModel
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,7 +206,7 @@
|
|||||||
function clear (level: number): void {
|
function clear (level: number): void {
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case 1:
|
case 1:
|
||||||
currentApp = undefined
|
currentAppAlias = undefined
|
||||||
currentApplication = undefined
|
currentApplication = undefined
|
||||||
navigatorModel = undefined
|
navigatorModel = undefined
|
||||||
// eslint-disable-next-line no-fallthrough
|
// eslint-disable-next-line no-fallthrough
|
||||||
@ -227,7 +227,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function navigateApp (app: Application): void {
|
function navigateApp (app: Application): void {
|
||||||
if (currentApp === app._id) {
|
if (currentAppAlias === app.alias) {
|
||||||
// Nothing to do.
|
// Nothing to do.
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -235,7 +235,7 @@
|
|||||||
|
|
||||||
doNavigate([], undefined, {
|
doNavigate([], undefined, {
|
||||||
mode: 'app',
|
mode: 'app',
|
||||||
application: app._id
|
application: app.alias
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -395,7 +395,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<Applications
|
<Applications
|
||||||
{apps}
|
{apps}
|
||||||
active={currentApp}
|
active={currentApplication?._id}
|
||||||
on:active={(evt) => {
|
on:active={(evt) => {
|
||||||
navigateApp(evt.detail)
|
navigateApp(evt.detail)
|
||||||
}}
|
}}
|
||||||
|
@ -18,7 +18,7 @@ import type { Class, Client, Doc, Obj, Ref, Space } from '@anticrm/core'
|
|||||||
import core from '@anticrm/core'
|
import core from '@anticrm/core'
|
||||||
import type { Asset } from '@anticrm/platform'
|
import type { Asset } from '@anticrm/platform'
|
||||||
import { getResource } from '@anticrm/platform'
|
import { getResource } from '@anticrm/platform'
|
||||||
import { Application, NavigatorModel } from '@anticrm/workbench'
|
import { NavigatorModel } from '@anticrm/workbench'
|
||||||
import view from '@anticrm/view'
|
import view from '@anticrm/view'
|
||||||
import { closePanel, getCurrentLocation, navigate } from '@anticrm/ui'
|
import { closePanel, getCurrentLocation, navigate } from '@anticrm/ui'
|
||||||
import { getClient } from '@anticrm/presentation'
|
import { getClient } from '@anticrm/presentation'
|
||||||
@ -57,7 +57,7 @@ export async function doNavigate (
|
|||||||
evt: Event | undefined,
|
evt: Event | undefined,
|
||||||
props: {
|
props: {
|
||||||
mode: 'app' | 'special' | 'space'
|
mode: 'app' | 'special' | 'space'
|
||||||
application?: Ref<Application>
|
application?: string
|
||||||
special?: string
|
special?: string
|
||||||
spaceSpecial?: string
|
spaceSpecial?: string
|
||||||
space?: Ref<Space>
|
space?: Ref<Space>
|
||||||
|
@ -24,6 +24,7 @@ import { ViewAction } from '@anticrm/view'
|
|||||||
*/
|
*/
|
||||||
export interface Application extends Doc {
|
export interface Application extends Doc {
|
||||||
label: IntlString
|
label: IntlString
|
||||||
|
alias: string
|
||||||
icon: Asset
|
icon: Asset
|
||||||
hidden: boolean
|
hidden: boolean
|
||||||
navigatorModel?: NavigatorModel
|
navigatorModel?: NavigatorModel
|
||||||
@ -119,7 +120,7 @@ export default plugin(workbenchId, {
|
|||||||
actionImpl: {
|
actionImpl: {
|
||||||
Navigate: '' as ViewAction<{
|
Navigate: '' as ViewAction<{
|
||||||
mode: 'app' | 'special' | 'space'
|
mode: 'app' | 'special' | 'space'
|
||||||
application?: Ref<Application>
|
application?: string
|
||||||
special?: string
|
special?: string
|
||||||
space?: Ref<Space>
|
space?: Ref<Space>
|
||||||
// If no space is selected, select first space from list
|
// If no space is selected, select first space from list
|
||||||
|
@ -14,7 +14,7 @@ test.describe('actions tests', () => {
|
|||||||
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||||
|
|
||||||
await page.click('text=Talents')
|
await page.click('text=Talents')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/talents`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/talents`)
|
||||||
|
|
||||||
await page.click('td:has-text("Frontend Engineer")')
|
await page.click('td:has-text("Frontend Engineer")')
|
||||||
|
|
||||||
@ -29,30 +29,26 @@ test.describe('actions tests', () => {
|
|||||||
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||||
|
|
||||||
await page.click('text=Talents')
|
await page.click('text=Talents')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/talents`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/talents`)
|
||||||
|
|
||||||
await page.press('body', 'Meta+k')
|
await page.press('body', 'Meta+k')
|
||||||
await page.fill('[placeholder="type\\ to\\ filter\\.\\.\\."]', 'go to')
|
await page.fill('[placeholder="type\\ to\\ filter\\.\\.\\."]', 'go to')
|
||||||
expect(await page.locator('div.selectPopup :text("Go To Vacancies")').count()).toBe(1)
|
expect(await page.locator('div.selectPopup :text("Go To Vacancies")').count()).toBe(1)
|
||||||
await page.click('div.selectPopup :text("Go To Vacancies")')
|
await page.click('div.selectPopup :text("Go To Vacancies")')
|
||||||
|
|
||||||
await expect(page).toHaveURL(
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/vacancies`)
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/vacancies`
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
test('action-switch-applications', async ({ page }) => {
|
test('action-switch-applications', async ({ page }) => {
|
||||||
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||||
|
|
||||||
await page.click('text=Talents')
|
await page.click('text=Talents')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/talents`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/talents`)
|
||||||
|
|
||||||
await page.press('body', 'Meta+k')
|
await page.press('body', 'Meta+k')
|
||||||
await page.fill('[placeholder="type\\ to\\ filter\\.\\.\\."]', 'go to')
|
await page.fill('[placeholder="type\\ to\\ filter\\.\\.\\."]', 'go to')
|
||||||
expect(await page.locator('div.selectPopup :text("Go To Applications")').count()).toBe(1)
|
expect(await page.locator('div.selectPopup :text("Go To Applications")').count()).toBe(1)
|
||||||
await page.click('div.selectPopup :text("Go To Applications")')
|
await page.click('div.selectPopup :text("Go To Applications")')
|
||||||
|
|
||||||
await expect(page).toHaveURL(
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/candidates`)
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/candidates`
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -17,14 +17,10 @@ test.describe('contact tests', () => {
|
|||||||
await page.click('.antiPopup-submenu >> text=Settings')
|
await page.click('.antiPopup-submenu >> text=Settings')
|
||||||
// Click button:has-text("Setting")
|
// Click button:has-text("Setting")
|
||||||
await page.click('button:has-text("Setting")')
|
await page.click('button:has-text("Setting")')
|
||||||
await expect(page).toHaveURL(
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting/setting`)
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting%3Aids%3ASettingApp/setting`
|
|
||||||
)
|
|
||||||
// Click text=Edit profile
|
// Click text=Edit profile
|
||||||
await page.click('text=Edit profile')
|
await page.click('text=Edit profile')
|
||||||
await expect(page).toHaveURL(
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting/profile`)
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting%3Aids%3ASettingApp/profile`
|
|
||||||
)
|
|
||||||
// Click [placeholder="Location"]
|
// Click [placeholder="Location"]
|
||||||
await page.click('[placeholder="Location"]')
|
await page.click('[placeholder="Location"]')
|
||||||
// Fill [placeholder="Location"]
|
// Fill [placeholder="Location"]
|
||||||
@ -50,11 +46,9 @@ test.describe('contact tests', () => {
|
|||||||
await page.click('.antiPopup-submenu >> text=Settings')
|
await page.click('.antiPopup-submenu >> text=Settings')
|
||||||
// Click button:has-text("Templates")
|
// Click button:has-text("Templates")
|
||||||
await page.click('button:has-text("Templates")')
|
await page.click('button:has-text("Templates")')
|
||||||
await expect(page).toHaveURL(
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting/message-templates`)
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting%3Aids%3ASettingApp/message-templates`
|
// Go to http://localhost:8083/workbench%3Acomponent%3AWorkbenchApp/setting/message-templates
|
||||||
)
|
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting/message-templates`)
|
||||||
// Go to http://localhost:8083/workbench%3Acomponent%3AWorkbenchApp/setting%3Aids%3ASettingApp/message-templates
|
|
||||||
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting%3Aids%3ASettingApp/message-templates`)
|
|
||||||
// Click .flex-center.icon-button
|
// Click .flex-center.icon-button
|
||||||
await page.click('#create-template >> .flex-center.icon-button')
|
await page.click('#create-template >> .flex-center.icon-button')
|
||||||
// Click [placeholder="New\ template"]
|
// Click [placeholder="New\ template"]
|
||||||
@ -85,9 +79,7 @@ test.describe('contact tests', () => {
|
|||||||
await page.click('.antiPopup-submenu >> text=Settings')
|
await page.click('.antiPopup-submenu >> text=Settings')
|
||||||
// Click button:has-text("Manage Statuses")
|
// Click button:has-text("Manage Statuses")
|
||||||
await page.click('button:has-text("Manage Statuses")')
|
await page.click('button:has-text("Manage Statuses")')
|
||||||
await expect(page).toHaveURL(
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting/statuses`)
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting%3Aids%3ASettingApp/statuses`
|
|
||||||
)
|
|
||||||
// Click text=Vacancies
|
// Click text=Vacancies
|
||||||
await page.click('text=Vacancies')
|
await page.click('text=Vacancies')
|
||||||
// Click #create-template div
|
// Click #create-template div
|
||||||
|
@ -15,10 +15,10 @@ test.describe('recruit tests', () => {
|
|||||||
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp`)
|
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp`)
|
||||||
// Click [id="app-recruit\:string\:RecruitApplication"]
|
// Click [id="app-recruit\:string\:RecruitApplication"]
|
||||||
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit`)
|
||||||
// Click text=Talents
|
// Click text=Talents
|
||||||
await page.click('text=Talents')
|
await page.click('text=Talents')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/talents`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/talents`)
|
||||||
// Click button:has-text("Talent")
|
// Click button:has-text("Talent")
|
||||||
await page.click('button:has-text("Talent")')
|
await page.click('button:has-text("Talent")')
|
||||||
// Fill [placeholder="John"]
|
// Fill [placeholder="John"]
|
||||||
@ -50,10 +50,10 @@ test.describe('recruit tests', () => {
|
|||||||
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp`)
|
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp`)
|
||||||
// Click [id="app-recruit\:string\:RecruitApplication"]
|
// Click [id="app-recruit\:string\:RecruitApplication"]
|
||||||
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit`)
|
||||||
// Click text=Skills
|
// Click text=Skills
|
||||||
await page.click('text=Skills')
|
await page.click('text=Skills')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/skills`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/skills`)
|
||||||
// Click button:has-text("Skill")
|
// Click button:has-text("Skill")
|
||||||
await page.click('button:has-text("Skill")')
|
await page.click('button:has-text("Skill")')
|
||||||
// Click [placeholder="Please\ type\ skill\ title"]
|
// Click [placeholder="Please\ type\ skill\ title"]
|
||||||
@ -76,7 +76,7 @@ test.describe('recruit tests', () => {
|
|||||||
await page.click('button:has-text("Create")')
|
await page.click('button:has-text("Create")')
|
||||||
// Click text=Talents
|
// Click text=Talents
|
||||||
await page.click('text=Talents')
|
await page.click('text=Talents')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/talents`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/talents`)
|
||||||
// Click button:has-text("Talent")
|
// Click button:has-text("Talent")
|
||||||
await page.click('button:has-text("Talent")')
|
await page.click('button:has-text("Talent")')
|
||||||
// Click #add-tag div div
|
// Click #add-tag div div
|
||||||
|
@ -16,7 +16,7 @@ test.describe('project tests', () => {
|
|||||||
// Click text=Projects
|
// Click text=Projects
|
||||||
await page.click('text=Projects')
|
await page.click('text=Projects')
|
||||||
await expect(page).toHaveURL(
|
await expect(page).toHaveURL(
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/tracker%3Aapp%3ATracker/tracker%3Ateam%3ADefaultTeam/projects`
|
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/tracker/tracker%3Ateam%3ADefaultTeam/projects`
|
||||||
)
|
)
|
||||||
await page.click('button:has-text("Project")')
|
await page.click('button:has-text("Project")')
|
||||||
await page.click('[placeholder="Project\\ name"]')
|
await page.click('[placeholder="Project\\ name"]')
|
||||||
@ -39,7 +39,7 @@ test.describe('project tests', () => {
|
|||||||
await page.click('[id="app-tracker\\:string\\:TrackerApplication"]')
|
await page.click('[id="app-tracker\\:string\\:TrackerApplication"]')
|
||||||
await page.click('text=Projects')
|
await page.click('text=Projects')
|
||||||
await expect(page).toHaveURL(
|
await expect(page).toHaveURL(
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/tracker%3Aapp%3ATracker/tracker%3Ateam%3ADefaultTeam/projects`
|
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/tracker/tracker%3Ateam%3ADefaultTeam/projects`
|
||||||
)
|
)
|
||||||
await page.click('button:has-text("Project")')
|
await page.click('button:has-text("Project")')
|
||||||
const prjId = 'project-' + generateId()
|
const prjId = 'project-' + generateId()
|
||||||
|
@ -7,7 +7,7 @@ test.use({
|
|||||||
async function navigate (page: Page): Promise<void> {
|
async function navigate (page: Page): Promise<void> {
|
||||||
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp`)
|
await page.goto(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp`)
|
||||||
await page.click('[id="app-tracker\\:string\\:TrackerApplication"]')
|
await page.click('[id="app-tracker\\:string\\:TrackerApplication"]')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/tracker%3Aapp%3ATracker`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/tracker`)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IssueProps {
|
interface IssueProps {
|
||||||
|
@ -12,27 +12,23 @@ test.describe('workbench tests', () => {
|
|||||||
test('navigator', async ({ page }) => {
|
test('navigator', async ({ page }) => {
|
||||||
// Click [id="app-recruit\:string\:RecruitApplication"]
|
// Click [id="app-recruit\:string\:RecruitApplication"]
|
||||||
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
await page.click('[id="app-recruit\\:string\\:RecruitApplication"]')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit`)
|
||||||
// Click text=Applications
|
// Click text=Applications
|
||||||
await page.click('text=Applications')
|
await page.click('text=Applications')
|
||||||
await expect(page).toHaveURL(
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/candidates`)
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/candidates`
|
|
||||||
)
|
|
||||||
// Click text=Applications Application >> span
|
// Click text=Applications Application >> span
|
||||||
await expect(page.locator('text=Applications Filter')).toBeVisible()
|
await expect(page.locator('text=Applications Filter')).toBeVisible()
|
||||||
await expect(page.locator('text="APP-1')).toBeDefined()
|
await expect(page.locator('text="APP-1')).toBeDefined()
|
||||||
|
|
||||||
// Click text=Talents
|
// Click text=Talents
|
||||||
await page.click('text=Talents')
|
await page.click('text=Talents')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/talents`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/talents`)
|
||||||
|
|
||||||
await expect(page.locator('text=Andrey P.')).toBeVisible()
|
await expect(page.locator('text=Andrey P.')).toBeVisible()
|
||||||
|
|
||||||
// Click text=Vacancies
|
// Click text=Vacancies
|
||||||
await page.click('text=Vacancies')
|
await page.click('text=Vacancies')
|
||||||
await expect(page).toHaveURL(
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit/vacancies`)
|
||||||
`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/recruit%3Aapp%3ARecruit/vacancies`
|
|
||||||
)
|
|
||||||
// Click text=Software Engineer
|
// Click text=Software Engineer
|
||||||
await page.click('text=Software Engineer')
|
await page.click('text=Software Engineer')
|
||||||
await expect(page.locator('text=Software Engineer')).toBeVisible()
|
await expect(page.locator('text=Software Engineer')).toBeVisible()
|
||||||
@ -42,7 +38,7 @@ test.describe('workbench tests', () => {
|
|||||||
|
|
||||||
// Click [id="app-chunter\:string\:ApplicationLabelChunter"]
|
// Click [id="app-chunter\:string\:ApplicationLabelChunter"]
|
||||||
await page.click('[id="app-chunter\\:string\\:ApplicationLabelChunter"]')
|
await page.click('[id="app-chunter\\:string\\:ApplicationLabelChunter"]')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/chunter%3Aapp%3AChunter`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/chunter`)
|
||||||
|
|
||||||
await page.click('text=general')
|
await page.click('text=general')
|
||||||
|
|
||||||
@ -50,7 +46,7 @@ test.describe('workbench tests', () => {
|
|||||||
await expect(page.locator('.textInput')).toBeVisible()
|
await expect(page.locator('.textInput')).toBeVisible()
|
||||||
|
|
||||||
await page.click('[id="app-contact\\:string\\:Contacts"]')
|
await page.click('[id="app-contact\\:string\\:Contacts"]')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/contact%3Aapp%3AContacts`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/contact`)
|
||||||
// Click text=John Appleseed
|
// Click text=John Appleseed
|
||||||
await expect(page.locator('text=John Appleseed')).toBeVisible()
|
await expect(page.locator('text=John Appleseed')).toBeVisible()
|
||||||
})
|
})
|
||||||
@ -62,7 +58,7 @@ test.describe('workbench tests', () => {
|
|||||||
await page.click('.antiPopup-submenu >> text=Settings')
|
await page.click('.antiPopup-submenu >> text=Settings')
|
||||||
// Click button:has-text("Terms")
|
// Click button:has-text("Terms")
|
||||||
await page.click('button:has-text("Terms")')
|
await page.click('button:has-text("Terms")')
|
||||||
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting%3Aids%3ASettingApp/terms`)
|
await expect(page).toHaveURL(`${PlatformURI}/workbench%3Acomponent%3AWorkbenchApp/setting/terms`)
|
||||||
// Click .ac-header
|
// Click .ac-header
|
||||||
await expect(page.locator('.ac-header >> text=Terms')).toBeVisible()
|
await expect(page.locator('.ac-header >> text=Terms')).toBeVisible()
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user