mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 07:13:02 -05:00
Merge pull request 'Clipboard read permission for Chromium' (#6222) from 0ko/forgejo:e2e-clipboard into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6222 Reviewed-by: Otto <otto@codeberg.org>
This commit is contained in:
commit
0cac04d3dd
2 changed files with 7 additions and 5 deletions
|
@ -65,6 +65,7 @@ export default {
|
||||||
/* Project-specific settings. */
|
/* Project-specific settings. */
|
||||||
use: {
|
use: {
|
||||||
...devices['Desktop Chrome'],
|
...devices['Desktop Chrome'],
|
||||||
|
permissions: ['clipboard-read', 'clipboard-write'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -87,6 +88,7 @@ export default {
|
||||||
name: 'Mobile Chrome',
|
name: 'Mobile Chrome',
|
||||||
use: {
|
use: {
|
||||||
...devices['Pixel 5'],
|
...devices['Pixel 5'],
|
||||||
|
permissions: ['clipboard-read', 'clipboard-write'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,11 +10,9 @@
|
||||||
import {expect} from '@playwright/test';
|
import {expect} from '@playwright/test';
|
||||||
import {test} from './utils_e2e.ts';
|
import {test} from './utils_e2e.ts';
|
||||||
|
|
||||||
test.use({
|
test('copy src file path to clipboard', async ({page}, workerInfo) => {
|
||||||
permissions: ['clipboard-write'],
|
test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'Apple clipboard API addon - starting at just $499!');
|
||||||
});
|
|
||||||
|
|
||||||
test('copy src file path to clipboard', async ({page}) => {
|
|
||||||
const response = await page.goto('/user2/repo1/src/branch/master/README.md');
|
const response = await page.goto('/user2/repo1/src/branch/master/README.md');
|
||||||
expect(response?.status()).toBe(200);
|
expect(response?.status()).toBe(200);
|
||||||
|
|
||||||
|
@ -23,7 +21,9 @@ test('copy src file path to clipboard', async ({page}) => {
|
||||||
expect(clipboardText).toContain('README.md');
|
expect(clipboardText).toContain('README.md');
|
||||||
});
|
});
|
||||||
|
|
||||||
test('copy diff file path to clipboard', async ({page}) => {
|
test('copy diff file path to clipboard', async ({page}, workerInfo) => {
|
||||||
|
test.skip(['Mobile Safari', 'webkit'].includes(workerInfo.project.name), 'Apple clipboard API addon - starting at just $499!');
|
||||||
|
|
||||||
const response = await page.goto('/user2/repo1/src/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d/README.md');
|
const response = await page.goto('/user2/repo1/src/commit/65f1bf27bc3bf70f64657658635e66094edbcb4d/README.md');
|
||||||
expect(response?.status()).toBe(200);
|
expect(response?.status()).toBe(200);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue