up
This commit is contained in:
@@ -292,13 +292,13 @@ module.exports = async function onlineSmoke({
|
||||
await poll(
|
||||
() =>
|
||||
evaluate(
|
||||
`document.querySelectorAll('main.control > .n-card').length === 5 && document.querySelectorAll('[data-testid="game-control"] .n-card').length === 0 && document.querySelectorAll('.n-card-header__main').length === 6`,
|
||||
`document.querySelectorAll('main.control > .n-card').length === 4 && document.querySelectorAll('[data-testid="game-control"] .n-card').length === 0 && document.querySelectorAll('.n-card-header__main').length === 6`,
|
||||
),
|
||||
'six control cards with merged game controls',
|
||||
)
|
||||
assert.deepEqual(
|
||||
await evaluate(
|
||||
`Array.from(document.querySelectorAll('.n-card-header__main')).map(e => (e.querySelector('.server-heading > span:first-child') ?? e).textContent.trim())`,
|
||||
`Array.from(document.querySelectorAll('.n-card-header__main')).map(e => (e.querySelector('.server-heading > span:first-child, .game-heading > span:first-child') ?? e).textContent.trim())`,
|
||||
),
|
||||
['Сервер', 'Материалы', 'Игра', 'Экран', 'План экранов', 'План музыки'],
|
||||
)
|
||||
@@ -461,9 +461,9 @@ module.exports = async function onlineSmoke({
|
||||
return !content?.querySelector('.game-selection')
|
||||
&& !buttons.some(b => b.textContent.trim() === 'Подключиться')
|
||||
&& buttons.some(b => b.textContent.trim() === 'Отключиться'
|
||||
&& b.closest('.n-space')?.textContent.includes('Экран №'))
|
||||
&& !!b.closest('.n-card-header__extra'))
|
||||
})()`),
|
||||
'selected game hides selector and connect button, disconnect follows screen name',
|
||||
'selected game hides selector and connect button, disconnect stays in game header',
|
||||
)
|
||||
assert.equal((await state()).outputOpen, false)
|
||||
await evaluate(`window.screenBridge.show(${displayId})`)
|
||||
@@ -475,7 +475,7 @@ module.exports = async function onlineSmoke({
|
||||
await evaluate(`(() => {
|
||||
const assignment = document.querySelector('[data-testid="sound-assignment"]')
|
||||
const card = assignment?.closest('.n-card')
|
||||
return card?.querySelector('.n-card-header__main')?.textContent.trim() === 'Игра'
|
||||
return card?.querySelector('.game-heading > span:first-child')?.textContent.trim() === 'Игра'
|
||||
&& ['Назначить звук этому экрану', 'Отключиться'].every(label =>
|
||||
!Array.from(document.querySelectorAll('.n-card')).find(c => c.querySelector('.n-card-header__main')?.textContent.trim() === 'Экран')?.textContent.includes(label))
|
||||
})()`),
|
||||
@@ -649,6 +649,7 @@ module.exports = async function onlineSmoke({
|
||||
await clickPlan('Редактировать')
|
||||
await clickPlan('Добавить шаг')
|
||||
await setInput('[data-testid="screen-plan"] textarea', 'Текст из редактора')
|
||||
await poll(() => evaluate(`Array.from(document.querySelectorAll('[data-testid="screen-plan"] .step-preview .message')).some(e => e.textContent === 'Текст из редактора')`), 'draft miniature updates before save')
|
||||
await clickPlan('Добавить шаг')
|
||||
await evaluate(
|
||||
`Array.from(document.querySelectorAll('[data-testid="screen-plan"] .n-base-selection')).at(-1).click()`,
|
||||
|
||||
Reference in New Issue
Block a user