Skip to content

Commit

Permalink
fix: workflow for speed up
Browse files Browse the repository at this point in the history
  • Loading branch information
glassmonkey committed Jul 7, 2024
1 parent a90cedd commit faa87f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions e2e/e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ test.describe('select version', () => {
expect(page.url()).toContain(`v=${v}`)
})
test(`compute php code(1+1)`, async ({page}) => {
await page.goto(`${PAGE}/?c=DwfgUEA`);
// select version
const input = page.locator('#select-input-php')
await input.fill(v)
Expand All @@ -61,16 +62,12 @@ test.describe('select version', () => {
const editor = page.getByRole('code')
// focus editor
await editor.click()
// delete all
while (await page.getByRole('presentation').textContent() !== '') {
await page.keyboard.press("Backspace")
}
// display code in editor
await expect(page.getByRole('presentation')).toHaveText('')
await expect(page.getByRole('presentation')).toHaveText('<?')
// try 1+1
await page.keyboard.type('<? echo 1+1;')
await page.keyboard.type('echo 1+1;')
// display code in editor
await expect(page.getByRole('presentation')).toHaveText('<? echo 1+1;')
await expect(page.getByRole('presentation')).toHaveText('<?echo 1+1;')
// run and result is 2
await page.getByTestId('checkbox-format').uncheck()
await expect(await page.getByTestId('preview-console')).toHaveText('2')
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default defineConfig({
/* Retry on CI only */
retries: 3,
/* Opt out of parallel tests on CI. */
workers: 1,
workers: 4,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
Expand Down

0 comments on commit faa87f1

Please sign in to comment.