Commit Graph

15 Commits

Author SHA1 Message Date
Dmitry Gozman
26c00a97a5
fix(expect): do not produce logs twice (#22171) 2023-04-03 15:05:40 -07:00
Max Schmitt
77c9641215
test: make Android bots green (#21450) 2023-03-07 17:53:39 +01:00
Pavel Feldman
06fc72b6ed
revert(#12706): also fix related bugs it introduced (#21070) 2023-02-21 14:15:11 -08:00
Andrey Lushnikov
72942e81d5
chore: fixes to toBeInViewport (#20870) 2023-02-13 15:21:40 -08:00
Andrey Lushnikov
68e170ef89
feat: implement expect(locator).toBeInViewport() (#20668)
The method accepts a `ratio` option to assert the ratio
of the element in viewport. `ratio` defaults to `Number.MIN_VALUE`.

NOTE: this reverts commit d950f5b6ee and
adds `ratio` option support + does the rename.

Fixes #8740
2023-02-10 04:33:22 -08:00
Dmitry Gozman
d950f5b6ee
chore: remove toIntersectViewport for the next release (#20232)
Mostly reverts #19901.
2023-01-19 15:04:09 -08:00
Andrey Lushnikov
780e64f2c6
test: fix toIntersectViewport test on WebKit @ Ubuntu 22.04 (#20132)
For some reason scrolling inline element into view doesn't
always work.
2023-01-16 00:11:33 -08:00
Andrey Lushnikov
2a49c5e498
feat(expect): introduce expect(locator).toIntersectViewport() (#19901)
This is a new web-first assertion that should be used like this:

```ts
test('should work', async ({ page }) => {
  const locator = page.locator('body');
  // New web-first assertion.
  await expect(locator).toIntersectViewport();
  // The same functionality.
  await expect.poll(() => locator.viewportRatio()).toBeGreaterThan(0);
});
```

Fixes #8740
2023-01-06 16:56:24 -08:00
Dmitry Gozman
4f72a895e9
fix(inspector): render expect.not correctly (#19125)
Also fixes the same in expect logs.

References #19083.
2022-11-28 20:50:16 -08:00
Yury Semikhatsky
cd9a5946d2
fix(expect): toHaveAttribute with empty value should not match missing attribute (#17477)
Reference #16517
2022-09-20 17:11:12 -07:00
Ross Wollman
8d639ae50e
chore: revert toHaveAttribute type sig and overloads (#17406)
Relates #16517.

Revert "docs(python): add missing NotToHaveAttribute overloads (#17371)"

This reverts commit 2e1ea29614.

Revert "docs(release-notes): add 1.26 release notes for language ports
(#17345)"

This reverts commit 4b8a85e69d.

Revert "test: unflake "should support boolean attribute with options"
(#17024)"

This reverts commit 1dc05bd4c6.

Revert "fix: support toHaveAttribute(name, options) (#16941)"

This reverts commit f30ac1d678.

Revert "feat: expect(locator).toHaveAttribute to assert attribute
presence (#16767)"

This reverts commit 622c73cc1e.
2022-09-16 11:17:35 -07:00
Dmitry Gozman
1dc05bd4c6
test: unflake "should support boolean attribute with options" (#17024)
Timeout 100ms is too small.
2022-09-01 17:04:54 -07:00
Yury Semikhatsky
f30ac1d678
fix: support toHaveAttribute(name, options) (#16941) 2022-08-30 17:53:00 -07:00
Andrey Lushnikov
622c73cc1e
feat: expect(locator).toHaveAttribute to assert attribute presence (#16767)
This patch changes `expect(locator).toHaveAttribute()` so that the
`value` argument can be omitted. When done so, the method will
assert attribute existance.

Fixes #16517
2022-08-25 05:28:34 -07:00
Dmitry Gozman
7acbd052e4
test: migrate some expect() tests to be more readable (#16394)
This moves some expect() matchers tests from test runner tests to page tests,
because these are implemented through a library call anyway.

Makes tests more readbable, faster and easier to test specific details.
2022-08-10 15:10:25 -07:00