up
This commit is contained in:
@@ -15,6 +15,7 @@ module.exports = async function onlineSmoke({
|
||||
let gamesCalls = 0
|
||||
let varyGames = false
|
||||
let invalidStory = false
|
||||
let introAudio = 'intro.wav'
|
||||
let version = 1
|
||||
let offline = false
|
||||
let polls = 0
|
||||
@@ -64,7 +65,7 @@ module.exports = async function onlineSmoke({
|
||||
game: {
|
||||
ID: 6,
|
||||
name: 'HTTP smoke',
|
||||
scenario: { story: invalidStory ? null : { introduction: { audio: 'intro.wav' } } },
|
||||
scenario: { story: invalidStory ? [] : null },
|
||||
},
|
||||
})
|
||||
if (path === '/api/games/6/screen-plan') {
|
||||
@@ -127,7 +128,7 @@ module.exports = async function onlineSmoke({
|
||||
state: {
|
||||
gameID: 6,
|
||||
music,
|
||||
introAudio: 'intro.wav',
|
||||
introAudio,
|
||||
mode: remoteMode,
|
||||
text: remoteText,
|
||||
timerLabel,
|
||||
@@ -229,6 +230,14 @@ module.exports = async function onlineSmoke({
|
||||
)
|
||||
varyGames = false
|
||||
await act({ action: 'games' })
|
||||
await poll(
|
||||
() =>
|
||||
evaluate(`(() => {
|
||||
const select = Array.from(document.querySelectorAll('.n-base-selection')).find(e => e.textContent.includes('Выберите игру для подготовки'))
|
||||
return !!select && !select.classList.contains('n-base-selection--disabled') && !document.body.textContent.includes('Список игр пока пуст')
|
||||
})()`),
|
||||
'updated game list rendered',
|
||||
)
|
||||
await evaluate(
|
||||
`Array.from(document.querySelectorAll('.n-base-selection')).find(e => e.textContent.includes('Выберите игру для подготовки')).click()`,
|
||||
)
|
||||
@@ -264,7 +273,7 @@ module.exports = async function onlineSmoke({
|
||||
`document.querySelector('[data-testid="connection-error"]').textContent`,
|
||||
)
|
||||
assert.ok(errorText.includes('Описание игры · GET /api/games/6'))
|
||||
assert.ok(errorText.includes('получено null'))
|
||||
assert.ok(errorText.includes('получено массив'))
|
||||
assert.ok(!errorText.includes('TEST-ACCESS'))
|
||||
assert.equal(
|
||||
await evaluate(
|
||||
@@ -418,6 +427,19 @@ module.exports = async function onlineSmoke({
|
||||
)
|
||||
assert.match((await state()).channels.music.source.url, /^screen-app:/)
|
||||
assert.notEqual((await state()).channels.music.source.url, oldMusic)
|
||||
introAudio = ''
|
||||
remoteMode = 2
|
||||
currentCommand = 0
|
||||
version++
|
||||
await poll(
|
||||
async () => (await state()).scene.mode === 2 && !(await state()).channels.main.source,
|
||||
'screen without intro accepted',
|
||||
)
|
||||
await poll(
|
||||
() => inspect(`document.body.textContent.includes('Вступление не задано')`),
|
||||
'missing intro message',
|
||||
)
|
||||
assert.equal((await state()).channels.music.desired, 'playing')
|
||||
console.log('SCREEN_LIVE_MATERIALS_SMOKE_PASS')
|
||||
// Настоящий редактор: черновик, ошибка сохранения, порядок и переходы.
|
||||
const clickPlan = async (label) => {
|
||||
|
||||
Reference in New Issue
Block a user