Skip to content

Commit a51dc8b

Browse files
committed
Run npm run unit
1 parent 51d1b63 commit a51dc8b

File tree

2 files changed

+70
-58
lines changed

2 files changed

+70
-58
lines changed

test/playwright.spec.js

+56-56
Original file line numberDiff line numberDiff line change
@@ -156,66 +156,66 @@ module.exports.describe = ({testRunner, product, playwrightPath}) => {
156156

157157
// Page-level tests that are given a browser, a context and a page.
158158
// Each test is launched in a new browser context.
159-
testRunner.loadTests(require('./accessibility.spec.js'), testOptions);
160-
testRunner.loadTests(require('./click.spec.js'), testOptions);
161-
testRunner.loadTests(require('./cookies.spec.js'), testOptions);
162-
testRunner.loadTests(require('./dialog.spec.js'), testOptions);
163-
testRunner.loadTests(require('./elementhandle.spec.js'), testOptions);
164-
testRunner.loadTests(require('./emulation.spec.js'), testOptions);
165-
testRunner.loadTests(require('./evaluation.spec.js'), testOptions);
166-
testRunner.loadTests(require('./frame.spec.js'), testOptions);
167-
testRunner.loadTests(require('./focus.spec.js'), testOptions);
168-
testRunner.loadTests(require('./input.spec.js'), testOptions);
169-
testRunner.loadTests(require('./jshandle.spec.js'), testOptions);
170-
testRunner.loadTests(require('./keyboard.spec.js'), testOptions);
171-
testRunner.loadTests(require('./mouse.spec.js'), testOptions);
172-
testRunner.loadTests(require('./navigation.spec.js'), testOptions);
173-
testRunner.loadTests(require('./network.spec.js'), testOptions);
174-
testRunner.loadTests(require('./page.spec.js'), testOptions);
159+
// testRunner.loadTests(require('./accessibility.spec.js'), testOptions);
160+
// testRunner.loadTests(require('./click.spec.js'), testOptions);
161+
// testRunner.loadTests(require('./cookies.spec.js'), testOptions);
162+
// testRunner.loadTests(require('./dialog.spec.js'), testOptions);
163+
// testRunner.loadTests(require('./elementhandle.spec.js'), testOptions);
164+
// testRunner.loadTests(require('./emulation.spec.js'), testOptions);
165+
// testRunner.loadTests(require('./evaluation.spec.js'), testOptions);
166+
// testRunner.loadTests(require('./frame.spec.js'), testOptions);
167+
// testRunner.loadTests(require('./focus.spec.js'), testOptions);
168+
// testRunner.loadTests(require('./input.spec.js'), testOptions);
169+
// testRunner.loadTests(require('./jshandle.spec.js'), testOptions);
170+
// testRunner.loadTests(require('./keyboard.spec.js'), testOptions);
171+
// testRunner.loadTests(require('./mouse.spec.js'), testOptions);
172+
// testRunner.loadTests(require('./navigation.spec.js'), testOptions);
173+
// testRunner.loadTests(require('./network.spec.js'), testOptions);
174+
// testRunner.loadTests(require('./page.spec.js'), testOptions);
175175
testRunner.loadTests(require('./queryselector.spec.js'), testOptions);
176-
testRunner.loadTests(require('./screenshot.spec.js'), testOptions);
177-
testRunner.loadTests(require('./waittask.spec.js'), testOptions);
178-
testRunner.loadTests(require('./interception.spec.js'), testOptions);
179-
testRunner.loadTests(require('./geolocation.spec.js'), testOptions);
180-
testRunner.loadTests(require('./workers.spec.js'), testOptions);
181-
testRunner.loadTests(require('./capabilities.spec.js'), testOptions);
182-
183-
if (CHROMIUM) {
184-
testRunner.loadTests(require('./chromium/chromium.spec.js'), testOptions);
185-
testRunner.loadTests(require('./chromium/coverage.spec.js'), testOptions);
186-
testRunner.loadTests(require('./chromium/pdf.spec.js'), testOptions);
187-
testRunner.loadTests(require('./chromium/session.spec.js'), testOptions);
188-
}
189-
190-
if (CHROMIUM || FFOX) {
191-
testRunner.loadTests(require('./features/permissions.spec.js'), testOptions);
192-
}
193-
194-
if (WEBKIT) {
195-
testRunner.loadTests(require('./webkit/provisional.spec.js'), testOptions);
196-
}
176+
// testRunner.loadTests(require('./screenshot.spec.js'), testOptions);
177+
// testRunner.loadTests(require('./waittask.spec.js'), testOptions);
178+
// testRunner.loadTests(require('./interception.spec.js'), testOptions);
179+
// testRunner.loadTests(require('./geolocation.spec.js'), testOptions);
180+
// testRunner.loadTests(require('./workers.spec.js'), testOptions);
181+
// testRunner.loadTests(require('./capabilities.spec.js'), testOptions);
182+
183+
// if (CHROMIUM) {
184+
// testRunner.loadTests(require('./chromium/chromium.spec.js'), testOptions);
185+
// testRunner.loadTests(require('./chromium/coverage.spec.js'), testOptions);
186+
// testRunner.loadTests(require('./chromium/pdf.spec.js'), testOptions);
187+
// testRunner.loadTests(require('./chromium/session.spec.js'), testOptions);
188+
// }
189+
190+
// if (CHROMIUM || FFOX) {
191+
// testRunner.loadTests(require('./features/permissions.spec.js'), testOptions);
192+
// }
193+
194+
// if (WEBKIT) {
195+
// testRunner.loadTests(require('./webkit/provisional.spec.js'), testOptions);
196+
// }
197197
});
198198

