Skip to content

Commit

Permalink
arreglos
Browse files Browse the repository at this point in the history
  • Loading branch information
uo285427 committed May 1, 2024
1 parent 254745e commit 1e1f7d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion webapp/e2e/steps/play-game.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defineFeature(feature, test => {
beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
: await puppeteer.launch({ headless: false, slowMo: 1 });
: await puppeteer.launch({ headless: false, slowMo: 1, defaultViewport: { width: 1200, height: 800 }});
page = await browser.newPage();
setDefaultOptions({ timeout: 10000 })

Expand Down
5 changes: 4 additions & 1 deletion webapp/e2e/steps/settings.steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ defineFeature(feature, test => {
beforeAll(async () => {
browser = process.env.GITHUB_ACTIONS
? await puppeteer.launch()
: await puppeteer.launch({ headless: false, slowMo: 100 });
: await puppeteer.launch({ headless: false, slowMo: 100, defaultViewport: { width: 1200, height: 800 }});
page = await browser.newPage();
setDefaultOptions({ timeout: 10000 })

Expand Down Expand Up @@ -54,6 +54,7 @@ defineFeature(feature, test => {
changeSliderValueTo5();
});
then('the game settings should be updated', async () => {
await page.waitForSelector('button', { text: 'Jugar' });
await expect(page).toClick('button', { text: 'Jugar' });
await expect(page).toClick('button', { text: 'Comenzar a jugar' })
await expect(page).toMatchElement("h1", { text: 'Pregunta Número 1' });
Expand Down Expand Up @@ -105,7 +106,9 @@ defineFeature(feature, test => {
for (let i = 0; i < steps; i++) {
await page.mouse.move(sliderMidX - 50, sliderMidY, { steps: 10 });
}
await page.waitForTimeout(500);
await page.mouse.up();
}

});

0 comments on commit 1e1f7d6

Please sign in to comment.