Remove most traces of data-cy attributes

This commit is contained in:
Andrew Kingston 2023-02-01 08:20:46 +00:00
parent 746d08cb70
commit 6e12c3fa3c
51 changed files with 46 additions and 200 deletions

View File

@ -9,7 +9,6 @@
export let longPressable = false export let longPressable = false
export let disabled = false export let disabled = false
export let icon = "" export let icon = ""
export let dataCy = null
export let size = "M" export let size = "M"
export let active = false export let active = false
export let fullWidth = false export let fullWidth = false
@ -37,7 +36,6 @@
</script> </script>
<button <button
data-cy={dataCy}
use:longPress use:longPress
class:spectrum-ActionButton--quiet={quiet} class:spectrum-ActionButton--quiet={quiet}
class:spectrum-ActionButton--emphasized={emphasized} class:spectrum-ActionButton--emphasized={emphasized}

View File

@ -6,7 +6,6 @@
export let disabled = false export let disabled = false
export let align = "left" export let align = "left"
export let portalTarget export let portalTarget
export let dataCy
let anchor let anchor
let dropdown let dropdown
@ -37,7 +36,7 @@
<div use:getAnchor on:click={openMenu}> <div use:getAnchor on:click={openMenu}>
<slot name="control" /> <slot name="control" />
</div> </div>
<Popover bind:this={dropdown} {anchor} {align} {portalTarget} {dataCy}> <Popover bind:this={dropdown} {anchor} {align} {portalTarget}>
<Menu> <Menu>
<slot /> <slot />
</Menu> </Menu>

View File

@ -13,7 +13,6 @@
export let icon = undefined export let icon = undefined
export let active = false export let active = false
export let tooltip = undefined export let tooltip = undefined
export let dataCy
export let newStyles = true export let newStyles = true
export let id export let id
@ -33,7 +32,6 @@
class:disabled class:disabled
class="spectrum-Button spectrum-Button--size{size.toUpperCase()}" class="spectrum-Button spectrum-Button--size{size.toUpperCase()}"
{disabled} {disabled}
data-cy={dataCy}
on:click|preventDefault on:click|preventDefault
on:mouseover={() => (showTooltip = true)} on:mouseover={() => (showTooltip = true)}
on:focus={() => (showTooltip = true)} on:focus={() => (showTooltip = true)}

View File

@ -11,7 +11,6 @@
export let id = null export let id = null
export let readonly = false export let readonly = false
export let updateOnChange = true export let updateOnChange = true
export let dataCy
export let align export let align
export let autofocus = false export let autofocus = false
export let variables export let variables
@ -123,7 +122,6 @@
disabled={hbsValue.length || disabled} disabled={hbsValue.length || disabled}
{readonly} {readonly}
{id} {id}
data-cy={dataCy}
value={hbsValue.length ? `{{ ${hbsValue[0]} }}` : value} value={hbsValue.length ? `{{ ${hbsValue[0]} }}` : value}
placeholder={placeholder || ""} placeholder={placeholder || ""}
on:click on:click

View File

