chore: replace pptr with pw
This commit is contained in:
parent
fb9ec96e3e
commit
62ce5a6351
|
|
@ -9,9 +9,9 @@ RUN apt-get update && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Add user so we don't need --no-sandbox.
|
# Add user so we don't need --no-sandbox.
|
||||||
RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
|
RUN groupadd -r pwuser && useradd -r -g pwuser -G audio,video pwuser \
|
||||||
&& mkdir -p /home/pptruser/Downloads \
|
&& mkdir -p /home/pwuser/Downloads \
|
||||||
&& chown -R pptruser:pptruser /home/pptruser
|
&& chown -R pwuser:pwuser /home/pwuser
|
||||||
|
|
||||||
# Run everything after as non-privileged user.
|
# Run everything after as non-privileged user.
|
||||||
USER pptruser
|
USER pwuser
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ RUN apt-get update && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Add user so we don't need --no-sandbox.
|
# Add user so we don't need --no-sandbox.
|
||||||
RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
|
RUN groupadd -r pwuser && useradd -r -g pwuser -G audio,video pwuser \
|
||||||
&& mkdir -p /home/pptruser/Downloads \
|
&& mkdir -p /home/pwuser/Downloads \
|
||||||
&& chown -R pptruser:pptruser /home/pptruser
|
&& chown -R pwuser:pwuser /home/pwuser
|
||||||
|
|
||||||
# Run everything after as non-privileged user.
|
# Run everything after as non-privileged user.
|
||||||
USER pptruser
|
USER pwuser
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ RUN apt-get update && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Add user so we don't need --no-sandbox.
|
# Add user so we don't need --no-sandbox.
|
||||||
RUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser \
|
RUN groupadd -r pwuser && useradd -r -g pwuser -G audio,video pwuser \
|
||||||
&& mkdir -p /home/pptruser/Downloads \
|
&& mkdir -p /home/pwuser/Downloads \
|
||||||
&& chown -R pptruser:pptruser /home/pptruser
|
&& chown -R pwuser:pwuser /home/pwuser
|
||||||
|
|
||||||
# Run everything after as non-privileged user.
|
# Run everything after as non-privileged user.
|
||||||
USER pptruser
|
USER pwuser
|
||||||
|
|
|
||||||
|
|
@ -269,7 +269,7 @@ This will write shared memory files into `/tmp` instead of `/dev/shm`. See [crbu
|
||||||
|
|
||||||
Seeing other weird errors when launching Chrome? Try running your container
|
Seeing other weird errors when launching Chrome? Try running your container
|
||||||
with `docker run --cap-add=SYS_ADMIN` when developing locally. Since the Dockerfile
|
with `docker run --cap-add=SYS_ADMIN` when developing locally. Since the Dockerfile
|
||||||
adds a `pptr` user as a non-privileged user, it may not have all the necessary privileges.
|
adds a `pwuser` user as a non-privileged user, it may not have all the necessary privileges.
|
||||||
|
|
||||||
[dumb-init](https://github.com/Yelp/dumb-init) is worth checking out if you're
|
[dumb-init](https://github.com/Yelp/dumb-init) is worth checking out if you're
|
||||||
experiencing a lot of zombies Chrome processes sticking around. There's special
|
experiencing a lot of zombies Chrome processes sticking around. There's special
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT})
|
||||||
expect(coverage.find(entry => entry.url.startsWith('debugger://'))).not.toBe(null);
|
expect(coverage.find(entry => entry.url.startsWith('debugger://'))).not.toBe(null);
|
||||||
expect(coverage.length).toBe(2);
|
expect(coverage.length).toBe(2);
|
||||||
});
|
});
|
||||||
it('should ignore pptr internal scripts if reportAnonymousScripts is true', async function({page, server}) {
|
it('should ignore playwright internal scripts if reportAnonymousScripts is true', async function({page, server}) {
|
||||||
await page.coverage.startJSCoverage({reportAnonymousScripts: true});
|
await page.coverage.startJSCoverage({reportAnonymousScripts: true});
|
||||||
await page.goto(server.EMPTY_PAGE);
|
await page.goto(server.EMPTY_PAGE);
|
||||||
await page.evaluate('console.log("foo")');
|
await page.evaluate('console.log("foo")');
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ const util = require('util');
|
||||||
const rmAsync = util.promisify(require('rimraf'));
|
const rmAsync = util.promisify(require('rimraf'));
|
||||||
const mkdtempAsync = util.promisify(fs.mkdtemp);
|
const mkdtempAsync = util.promisify(fs.mkdtemp);
|
||||||
|
|
||||||
const TMP_FOLDER = path.join(os.tmpdir(), 'pptr_tmp_folder-');
|
const TMP_FOLDER = path.join(os.tmpdir(), 'pw_tmp_folder-');
|
||||||
|
|
||||||
module.exports.describe = function({testRunner, expect, playwright, defaultBrowserOptions, FFOX, CHROMIUM, WEBKIT}) {
|
module.exports.describe = function({testRunner, expect, playwright, defaultBrowserOptions, FFOX, CHROMIUM, WEBKIT}) {
|
||||||
const {describe, xdescribe, fdescribe} = testRunner;
|
const {describe, xdescribe, fdescribe} = testRunner;
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ const rmAsync = util.promisify(require('rimraf'));
|
||||||
const mkdtempAsync = util.promisify(fs.mkdtemp);
|
const mkdtempAsync = util.promisify(fs.mkdtemp);
|
||||||
const statAsync = util.promisify(fs.stat);
|
const statAsync = util.promisify(fs.stat);
|
||||||
|
|
||||||
const TMP_FOLDER = path.join(os.tmpdir(), 'pptr_tmp_folder-');
|
const TMP_FOLDER = path.join(os.tmpdir(), 'pw_tmp_folder-');
|
||||||
|
|
||||||
module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, WIN}) {
|
module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, WIN}) {
|
||||||
const {describe, xdescribe, fdescribe} = testRunner;
|
const {describe, xdescribe, fdescribe} = testRunner;
|
||||||
|
|
|
||||||
|
|
@ -58,12 +58,12 @@ module.exports.describe = function({testRunner, expect, FFOX, CHROMIUM, WEBKIT})
|
||||||
</svg>
|
</svg>
|
||||||
`);
|
`);
|
||||||
const element = await page.$('#therect');
|
const element = await page.$('#therect');
|
||||||
const pptrBoundingBox = await element.boundingBox();
|
const pwBoundingBox = await element.boundingBox();
|
||||||
const webBoundingBox = await page.evaluate(e => {
|
const webBoundingBox = await page.evaluate(e => {
|
||||||
const rect = e.getBoundingClientRect();
|
const rect = e.getBoundingClientRect();
|
||||||
return {x: rect.x, y: rect.y, width: rect.width, height: rect.height};
|
return {x: rect.x, y: rect.y, width: rect.width, height: rect.height};
|
||||||
}, element);
|
}, element);
|
||||||
expect(pptrBoundingBox).toEqual(webBoundingBox);
|
expect(pwBoundingBox).toEqual(webBoundingBox);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ const utils = require('./utils');
|
||||||
const rmAsync = util.promisify(require('rimraf'));
|
const rmAsync = util.promisify(require('rimraf'));
|
||||||
const mkdtempAsync = util.promisify(fs.mkdtemp);
|
const mkdtempAsync = util.promisify(fs.mkdtemp);
|
||||||
|
|
||||||
const TMP_FOLDER = path.join(os.tmpdir(), 'pptr_tmp_folder-');
|
const TMP_FOLDER = path.join(os.tmpdir(), 'pw_tmp_folder-');
|
||||||
|
|
||||||
module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, playwrightPath, product, CHROMIUM, FFOX, WEBKIT}) {
|
module.exports.describe = function({testRunner, expect, defaultBrowserOptions, playwright, playwrightPath, product, CHROMIUM, FFOX, WEBKIT}) {
|
||||||
const {describe, xdescribe, fdescribe} = testRunner;
|
const {describe, xdescribe, fdescribe} = testRunner;
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,8 @@ const {TestRunner, Reporter} = require('../utils/testrunner/');
|
||||||
const utils = require('./utils');
|
const utils = require('./utils');
|
||||||
|
|
||||||
let parallel = 1;
|
let parallel = 1;
|
||||||
if (process.env.PPTR_PARALLEL_TESTS)
|
if (process.env.PW_PARALLEL_TESTS)
|
||||||
parallel = parseInt(process.env.PPTR_PARALLEL_TESTS.trim(), 10);
|
parallel = parseInt(process.env.PW_PARALLEL_TESTS.trim(), 10);
|
||||||
const parallelArgIndex = process.argv.indexOf('-j');
|
const parallelArgIndex = process.argv.indexOf('-j');
|
||||||
if (parallelArgIndex !== -1)
|
if (parallelArgIndex !== -1)
|
||||||
parallel = parseInt(process.argv[parallelArgIndex + 1], 10);
|
parallel = parseInt(process.argv[parallelArgIndex + 1], 10);
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ This test runner is used internally by Playwright to test Playwright itself.
|
||||||
### Installation
|
### Installation
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
npm install --save-dev @pptr/testrunner
|
npm install --save-dev @playwright/testrunner
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
@ -23,7 +23,7 @@ node test.js
|
||||||
```
|
```
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const {TestRunner, Reporter, Matchers} = require('@pptr/testrunner');
|
const {TestRunner, Reporter, Matchers} = require('@playwright/testrunner');
|
||||||
|
|
||||||
// Runner holds and runs all the tests
|
// Runner holds and runs all the tests
|
||||||
const runner = new TestRunner({
|
const runner = new TestRunner({
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "@pptr/testrunner",
|
"name": "@playwright/testrunner",
|
||||||
"version": "0.8.0",
|
"version": "0.8.0",
|
||||||
"description": "Playwright testrunner",
|
"description": "Playwright testrunner",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ This test server is used internally by Playwright to test Playwright itself.
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const {TestServer} = require('@pptr/testserver');
|
const {TestServer} = require('@playwright/testrunner');
|
||||||
|
|
||||||
(async(() => {
|
(async(() => {
|
||||||
const httpServer = await TestServer.create(__dirname, 8000),
|
const httpServer = await TestServer.create(__dirname, 8000),
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"name": "@pptr/testserver",
|
"name": "@playwright/testrunner",
|
||||||
"version": "0.5.0",
|
"version": "0.5.0",
|
||||||
"description": "testing server",
|
"description": "testing server",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue