mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 03:42:37 +02:00
chore: uniformize buttons across panels and alerts
This commit is contained in:
parent
e1f91b393d
commit
c0ecc39439
15 changed files with 117 additions and 103 deletions
|
@ -266,6 +266,11 @@ button.flat,
|
||||||
min-height: inherit;
|
min-height: inherit;
|
||||||
width: initial;
|
width: initial;
|
||||||
display: initial;
|
display: initial;
|
||||||
|
line-height: inherit;
|
||||||
|
}
|
||||||
|
button.flat:hover,
|
||||||
|
[type="button"].flat:hover,
|
||||||
|
.dark [type="button"].flat:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
.help-text, .helptext {
|
.help-text, .helptext {
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
}
|
}
|
||||||
.panel.full.on {
|
.panel.full.on {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
right: var(--panel-gutter);
|
right: calc(var(--panel-gutter) * 2 + var(--control-size));
|
||||||
left: var(--panel-gutter);
|
left: var(--panel-gutter);
|
||||||
height: initial;
|
height: initial;
|
||||||
max-height: initial;
|
max-height: initial;
|
||||||
|
@ -41,41 +41,6 @@
|
||||||
height: calc(100% - var(--panel-header-height)); /* Minus size of toolbox */
|
height: calc(100% - var(--panel-header-height)); /* Minus size of toolbox */
|
||||||
padding: var(--panel-gutter);
|
padding: var(--panel-gutter);
|
||||||
}
|
}
|
||||||
.panel .toolbox {
|
|
||||||
padding: 5px 10px;
|
|
||||||
overflow: hidden;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
font-size: 10px;
|
|
||||||
justify-content: flex-start;
|
|
||||||
gap: 5px;
|
|
||||||
line-height: 2.2em;
|
|
||||||
background-color: #fff;
|
|
||||||
position: sticky;
|
|
||||||
top: 0;
|
|
||||||
height: var(--panel-header-height);
|
|
||||||
}
|
|
||||||
.panel.dark .toolbox {
|
|
||||||
background-color: var(--color-darkGray);
|
|
||||||
}
|
|
||||||
.panel .toolbox li {
|
|
||||||
cursor: pointer;
|
|
||||||
display: inline;
|
|
||||||
padding: 0 2px;
|
|
||||||
border: 1px solid #b6b6b3;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
.panel.dark .toolbox
|
|
||||||
.panel.dark .toolbox li {
|
|
||||||
color: #d3dfeb;
|
|
||||||
border: 1px solid #202425;
|
|
||||||
}
|
|
||||||
.panel .toolbox li:hover {
|
|
||||||
background-color: #d4d4d2;
|
|
||||||
}
|
|
||||||
.panel.dark .toolbox li:hover {
|
|
||||||
background-color: #353c3e;
|
|
||||||
}
|
|
||||||
.panel h3 {
|
.panel h3 {
|
||||||
line-height: 120%;
|
line-height: 120%;
|
||||||
}
|
}
|
||||||
|
|
36
umap/static/umap/css/window.css
Normal file
36
umap/static/umap/css/window.css
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
.window .buttons {
|
||||||
|
padding: 5px 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row-reverse;
|
||||||
|
font-size: 10px;
|
||||||
|
justify-content: flex-start;
|
||||||
|
gap: 5px;
|
||||||
|
line-height: 2.2em;
|
||||||
|
background-color: inherit;
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
height: var(--panel-header-height);
|
||||||
|
}
|
||||||
|
.window .buttons li {
|
||||||
|
cursor: pointer;
|
||||||
|
display: inline;
|
||||||
|
padding: 0 2px;
|
||||||
|
border: 1px solid #b6b6b3;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
.window.dark .buttons
|
||||||
|
.window.dark .buttons li {
|
||||||
|
color: #d3dfeb;
|
||||||
|
border: 1px solid #202425;
|
||||||
|
}
|
||||||
|
.window.dark[data-level="error"] .buttons li:hover,
|
||||||
|
.window.dark[data-level="error"] .buttons li button:hover {
|
||||||
|
background-color: darkred;
|
||||||
|
}
|
||||||
|
.window .buttons li:hover {
|
||||||
|
background-color: #d4d4d2;
|
||||||
|
}
|
||||||
|
.window.dark .buttons li:hover {
|
||||||
|
background-color: #353c3e;
|
||||||
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
padding: var(--panel-gutter);
|
padding: var(--panel-gutter);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
box-shadow: 0 1px 7px #999999;
|
box-shadow: 0 1px 7px #999999;
|
||||||
background: none repeat scroll 0 0 rgba(20, 22, 23, 0.8);
|
background: none repeat scroll 0 0 var(--color-darkGray);
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
|
@ -25,18 +25,6 @@
|
||||||
[role="dialog"] > div {
|
[role="dialog"] > div {
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
[role="dialog"] [data-close].umap-close-link {
|
|
||||||
color: #fff;
|
|
||||||
max-width: 42px;
|
|
||||||
line-height: initial;
|
|
||||||
margin: 0;
|
|
||||||
margin-left: var(--panel-gutter);
|
|
||||||
background-color: #202425;
|
|
||||||
font-size: 0.7rem;
|
|
||||||
}
|
|
||||||
[role="dialog"] [data-close].umap-close-link .icon + span {
|
|
||||||
margin-left: 0;
|
|
||||||
}
|
|
||||||
#link-wrapper form {
|
#link-wrapper form {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,20 +5,22 @@
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<template id="umap-alert-template">
|
<template id="umap-alert-template">
|
||||||
<div role="dialog">
|
<div role="dialog" class="dark window">
|
||||||
<div>
|
<div>
|
||||||
<p role="alert"></p>
|
<p role="alert"></p>
|
||||||
</div>
|
</div>
|
||||||
<button class="umap-close-link dark button" aria-label="{% translate "Close" %}" data-close>
|
<ul class="buttons">
|
||||||
<i class="icon icon-16 icon-close"></i>
|
<li>
|
||||||
</button>
|
<button class="icon icon-16 icon-close" aria-label="{% translate "Close" %}" data-close></button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<umap-alert></umap-alert>
|
<umap-alert></umap-alert>
|
||||||
|
|
||||||
<template id="umap-alert-creation-template">
|
<template id="umap-alert-creation-template">
|
||||||
<div role="dialog">
|
<div role="dialog" class="dark window">
|
||||||
<div>
|
<div>
|
||||||
<p role="alert"></p>
|
<p role="alert"></p>
|
||||||
<div id="link-wrapper">
|
<div id="link-wrapper">
|
||||||
|
@ -35,16 +37,18 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="umap-close-link dark button" aria-label="{% translate "Close" %}" data-close>
|
<ul class="buttons">
|
||||||
<i class="icon icon-16 icon-close"></i>
|
<li>
|
||||||
</button>
|
<button class="icon icon-16 icon-close" aria-label="{% translate "Close" %}" data-close></button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<umap-alert-creation></umap-alert-creation>
|
<umap-alert-creation></umap-alert-creation>
|
||||||
|
|
||||||
<template id="umap-alert-choice-template">
|
<template id="umap-alert-choice-template">
|
||||||
<div role="dialog">
|
<div role="dialog" class="dark window">
|
||||||
<div>
|
<div>
|
||||||
<p role="alert"></p>
|
<p role="alert"></p>
|
||||||
<div id="choice-wrapper">
|
<div id="choice-wrapper">
|
||||||
|
@ -55,9 +59,11 @@
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="umap-close-link dark button" aria-label="{% translate "Close" %}" data-close>
|
<ul class="buttons">
|
||||||
<i class="icon icon-16 icon-close"></i>
|
<li>
|
||||||
</button>
|
<button class="icon icon-16 icon-close" aria-label="{% translate "Close" %}" data-close></button>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { translate } from '../../modules/i18n.js'
|
||||||
import { uMapElement } from '../base.js'
|
import { uMapElement } from '../base.js'
|
||||||
|
|
||||||
class uMapAlert extends uMapElement {
|
class uMapAlert extends uMapElement {
|
||||||
|
@ -96,7 +97,7 @@ class uMapAlertCreation extends uMapAlert {
|
||||||
button.addEventListener('click', (event) => {
|
button.addEventListener('click', (event) => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
L.Util.copyToClipboard(editLink)
|
L.Util.copyToClipboard(editLink)
|
||||||
event.target.value = L._('✅ Copied!')
|
event.target.value = translate('✅ Copied!')
|
||||||
})
|
})
|
||||||
if (sendLink) {
|
if (sendLink) {
|
||||||
this.formWrapper.removeAttribute('hidden')
|
this.formWrapper.removeAttribute('hidden')
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
export class uMapElement extends HTMLElement {
|
const EVENT_PREFIX = 'umap'
|
||||||
static EVENT_PREFIX = 'umap'
|
|
||||||
|
|
||||||
|
export class uMapElement extends HTMLElement {
|
||||||
static emit(type, detail = {}) {
|
static emit(type, detail = {}) {
|
||||||
const event = new CustomEvent(`${uMapElement.EVENT_PREFIX}:${type}`, {
|
const event = new CustomEvent(`${EVENT_PREFIX}:${type}`, {
|
||||||
bubbles: true,
|
bubbles: true,
|
||||||
cancelable: true,
|
cancelable: true,
|
||||||
detail: detail,
|
detail: detail,
|
||||||
|
@ -36,14 +36,14 @@ export class uMapElement extends HTMLElement {
|
||||||
handleEvent(event) {
|
handleEvent(event) {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
// From `umap:alert` to `alert`.
|
// From `umap:alert` to `alert`.
|
||||||
const eventName = event.type.replace(`${uMapElement.EVENT_PREFIX}:`, '')
|
const eventName = event.type.replace(`${EVENT_PREFIX}:`, '')
|
||||||
// From `alert` event type to `onAlert` call against that class.
|
// From `alert` event type to `onAlert` call against that class.
|
||||||
this[`on${eventName.charAt(0).toUpperCase() + eventName.slice(1)}`](event)
|
this[`on${eventName.charAt(0).toUpperCase() + eventName.slice(1)}`](event)
|
||||||
}
|
}
|
||||||
|
|
||||||
listen(eventName) {
|
listen(eventName) {
|
||||||
// Using `this` as a listener will call `handleEvent` under the hood.
|
// Using `this` as a listener will call `handleEvent` under the hood.
|
||||||
document.addEventListener(`${uMapElement.EVENT_PREFIX}:${eventName}`, this)
|
document.addEventListener(`${EVENT_PREFIX}:${eventName}`, this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { translate } from '../i18n.js'
|
||||||
export default class Dialog {
|
export default class Dialog {
|
||||||
constructor(parent) {
|
constructor(parent) {
|
||||||
this.parent = parent
|
this.parent = parent
|
||||||
this.container = DomUtil.create('dialog', 'umap-dialog', this.parent)
|
this.container = DomUtil.create('dialog', 'umap-dialog window', this.parent)
|
||||||
DomEvent.disableClickPropagation(this.container)
|
DomEvent.disableClickPropagation(this.container)
|
||||||
DomEvent.on(this.container, 'contextmenu', DomEvent.stopPropagation) // Do not activate our custom context menu.
|
DomEvent.on(this.container, 'contextmenu', DomEvent.stopPropagation) // Do not activate our custom context menu.
|
||||||
DomEvent.on(this.container, 'wheel', DomEvent.stopPropagation)
|
DomEvent.on(this.container, 'wheel', DomEvent.stopPropagation)
|
||||||
|
@ -26,15 +26,14 @@ export default class Dialog {
|
||||||
if (className) {
|
if (className) {
|
||||||
this.container.classList.add(className)
|
this.container.classList.add(className)
|
||||||
}
|
}
|
||||||
const closeButton = DomUtil.createButton(
|
const buttonsContainer = DomUtil.create('ul', 'buttons', this.container)
|
||||||
'umap-close-link',
|
const closeButton = DomUtil.createButtonIcon(
|
||||||
this.container,
|
DomUtil.create('li', '', buttonsContainer),
|
||||||
'',
|
'icon-close',
|
||||||
() => this.container.close()
|
translate('Close')
|
||||||
)
|
)
|
||||||
DomUtil.createIcon(closeButton, 'icon-close')
|
DomEvent.on(closeButton, 'click', this.close, this)
|
||||||
const label = DomUtil.create('span', '', closeButton)
|
this.container.appendChild(buttonsContainer)
|
||||||
label.title = label.textContent = translate('Close')
|
|
||||||
this.container.appendChild(content)
|
this.container.appendChild(content)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,27 +25,34 @@ export class Panel {
|
||||||
}
|
}
|
||||||
|
|
||||||
open({ content, className, actions = [] } = {}) {
|
open({ content, className, actions = [] } = {}) {
|
||||||
this.container.className = `with-transition panel ${this.classname} ${this.mode || ''}`
|
this.container.className = `with-transition panel window ${this.classname} ${
|
||||||
|
this.mode || ''
|
||||||
|
}`
|
||||||
this.container.innerHTML = ''
|
this.container.innerHTML = ''
|
||||||
const actionsContainer = DomUtil.create('ul', 'toolbox', this.container)
|
const actionsContainer = DomUtil.create('ul', 'buttons', this.container)
|
||||||
const body = DomUtil.create('div', 'body', this.container)
|
const body = DomUtil.create('div', 'body', this.container)
|
||||||
body.appendChild(content)
|
body.appendChild(content)
|
||||||
const closeLink = DomUtil.create('li', 'umap-close-link', actionsContainer)
|
const closeButton = DomUtil.createButtonIcon(
|
||||||
DomUtil.add('i', 'icon icon-16 icon-close', closeLink)
|
DomUtil.create('li', '', actionsContainer),
|
||||||
closeLink.title = translate('Close')
|
'icon-close',
|
||||||
const resizeLink = DomUtil.create('li', 'umap-resize-link', actionsContainer)
|
translate('Close')
|
||||||
DomUtil.add('i', 'icon icon-16 icon-resize', resizeLink)
|
)
|
||||||
resizeLink.title = translate('Toggle size')
|
const resizeButton = DomUtil.createButtonIcon(
|
||||||
for (let action of actions) {
|
DomUtil.create('li', '', actionsContainer),
|
||||||
actionsContainer.appendChild(action)
|
'icon-resize',
|
||||||
|
translate('Toggle size')
|
||||||
|
)
|
||||||
|
for (const action of actions) {
|
||||||
|
const element = DomUtil.element({ tagName: 'li', parent: actionsContainer })
|
||||||
|
element.appendChild(action)
|
||||||
}
|
}
|
||||||
if (className) DomUtil.addClass(body, className)
|
if (className) DomUtil.addClass(body, className)
|
||||||
const promise = new Promise((resolve, reject) => {
|
const promise = new Promise((resolve, reject) => {
|
||||||
DomUtil.addClass(this.container, 'on')
|
DomUtil.addClass(this.container, 'on')
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
DomEvent.on(closeLink, 'click', this.close, this)
|
DomEvent.on(closeButton, 'click', this.close, this)
|
||||||
DomEvent.on(resizeLink, 'click', this.resize, this)
|
DomEvent.on(resizeButton, 'click', this.resize, this)
|
||||||
return promise
|
return promise
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1466,17 +1466,19 @@ U.DataLayer = L.Evented.extend({
|
||||||
'_blank'
|
'_blank'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
const button = L.DomUtil.create('li', '')
|
const backButton = L.DomUtil.createButtonIcon(
|
||||||
L.DomUtil.create('i', 'icon icon-16 icon-back', button)
|
undefined,
|
||||||
button.title = L._('Back to layers')
|
'icon-back',
|
||||||
|
L._('Back to layers')
|
||||||
|
)
|
||||||
// Fixme: remove me when this is merged and released
|
// Fixme: remove me when this is merged and released
|
||||||
// https://github.com/Leaflet/Leaflet/pull/9052
|
// https://github.com/Leaflet/Leaflet/pull/9052
|
||||||
L.DomEvent.disableClickPropagation(button)
|
L.DomEvent.disableClickPropagation(backButton)
|
||||||
L.DomEvent.on(button, 'click', this.map.editDatalayers, this.map)
|
L.DomEvent.on(backButton, 'click', this.map.editDatalayers, this.map)
|
||||||
|
|
||||||
this.map.editPanel.open({
|
this.map.editPanel.open({
|
||||||
content: container,
|
content: container,
|
||||||
actions: [button],
|
actions: [backButton],
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -95,10 +95,13 @@ U.TableEditor = L.Class.extend({
|
||||||
this.renderHeaders()
|
this.renderHeaders()
|
||||||
this.body.innerHTML = ''
|
this.body.innerHTML = ''
|
||||||
this.datalayer.eachLayer(this.renderRow, this)
|
this.datalayer.eachLayer(this.renderRow, this)
|
||||||
const addButton = L.DomUtil.create('li', 'add-property')
|
const addButton = L.DomUtil.createButton(
|
||||||
L.DomUtil.createIcon(addButton, 'icon-add')
|
'flat',
|
||||||
const label = L.DomUtil.create('span', '', addButton)
|
undefined,
|
||||||
label.textContent = label.title = L._('Add a new property')
|
L._('Add a new property')
|
||||||
|
)
|
||||||
|
const iconElement = L.DomUtil.createIcon(addButton, 'icon-add')
|
||||||
|
addButton.insertBefore(iconElement, addButton.firstChild)
|
||||||
const addProperty = function () {
|
const addProperty = function () {
|
||||||
const newName = prompt(L._('Please enter the name of the property'))
|
const newName = prompt(L._('Please enter the name of the property'))
|
||||||
if (!newName || !this.validateName(newName)) return
|
if (!newName || !this.validateName(newName)) return
|
||||||
|
|
|
@ -659,14 +659,14 @@ ul.photon-autocomplete {
|
||||||
}
|
}
|
||||||
.umap-caption-bar-enabled .umap-caption-bar {
|
.umap-caption-bar-enabled .umap-caption-bar {
|
||||||
display: block;
|
display: block;
|
||||||
height: var(--header-height);
|
height: var(--footer-height);
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
padding: 0 0 0 5px;
|
padding: var(--gutter);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
line-height: 100%;
|
line-height: 100%;
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
|
|
|
@ -20,13 +20,14 @@
|
||||||
--button-neutral-color: var(--color-darkGray);
|
--button-neutral-color: var(--color-darkGray);
|
||||||
|
|
||||||
/* Sizes and spaces */
|
/* Sizes and spaces */
|
||||||
|
--gutter: 8px;
|
||||||
--panel-gutter: 10px;
|
--panel-gutter: 10px;
|
||||||
--panel-bottom: 40px;
|
--panel-bottom: 40px;
|
||||||
--panel-header-height: 36px;
|
--panel-header-height: 36px;
|
||||||
--panel-width: 400px;
|
--panel-width: 400px;
|
||||||
--header-height: 46px;
|
--header-height: 46px;
|
||||||
--current-header-height: 0px;
|
--current-header-height: 0px;
|
||||||
--footer-height: 46px;
|
--footer-height: 28px;
|
||||||
--current-footer-height: 0px;
|
--current-footer-height: 0px;
|
||||||
--control-size: 36px;
|
--control-size: 36px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
<link rel="stylesheet" href="{% static 'umap/nav.css' %}" />
|
<link rel="stylesheet" href="{% static 'umap/nav.css' %}" />
|
||||||
<link rel="stylesheet" href="{% static 'umap/map.css' %}" />
|
<link rel="stylesheet" href="{% static 'umap/map.css' %}" />
|
||||||
<link rel="stylesheet" href="{% static 'umap/css/panel.css' %}" />
|
<link rel="stylesheet" href="{% static 'umap/css/panel.css' %}" />
|
||||||
|
<link rel="stylesheet" href="{% static 'umap/css/window.css' %}" />
|
||||||
<link rel="stylesheet" href="{% static 'umap/css/tooltip.css' %}" />
|
<link rel="stylesheet" href="{% static 'umap/css/tooltip.css' %}" />
|
||||||
<link rel="stylesheet" href="{% static 'umap/css/dialog.css' %}" />
|
<link rel="stylesheet" href="{% static 'umap/css/dialog.css' %}" />
|
||||||
<link rel="stylesheet" href="{% static 'umap/theme.css' %}" />
|
<link rel="stylesheet" href="{% static 'umap/theme.css' %}" />
|
||||||
|
|
|
@ -171,7 +171,7 @@ def test_can_use_remote_url_as_picto(openmap, live_server, page, pictos):
|
||||||
input_el.blur()
|
input_el.blur()
|
||||||
expect(marker).to_have_attribute("src", "https://foo.bar/img.jpg")
|
expect(marker).to_have_attribute("src", "https://foo.bar/img.jpg")
|
||||||
# Now close and reopen the form, it should still be the URL tab
|
# Now close and reopen the form, it should still be the URL tab
|
||||||
close = page.locator(".panel.right.on .toolbox").get_by_title("Close")
|
close = page.locator(".panel.right.on .buttons").get_by_title("Close")
|
||||||
expect(close).to_be_visible()
|
expect(close).to_be_visible()
|
||||||
close.click()
|
close.click()
|
||||||
edit_settings.click()
|
edit_settings.click()
|
||||||
|
@ -210,7 +210,7 @@ def test_can_use_char_as_picto(openmap, live_server, page, pictos):
|
||||||
expect(marker).to_have_count(1)
|
expect(marker).to_have_count(1)
|
||||||
expect(marker).to_have_text("♩")
|
expect(marker).to_have_text("♩")
|
||||||
# Now close and reopen the form, it should still be the URL tab
|
# Now close and reopen the form, it should still be the URL tab
|
||||||
close = page.locator(".panel.right.on .toolbox").get_by_title("Close")
|
close = page.locator(".panel.right.on .buttons").get_by_title("Close")
|
||||||
expect(close).to_be_visible()
|
expect(close).to_be_visible()
|
||||||
close.click()
|
close.click()
|
||||||
edit_settings.click()
|
edit_settings.click()
|
||||||
|
|
Loading…
Reference in a new issue