199-
// Browser-level tests that are given a browser.
200-
testRunner.loadTests(require('./browser.spec.js'), testOptions);
201-
testRunner.loadTests(require('./browsercontext.spec.js'), testOptions);
202-
testRunner.loadTests(require('./ignorehttpserrors.spec.js'), testOptions);
203-
testRunner.loadTests(require('./popup.spec.js'), testOptions);
199+
// // Browser-level tests that are given a browser.
200+
// testRunner.loadTests(require('./browser.spec.js'), testOptions);
201+
// testRunner.loadTests(require('./browsercontext.spec.js'), testOptions);
202+
// testRunner.loadTests(require('./ignorehttpserrors.spec.js'), testOptions);
203+
// testRunner.loadTests(require('./popup.spec.js'), testOptions);
204204
});
205205

206206
// Top-level tests that launch Browser themselves.
207-
testRunner.loadTests(require('./defaultbrowsercontext.spec.js'), testOptions);
208-
testRunner.loadTests(require('./fixtures.spec.js'), testOptions);
209-
testRunner.loadTests(require('./launcher.spec.js'), testOptions);
210-
testRunner.loadTests(require('./headful.spec.js'), testOptions);
211-
testRunner.loadTests(require('./multiclient.spec.js'), testOptions);
212-
213-
if (CHROMIUM) {
214-
testRunner.loadTests(require('./chromium/launcher.spec.js'), testOptions);
215-
testRunner.loadTests(require('./chromium/headful.spec.js'), testOptions);
216-
testRunner.loadTests(require('./chromium/oopif.spec.js'), testOptions);
217-
testRunner.loadTests(require('./chromium/tracing.spec.js'), testOptions);
218-
}
219-
220-
testRunner.loadTests(require('./web.spec.js'), testOptions);
207+
// testRunner.loadTests(require('./defaultbrowsercontext.spec.js'), testOptions);
208+
// testRunner.loadTests(require('./fixtures.spec.js'), testOptions);
209+
// testRunner.loadTests(require('./launcher.spec.js'), testOptions);
210+
// testRunner.loadTests(require('./headful.spec.js'), testOptions);
211+
// testRunner.loadTests(require('./multiclient.spec.js'), testOptions);
212+
213+
// if (CHROMIUM) {
214+
// testRunner.loadTests(require('./chromium/launcher.spec.js'), testOptions);
215+
// testRunner.loadTests(require('./chromium/headful.spec.js'), testOptions);
216+
// testRunner.loadTests(require('./chromium/oopif.spec.js'), testOptions);
217+
// testRunner.loadTests(require('./chromium/tracing.spec.js'), testOptions);
218+
// }
219+
220+
// testRunner.loadTests(require('./web.spec.js'), testOptions);
221221
};

test/queryselector.spec.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -484,8 +484,20 @@ module.exports.describe = function({testRunner, expect, selectors, FFOX, CHROMIU
484484
});
485485
});
486486

487-
describe('text selector', () => {
488-
it('query', async ({page}) => {
487+
fdescribe('text selector', () => {
488+
fit('query', async ({page}) => {
489+
/** Succeeds */
490+
await page.setContent(`<button> MY BUTTON </button>`);
491+
expect(await page.$eval(`text=MY BUTTON`, e => e.outerHTML)).toBe('<button> MY BUTTON </button>');
492+
493+
/** Succeeds: As RegExp case-insensitive */
494+
await page.setContent(`<button> MY BUTTON </button>`);
495+
expect(await page.$eval(`text=/My Button/i`, e => e.outerHTML)).toBe('<button> MY BUTTON </button>');
496+
497+
/** Fails */
498+
await page.setContent(`<button> MY BUTTON </button>`);
499+
expect(await page.$eval(`text=My Button`, e => e.outerHTML)).toBe('<button> MY BUTTON </button>');
500+
489501
await page.setContent(`<div>yo</div><div>ya</div><div>\nye </div>`);
490502
expect(await page.$eval(`text=ya`, e => e.outerHTML)).toBe('<div>ya</div>');
491503
expect(await page.$eval(`text="ya"`, e => e.outerHTML)).toBe('<div>ya</div>');

0 commit comments

Comments
 (0)