@ -6,7 +6,6 @@
export let id = null export let id = null
export let text = null export let text = null
export let disabled = false export let disabled = false
export let dataCy = null
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const onChange = event => { const onChange = event => {
@ -16,7 +15,6 @@
<div class="spectrum-Switch spectrum-Switch--emphasized"> <div class="spectrum-Switch spectrum-Switch--emphasized">
<input <input
data-cy={dataCy}
checked={value} checked={value}
{disabled} {disabled}
on:change={onChange} on:change={onChange}

View File

@ -11,7 +11,6 @@
export let readonly = false export let readonly = false
export let updateOnChange = true export let updateOnChange = true
export let quiet = false export let quiet = false
export let dataCy
export let align export let align
export let autofocus = false export let autofocus = false
@ -89,7 +88,6 @@
{disabled} {disabled}
{readonly} {readonly}
{id} {id}
data-cy={dataCy}
value={value || ""} value={value || ""}
placeholder={placeholder || ""} placeholder={placeholder || ""}
on:click on:click

View File

@ -13,7 +13,6 @@
export let error = null export let error = null
export let updateOnChange = true export let updateOnChange = true
export let quiet = false export let quiet = false
export let dataCy
export let autofocus export let autofocus
export let variables export let variables
export let showModal export let showModal
@ -28,7 +27,6 @@
<Field {label} {labelPosition} {error}> <Field {label} {labelPosition} {error}>
<EnvDropdown <EnvDropdown
{dataCy}
{updateOnChange} {updateOnChange}
{error} {error}
{disabled} {disabled}

View File

@ -13,7 +13,6 @@
export let error = null export let error = null
export let updateOnChange = true export let updateOnChange = true
export let quiet = false export let quiet = false
export let dataCy
export let autofocus export let autofocus
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
@ -25,7 +24,6 @@
<Field {label} {labelPosition} {error}> <Field {label} {labelPosition} {error}>
<TextField <TextField
{dataCy}
{updateOnChange} {updateOnChange}
{error} {error}
{disabled} {disabled}

View File

@ -14,7 +14,6 @@
export let error = null export let error = null
export let updateOnChange = true export let updateOnChange = true
export let quiet = false export let quiet = false
export let dataCy
export let autofocus export let autofocus
export let options = [] export let options = []
@ -32,7 +31,6 @@
<Field {label} {labelPosition} {error}> <Field {label} {labelPosition} {error}>
<InputDropdown <InputDropdown
{dataCy}
{updateOnChange} {updateOnChange}
{error} {error}
{disabled} {disabled}

View File

@ -21,7 +21,6 @@
export let getSecondaryOptionColour = () => {} export let getSecondaryOptionColour = () => {}
export let getSecondaryOptionIcon = () => {} export let getSecondaryOptionIcon = () => {}
export let quiet = false export let quiet = false
export let dataCy
export let autofocus export let autofocus
export let primaryOptions = [] export let primaryOptions = []
export let secondaryOptions = [] export let secondaryOptions = []
@ -98,7 +97,6 @@
<PickerDropdown <PickerDropdown
{searchTerm} {searchTerm}
{autocomplete} {autocomplete}
{dataCy}
{error} {error}
{disabled} {disabled}
{readonly} {readonly}

View File

@ -9,7 +9,6 @@
export let text = null export let text = null
export let disabled = false export let disabled = false
export let error = null export let error = null
export let dataCy = null
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const onChange = e => { const onChange = e => {
@ -19,5 +18,5 @@
</script> </script>
<Field {label} {labelPosition} {error}> <Field {label} {labelPosition} {error}>
<Switch {dataCy} {error} {disabled} {text} {value} on:change={onChange} /> <Switch {error} {disabled} {text} {value} on:change={onChange} />
</Field> </Field>

View File

@ -5,7 +5,6 @@
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const actionMenu = getContext("actionMenu") const actionMenu = getContext("actionMenu")
export let dataCy
export let icon = undefined export let icon = undefined
export let disabled = undefined export let disabled = undefined
export let noClose = false export let noClose = false
@ -35,7 +34,6 @@
</script> </script>
<li <li
data-cy={dataCy}
on:click|preventDefault={disabled ? null : onClick} on:click|preventDefault={disabled ? null : onClick}
class="spectrum-Menu-item" class="spectrum-Menu-item"
class:is-disabled={disabled} class:is-disabled={disabled}

View File

@ -23,7 +23,7 @@
export let secondaryButtonText = undefined export let secondaryButtonText = undefined
export let secondaryAction = undefined export let secondaryAction = undefined
export let secondaryButtonWarning = false export let secondaryButtonWarning = false
export let dataCy = null
const { hide, cancel } = getContext(Context.Modal) const { hide, cancel } = getContext(Context.Modal)
let loading = false let loading = false
$: confirmDisabled = disabled || loading $: confirmDisabled = disabled || loading
@ -63,7 +63,6 @@
role="dialog" role="dialog"
tabindex="-1" tabindex="-1"
aria-modal="true" aria-modal="true"
data-cy={dataCy}
> >
<div class="spectrum-Dialog-grid"> <div class="spectrum-Dialog-grid">
{#if title || $$slots.header} {#if title || $$slots.header}

View File

@ -13,7 +13,6 @@
export let anchor export let anchor
export let align = "right" export let align = "right"
export let portalTarget export let portalTarget
export let dataCy
export let maxWidth export let maxWidth
export let direction = "bottom" export let direction = "bottom"
export let showTip = false export let showTip = false
@ -79,7 +78,6 @@
on:keydown={handleEscape} on:keydown={handleEscape}
class={"spectrum-Popover is-open " + (tooltipClasses || "")} class={"spectrum-Popover is-open " + (tooltipClasses || "")}
role="presentation" role="presentation"
data-cy={dataCy}
transition:fly|local={{ y: -20, duration: 200 }} transition:fly|local={{ y: -20, duration: 200 }}
> >
<slot /> <slot />

View File

@ -8,7 +8,6 @@
export let icon = "" export let icon = ""
export let selected = false export let selected = false
export let disabled = false export let disabled = false
export let dataCy
export let badge = "" export let badge = ""
</script> </script>
@ -17,7 +16,6 @@
class:is-selected={selected} class:is-selected={selected}
class:is-disabled={disabled} class:is-disabled={disabled}
on:click on:click
data-cy={dataCy}
> >
{#if heading} {#if heading}
<h2 class="spectrum-SideNav-heading" id="nav-heading-{heading}"> <h2 class="spectrum-SideNav-heading" id="nav-heading-{heading}">

View File

@ -42,13 +42,7 @@
</script> </script>
{#if type === "options" && meta.constraints.inclusion.length !== 0} {#if type === "options" && meta.constraints.inclusion.length !== 0}
<Select <Select {label} bind:value options={meta.constraints.inclusion} sort />
{label}
data-cy="{meta.name}-select"
bind:value
options={meta.constraints.inclusion}
sort
/>
{:else if type === "datetime"} {:else if type === "datetime"}
<DatePicker <DatePicker
{error} {error}
@ -61,7 +55,7 @@
{:else if type === "attachment"} {:else if type === "attachment"}
<Dropzone {label} {error} bind:value /> <Dropzone {label} {error} bind:value />
{:else if type === "boolean"} {:else if type === "boolean"}
<Toggle text={label} {error} bind:value data-cy="{meta.name}-input" /> <Toggle text={label} {error} bind:value />
{:else if type === "array" && meta.constraints.inclusion.length !== 0} {:else if type === "array" && meta.constraints.inclusion.length !== 0}
<Multiselect <Multiselect
bind:value bind:value
@ -87,12 +81,5 @@
{error} {error}
/> />
{:else} {:else}
<Input <Input {label} {type} {error} bind:value disabled={readonly} />
{label}
data-cy="{meta.name}-input"
{type}
{error}
bind:value
disabled={readonly}
/>
{/if} {/if}

View File

@ -546,9 +546,5 @@
Your data will be deleted and this action cannot be undone - enter the column Your data will be deleted and this action cannot be undone - enter the column
name to confirm. name to confirm.
</p> </p>
<Input <Input bind:value={deleteColName} placeholder={originalName} />
dataCy="delete-column-confirm"
bind:value={deleteColName}
placeholder={originalName}
/>
</ConfirmDialog> </ConfirmDialog>

View File

@ -119,7 +119,6 @@
selection is always undefined --> selection is always undefined -->
<Select <Select
label="Role" label="Role"
data-cy="roleId-select"
bind:value={row.roleId} bind:value={row.roleId}
options={$roles} options={$roles}
getOptionLabel={role => role.name} getOptionLabel={role => role.name}

View File

@ -13,7 +13,7 @@
} }
</script> </script>
<Button data-cy="edit-row" secondary small on:click={showModal}>Edit</Button> <Button secondary small on:click={showModal}>Edit</Button>
<Modal bind:this={modal}> <Modal bind:this={modal}>
<svelte:component this={modalContentComponent} {row} /> <svelte:component this={modalContentComponent} {row} />
</Modal> </Modal>

View File

@ -47,7 +47,6 @@
disabled={error || !name || !datasource?.type} disabled={error || !name || !datasource?.type}
> >
<Input <Input
data-cy="datasource-name-input"
label="Datasource Name" label="Datasource Name"
on:input={checkValid} on:input={checkValid}
bind:value={name} bind:value={name}

View File

@ -6,13 +6,7 @@
export let indented export let indented
</script> </script>
<div <div class:indented class:selected on:click class={className}>
data-cy="table-nav-item"
class:indented
class:selected
on:click
class={className}
>
<i class={icon} /> <i class={icon} />
<span>{title}</span> <span>{title}</span>
<slot /> <slot />

View File

@ -102,7 +102,6 @@
disabled={error || !name || (rows.length && !allValid)} disabled={error || !name || (rows.length && !allValid)}
> >
<Input <Input
data-cy="table-name-input"
thin thin
label="Table Name" label="Table Name"
on:input={checkValid} on:input={checkValid}

View File

@ -134,11 +134,7 @@
This action cannot be undone - to continue please enter the table name below This action cannot be undone - to continue please enter the table name below
to confirm. to confirm.
</p> </p>
<Input <Input bind:value={deleteTableName} placeholder={table.name} />
bind:value={deleteTableName}
placeholder={table.name}
dataCy="delete-table-confirm"
/>
</ConfirmDialog> </ConfirmDialog>
<style> <style>

View File

@ -74,7 +74,6 @@
<Modal bind:this={appLockModal}> <Modal bind:this={appLockModal}>
<ModalContent <ModalContent
title={lockedByHeading} title={lockedByHeading}
dataCy={"app-lock-modal"}
showConfirmButton={false} showConfirmButton={false}
showCancelButton={false} showCancelButton={false}
> >

View File

@ -9,7 +9,6 @@
export let onCancel = undefined export let onCancel = undefined
export let warning = true export let warning = true
export let disabled export let disabled
export let dataCy = null
let modal let modal
@ -29,7 +28,6 @@
{cancelText} {cancelText}
{warning} {warning}
{disabled} {disabled}
{dataCy}
> >
<Body size="S"> <Body size="S">
{body} {body}

View File

@ -4,12 +4,11 @@
export let title = "" export let title = ""
export let actionIcon export let actionIcon
export let action export let action
export let dataCy
$: actionDefined = typeof action === "function" $: actionDefined = typeof action === "function"
</script> </script>
<div class="dash-card" data-cy={dataCy}> <div class="dash-card">
<div class="dash-card-header" class:active={actionDefined} on:click={action}> <div class="dash-card-header" class:active={actionDefined} on:click={action}>
<span class="dash-card-title"> <span class="dash-card-title">
<Detail size="M">{title}</Detail> <Detail size="M">{title}</Detail>

View File

@ -68,7 +68,7 @@
<div class="template-categories"> <div class="template-categories">
<Layout gap="XL" noPadding> <Layout gap="XL" noPadding>
{#each filteredCategories as category} {#each filteredCategories as category}
<div class="template-category" data-cy={category.name}> <div class="template-category">
<Detail size="M">{category.name}</Detail> <Detail size="M">{category.name}</Detail>
<div class="template-grid"> <div class="template-grid">
{#each category.templates as templateEntry} {#each category.templates as templateEntry}

View File

@ -66,11 +66,7 @@
{error} {error}
/> />
{#if !disabled} {#if !disabled}
<div <div class="icon" on:click={bindingDrawer.show}>
class="icon"
on:click={bindingDrawer.show}
data-cy="text-binding-button"
>
<Icon size="S" name="FlashOn" /> <Icon size="S" name="FlashOn" />
</div> </div>
{/if} {/if}

View File

@ -3,7 +3,6 @@
export let label = null export let label = null
export let value export let value
export let dataCy = null
const copyToClipboard = val => { const copyToClipboard = val => {
const dummy = document.createElement("textarea") const dummy = document.createElement("textarea")
@ -16,7 +15,7 @@
} }
</script> </script>
<div data-cy={dataCy}> <div>
<Input readonly {value} {label} /> <Input readonly {value} {label} />
<div class="icon" on:click={() => copyToClipboard(value)}> <div class="icon" on:click={() => copyToClipboard(value)}>
<Icon size="S" name="Copy" /> <Icon size="S" name="Copy" />

View File

@ -66,7 +66,6 @@
title="Publish to production" title="Publish to production"
confirmText="Publish" confirmText="Publish"
onConfirm={publishApp} onConfirm={publishApp}
dataCy={"deploy-app-modal"}
> >
The changes you have made will be published to the production version of the The changes you have made will be published to the production version of the
application. application.
@ -88,12 +87,7 @@
<!-- Publish complete --> <!-- Publish complete -->
<Modal bind:this={publishCompleteModal}> <Modal bind:this={publishCompleteModal}>
<ModalContent <ModalContent confirmText="Done" cancelText="View App" onCancel={viewApp}>
confirmText="Done"
cancelText="View App"
onCancel={viewApp}
dataCy="deploy-app-success-modal"
>
<div slot="header" class="app-published-header"> <div slot="header" class="app-published-header">
<svg <svg
width="26px" width="26px"
@ -105,11 +99,7 @@
</svg> </svg>
<span class="app-published-header-text">App Published!</span> <span class="app-published-header-text">App Published!</span>
</div> </div>
<CopyInput <CopyInput value={publishedUrl} label="You can view your app at:" />
value={publishedUrl}
label="You can view your app at:"
dataCy="deployed-app-url"
/>
</ModalContent> </ModalContent>
</Modal> </Modal>

View File

@ -124,7 +124,6 @@
bind:this={publishPopover} bind:this={publishPopover}
align="right" align="right"
disabled={!isPublished} disabled={!isPublished}
dataCy="publish-popover-menu"
showTip={true} showTip={true}
anchor={publishPopoverAnchor} anchor={publishPopoverAnchor}
> >
@ -148,7 +147,6 @@
icon="GlobeStrike" icon="GlobeStrike"
disabled={!isPublished} disabled={!isPublished}
on:click={unpublishApp} on:click={unpublishApp}
dataCy="publish-popover-action"
> >
Unpublish Unpublish
</Button> </Button>
@ -173,7 +171,6 @@
title="Confirm unpublish" title="Confirm unpublish"
okText="Unpublish app" okText="Unpublish app"
onOk={confirmUnpublishApp} onOk={confirmUnpublishApp}
dataCy={"unpublish-modal"}
> >
Are you sure you want to unpublish the app <b>{selectedApp?.name}</b>? Are you sure you want to unpublish the app <b>{selectedApp?.name}</b>?
</ConfirmDialog> </ConfirmDialog>

View File

@ -33,7 +33,6 @@
hoverable hoverable
on:click={revertModal.show} on:click={revertModal.show}
tooltip="Revert changes" tooltip="Revert changes"
dataCy="revert-application-topnav"
/> />
<Modal bind:this={revertModal}> <Modal bind:this={revertModal}>
<ModalContent <ModalContent

View File

@ -193,11 +193,7 @@
</Drawer> </Drawer>
{/if} {/if}
</div> </div>
<Popover <Popover bind:this={dropdownRight} anchor={anchorRight}>
bind:this={dropdownRight}
anchor={anchorRight}
dataCy={`dataSource-popover-${$store.selectedComponentId}`}
>
<div class="dropdown"> <div class="dropdown">
<div class="title"> <div class="title">
<Heading size="XS">Tables</Heading> <Heading size="XS">Tables</Heading>

View File

@ -121,12 +121,7 @@
{displayValue} {displayValue}
</ActionButton> </ActionButton>
</div> </div>
<Popover <Popover bind:this={dropdown} on:open={setSelectedUI} anchor={buttonAnchor}>
bind:this={dropdown}
on:open={setSelectedUI}
anchor={buttonAnchor}
dataCy="icon-popover"
>
<div class="container"> <div class="container">
<div class="search-area"> <div class="search-area">
<div class="alphabet-area"> <div class="alphabet-area">

View File

@ -74,17 +74,13 @@
}) })
</script> </script>
<div <div class="property-control" class:highlighted={highlighted && nullishValue}>
class="property-control"
class:highlighted={highlighted && nullishValue}
data-cy={`setting-${key}`}
>
{#if type !== "boolean" && label} {#if type !== "boolean" && label}
<div class="label"> <div class="label">
<Label>{label}</Label> <Label>{label}</Label>
</div> </div>
{/if} {/if}
<div data-cy={`${key}-prop-control`} class="control"> <div id={`${key}-prop-control`} class="control">
<svelte:component <svelte:component
this={control} this={control}
{componentInstance} {componentInstance}

View File

@ -113,7 +113,6 @@
align={tourStep?.align} align={tourStep?.align}
bind:this={popover} bind:this={popover}
anchor={popoverAnchor} anchor={popoverAnchor}
dataCy="tour-popover-menu"
maxWidth={300} maxWidth={300}
dismissible={false} dismissible={false}
> >

View File

@ -23,14 +23,6 @@
Personalise the platform by adding your first name and last name. Personalise the platform by adding your first name and last name.
</Body> </Body>
<Input disabled bind:value={$auth.user.email} label="Email" /> <Input disabled bind:value={$auth.user.email} label="Email" />
<Input <Input bind:value={$values.firstName} label="First name" />
bind:value={$values.firstName} <Input bind:value={$values.lastName} label="Last name" />
label="First name"
dataCy="user-first-name"
/>
<Input
bind:value={$values.lastName}
label="Last name"
dataCy="user-last-name"
/>
</ModalContent> </ModalContent>

View File

@ -30,11 +30,11 @@
</script> </script>
<div class="app-row" on:click={handleDefaultClick}> <div class="app-row" on:click={handleDefaultClick}>
<div class="title" data-cy={`${app.devId}`}> <div class="title">
<div class="app-icon"> <div class="app-icon">
<Icon size="L" name={app.icon?.name || "Apps"} color={app.icon?.color} /> <Icon size="L" name={app.icon?.name || "Apps"} color={app.icon?.color} />
</div> </div>
<div class="name" data-cy="app-name-link"> <div class="name">
<Heading size="S"> <Heading size="S">
{app.name} {app.name}
</Heading> </Heading>
@ -56,7 +56,7 @@
<Body size="S">{app.deployed ? "Published" : "Unpublished"}</Body> <Body size="S">{app.deployed ? "Published" : "Unpublished"}</Body>
</div> </div>
<div class="app-row-actions" data-cy={`row_actions_${app.appId}`}> <div class="app-row-actions">
<AppLockModal {app} buttonSize="M" /> <AppLockModal {app} buttonSize="M" />
<Button size="S" secondary on:click={goToOverview}>Manage</Button> <Button size="S" secondary on:click={goToOverview}>Manage</Button>
<Button size="S" primary disabled={app.lockedOther} on:click={goToBuilder}> <Button size="S" primary disabled={app.lockedOther} on:click={goToBuilder}>

View File

@ -11,9 +11,7 @@
<div class="data"> <div class="data">
<Panel title="Sources" borderRight> <Panel title="Sources" borderRight>
<Layout paddingX="L" paddingY="XL" gap="S"> <Layout paddingX="L" paddingY="XL" gap="S">
<Button dataCy={`new-datasource`} cta on:click={modal.show}> <Button cta on:click={modal.show}>Add source</Button>
Add source
</Button>
<CreateDatasourceModal bind:modal /> <CreateDatasourceModal bind:modal />
<DatasourceNavigator /> <DatasourceNavigator />
</Layout> </Layout>

View File

@ -204,7 +204,7 @@
store.actions.settings.highlight(data.setting) store.actions.settings.highlight(data.setting)
// Also scroll setting into view // Also scroll setting into view
const selector = `[data-cy="${data.setting}-prop-control"` const selector = `#${data.setting}-prop-control`
const element = document.querySelector(selector)?.parentElement const element = document.querySelector(selector)?.parentElement
if (element) { if (element) {
element.scrollIntoView({ element.scrollIntoView({

View File

@ -256,7 +256,6 @@
draggable="true" draggable="true"
on:dragstart={() => onDragStart(component.component)} on:dragstart={() => onDragStart(component.component)}
on:dragend={onDragEnd} on:dragend={onDragEnd}
data-cy={`component-${component.name}`}
class="component" class="component"
class:selected={selectedIndex === class:selected={selectedIndex ===
orderMap[component.component]} orderMap[component.component]}

View File

@ -66,7 +66,7 @@
}) })
</script> </script>
<span data-cy="data-source-modal"> <span>
<ModalContent <ModalContent
title="Autogenerated screens" title="Autogenerated screens"
confirmText="Confirm" confirmText="Confirm"

View File

@ -33,7 +33,7 @@
selectedScreenMode = blankScreenModeKey selectedScreenMode = blankScreenModeKey
}} }}
> >
<div data-cy="blank-screen" class="content screen-type-wrap"> <div class="content screen-type-wrap">
<Icon name="WebPage" /> <Icon name="WebPage" />
<div class="screen-type-text"> <div class="screen-type-text">
<Heading size="XS">Blank screen</Heading> <Heading size="XS">Blank screen</Heading>
@ -60,7 +60,7 @@
class:disabled={!$tables.list.filter(table => table._id !== "ta_users") class:disabled={!$tables.list.filter(table => table._id !== "ta_users")
.length} .length}
> >
<div data-cy="autogenerated-screens" class="content screen-type-wrap"> <div class="content screen-type-wrap">
<Icon name="WebPages" /> <Icon name="WebPages" />
<div class="screen-type-text"> <div class="screen-type-text">
<Heading size="XS">Autogenerated screens</Heading> <Heading size="XS">Autogenerated screens</Heading>

View File

@ -94,7 +94,7 @@
<Layout noPadding> <Layout noPadding>
<div class="header"> <div class="header">
<img class="logo" alt="logo" src={$organisation.logoUrl || Logo} /> <img class="logo" alt="logo" src={$organisation.logoUrl || Logo} />
<ActionMenu align="right" dataCy="user-menu"> <ActionMenu align="right">
<div slot="control" class="avatar"> <div slot="control" class="avatar">
<Avatar <Avatar
size="M" size="M"

View File

@ -21,33 +21,25 @@
} }
</script> </script>
<ActionMenu align="right" dataCy="user-menu"> <ActionMenu align="right">
<div slot="control" class="user-dropdown"> <div slot="control" class="user-dropdown">
<Avatar size="M" initials={$auth.initials} url={$auth.user.pictureUrl} /> <Avatar size="M" initials={$auth.initials} url={$auth.user.pictureUrl} />
<Icon size="XL" name="ChevronDown" /> <Icon size="XL" name="ChevronDown" />
</div> </div>
<MenuItem <MenuItem icon="UserEdit" on:click={() => profileModal.show()}>
icon="UserEdit"
on:click={() => profileModal.show()}
dataCy="user-info"
>
My profile My profile
</MenuItem> </MenuItem>
<MenuItem icon="Moon" on:click={() => themeModal.show()} dataCy="theme"> <MenuItem icon="Moon" on:click={() => themeModal.show()}>Theme</MenuItem>
Theme
</MenuItem>
<MenuItem icon="LockClosed" on:click={() => updatePasswordModal.show()}> <MenuItem icon="LockClosed" on:click={() => updatePasswordModal.show()}>
Update password Update password
</MenuItem> </MenuItem>
<MenuItem icon="Key" on:click={() => apiKeyModal.show()} dataCy="api-key"> <MenuItem icon="Key" on:click={() => apiKeyModal.show()}>
View API key View API key
</MenuItem> </MenuItem>
<MenuItem icon="UserDeveloper" on:click={() => $goto("../apps")}> <MenuItem icon="UserDeveloper" on:click={() => $goto("../apps")}>
Close developer mode Close developer mode
</MenuItem> </MenuItem>
<MenuItem dataCy="user-logout" icon="LogOut" on:click={logout}> <MenuItem icon="LogOut" on:click={logout}>Log out</MenuItem>
Log out
</MenuItem>
</ActionMenu> </ActionMenu>
<Modal bind:this={themeModal}> <Modal bind:this={themeModal}>

View File

@ -46,20 +46,10 @@
</Breadcrumbs> </Breadcrumbs>
<Header title={$apps.length ? "Create new app" : "Create your first app"}> <Header title={$apps.length ? "Create new app" : "Create your first app"}>
<div slot="buttons"> <div slot="buttons">
<Button <Button size="M" secondary on:click={initiateAppImport}>
dataCy="import-app-btn"
size="M"
secondary
on:click={initiateAppImport}
>
Import app Import app
</Button> </Button>
<Button <Button size="M" cta on:click={initiateAppCreation}>
dataCy="create-app-btn"
size="M"
cta
on:click={initiateAppCreation}
>
Start from scratch Start from scratch
</Button> </Button>
</div> </div>

View File

@ -240,12 +240,7 @@
<Layout noPadding gap="L"> <Layout noPadding gap="L">
<div class="title"> <div class="title">
<div class="buttons"> <div class="buttons">
<Button <Button size="M" cta on:click={initiateAppCreation}>
dataCy="create-app-btn"
size="M"
cta
on:click={initiateAppCreation}
>
Create new app Create new app
</Button> </Button>
{#if $apps?.length > 0} {#if $apps?.length > 0}
@ -258,13 +253,7 @@
</Button> </Button>
{/if} {/if}
{#if !$apps?.length} {#if !$apps?.length}
<Button <Button size="L" quiet secondary on:click={initiateAppImport}>
dataCy="import-app-btn"
size="L"
quiet
secondary
on:click={initiateAppImport}
>
Import app Import app
</Button> </Button>
{/if} {/if}

View File

@ -139,7 +139,6 @@
secondary secondary
disabled={!isPublished} disabled={!isPublished}
on:click={viewApp} on:click={viewApp}
dataCy="view-app"
> >
View View
</Button> </Button>
@ -154,7 +153,7 @@
Edit Edit
</Button> </Button>
</span> </span>
<ActionMenu align="right" dataCy="app-overview-menu-popover"> <ActionMenu align="right">
<span slot="control" class="app-overview-actions-icon"> <span slot="control" class="app-overview-actions-icon">
<Icon hoverable name="More" /> <Icon hoverable name="More" />
</span> </span>
@ -248,11 +247,7 @@
<br /> <br />
Please enter the app name below to confirm. Please enter the app name below to confirm.
<br /><br /> <br /><br />
<Input <Input bind:value={deletionConfirmationAppName} placeholder={app?.name} />
bind:value={deletionConfirmationAppName}
data-cy="delete-app-confirmation"
placeholder={app?.name}
/>
</ConfirmDialog> </ConfirmDialog>
{/key} {/key}

View File

@ -104,7 +104,7 @@
<div class="overview-tab"> <div class="overview-tab">
<Layout noPadding gap="XL"> <Layout noPadding gap="XL">
<div class="top"> <div class="top">
<DashCard title={"App Status"} dataCy={"app-status"}> <DashCard title={"App Status"}>
<div class="status-content"> <div class="status-content">
<div class="status-display"> <div class="status-display">
{#if isPublished} {#if isPublished}
@ -137,7 +137,7 @@
</div> </div>
</DashCard> </DashCard>
{#if appEditor} {#if appEditor}
<DashCard title={"Last Edited"} dataCy={"edited-by"}> <DashCard title={"Last Edited"}>
<div class="last-edited-content"> <div class="last-edited-content">
<div class="updated-by"> <div class="updated-by">
{#if appEditor} {#if appEditor}
@ -167,9 +167,8 @@
action={() => { action={() => {
$goto("./version") $goto("./version")
}} }}
dataCy={"app-version"}
> >
<div class="version-content" data-cy={$store.version}> <div class="version-content">
<Heading size="XS">{$store.version}</Heading> <Heading size="XS">{$store.version}</Heading>
{#if updateAvailable} {#if updateAvailable}
<div class="version-status"> <div class="version-status">
@ -195,7 +194,6 @@
action={() => { action={() => {
$goto("./access") $goto("./access")
}} }}
dataCy={"access"}
> >
{#if appUsers.length || appGroups.length} {#if appUsers.length || appGroups.length}
<Layout noPadding gap="S"> <Layout noPadding gap="S">
@ -246,7 +244,6 @@
action={() => { action={() => {
$goto("../automation-history") $goto("../automation-history")
}} }}
dataCy={"automation-history"}
> >
<div class="automation-content"> <div class="automation-content">
<div class="automation-metrics"> <div class="automation-metrics">
@ -272,7 +269,6 @@
action={() => { action={() => {
$goto("../backups") $goto("../backups")
}} }}
dataCy={"backups"}
> >
<div class="backups-content">test</div> <div class="backups-content">test</div>
</DashCard> </DashCard>
@ -286,7 +282,6 @@
title="Confirm unpublish" title="Confirm unpublish"
okText="Unpublish app" okText="Unpublish app"
onOk={confirmUnpublishApp} onOk={confirmUnpublishApp}
dataCy={"unpublish-modal"}
> >
Are you sure you want to unpublish the app <b>{app?.name}</b>? Are you sure you want to unpublish the app <b>{app?.name}</b>?
</ConfirmDialog> </ConfirmDialog>

View File

@ -391,7 +391,6 @@
bind:value={providers.oidc.config.configs[0][field.name]} bind:value={providers.oidc.config.configs[0][field.name]}
readonly={field.readonly} readonly={field.readonly}
placeholder={field.placeholder} placeholder={field.placeholder}
dataCy={field.name}
/> />
</div> </div>
{#if field.copyButton} {#if field.copyButton}
@ -432,7 +431,6 @@
<div class="form-row"> <div class="form-row">
<Label size="L">Activated</Label> <Label size="L">Activated</Label>
<Toggle <Toggle
dataCy={"oidc-active"}
text="" text=""
bind:value={providers.oidc.config.configs[0].activated} bind:value={providers.oidc.config.configs[0].activated}
/> />
@ -448,7 +446,6 @@
on:click={() => { on:click={() => {
providers.oidc.config.configs[0]["scopes"] = [...defaultScopes] providers.oidc.config.configs[0]["scopes"] = [...defaultScopes]
}} }}
dataCy={"restore-oidc-default-scopes"}
> >
Restore Defaults Restore Defaults
</Button> </Button>
@ -463,7 +460,6 @@
<div class="form-row"> <div class="form-row">
<Label size="L">Auth Scopes</Label> <Label size="L">Auth Scopes</Label>
<Input <Input
dataCy={"new-scope-input"}
error={scopesFields[0].error} error={scopesFields[0].error}
placeholder={"New Scope"} placeholder={"New Scope"}
bind:value={scopesFields[0].inputText} bind:value={scopesFields[0].inputText}
@ -532,7 +528,6 @@
disabled={oidcSaveButtonDisabled} disabled={oidcSaveButtonDisabled}
cta cta
on:click={() => save([providers.oidc])} on:click={() => save([providers.oidc])}
dataCy="oidc-save"
> >
Save Save
</Button> </Button>

View File

@ -222,12 +222,7 @@
<Divider /> <Divider />
<div class="controls"> <div class="controls">
<ButtonGroup> <ButtonGroup>
<Button <Button disabled={readonly} on:click={createUserModal.show} cta>
disabled={readonly}
dataCy="add-user"
on:click={createUserModal.show}
cta
>
Add users Add users
</Button> </Button>
<Button disabled={readonly} on:click={importUsersModal.show} secondary> <Button disabled={readonly} on:click={importUsersModal.show} secondary>