diff --git a/pkg/pub_integration/test/search_update_test.dart b/pkg/pub_integration/test/search_update_test.dart index 50ba25e75..e00f975b9 100644 --- a/pkg/pub_integration/test/search_update_test.dart +++ b/pkg/pub_integration/test/search_update_test.dart @@ -37,6 +37,7 @@ void main() { // This imports 100 packages with these semi-random tags, and adding and // removing filters works because of the number of packages and their // tags are kind of random. + print('01'); await httpClient.post(Uri.parse('$origin/fake-test-profile'), body: json.encode({ 'testProfile': { @@ -53,6 +54,7 @@ void main() { final user = await fakeTestScenario.createAnonymousTestUser(); + print('02'); // listing page await user.withBrowserPage( (page) async { @@ -89,6 +91,7 @@ void main() { expect(i2.openSections, isEmpty); expect(page.url, '$origin/packages?q=platform%3Aandroid'); + print('03'); // Open SDKs section final flutterCB3 = await page.$('#search-form-checkbox-sdk-flutter'); expect(await flutterCB3.boundingBox, isNull); @@ -112,6 +115,7 @@ void main() { page.url, '$origin/packages?q=platform%3Aandroid+sdk%3Aflutter'); expect(i3.openSections, ['sdks']); + print('04'); // unclick Flutter final flutterCB4 = await page.$('#search-form-checkbox-sdk-flutter'); final flutterLink = await flutterCB4.$x('../following-sibling::*'); @@ -143,6 +147,7 @@ void main() { .toList(); expect(both3And5, isEmpty); + print('05'); expect(i5.openSections, ['sdks']); expect(page.url, '$origin/packages?q=platform%3Aandroid+-sdk%3Aflutter+pkg'); @@ -172,6 +177,7 @@ void main() { expect(page.url, '$origin/packages?q=platform%3Aandroid+show%3Aunlisted+pkg'); + print('06'); // remove discontinued await page.click('#search-form-checkbox-show-unlisted'); await page.waitForNavigation(wait: Until.networkIdle); @@ -187,11 +193,13 @@ void main() { expect(page.url, '$origin/packages?q=platform%3Aandroid+pkg'); } + print('07'); await toggleMore('is', 'dart3-compatible'); await toggleMore('is', 'flutter-favorite'); }, ); + print('08'); // type + multiple checkbox clicks await user.withBrowserPage( (page) async { @@ -208,7 +216,9 @@ void main() { await page.waitForSelector(targetSelector, visible: true); await page.click(targetSelector); } + print('09'); await page.waitForNavigation(wait: Until.networkIdle); + print('10'); expect( page.url, allOf( @@ -221,6 +231,7 @@ void main() { expect(await page.propertyValue('input[name="q"]', 'value'), 'platform:android platform:web platform:ios pkg'); + print('11'); await page.click('#search-form-checkbox-platform-windows'); await page.waitForNavigation(wait: Until.networkIdle); expect( @@ -237,6 +248,7 @@ void main() { }, ); + print('12'); // licenses await user.withBrowserPage( (page) async { @@ -247,6 +259,7 @@ void main() { await page.waitAndClick('#search-form-checkbox-license-osi-approved'); await page.waitForNavigation(wait: Until.networkIdle); + print('13'); expect(await page.propertyValue('input[name="q"]', 'value'), 'license:osi-approved'); final pageInfo = await listingPageInfo(page); @@ -255,6 +268,7 @@ void main() { }, ); + print('14'); // back button working with checkboxes await user.withBrowserPage( (page) async { @@ -267,6 +281,7 @@ void main() { expect(page.url, '$origin/packages?q=pkg'); expect(await page.propertyValue('input[name="q"]', 'value'), 'pkg'); + print('15'); await page.click('#search-form-checkbox-platform-android'); await page.waitForNavigation(wait: Until.networkIdle); expect(page.url, '$origin/packages?q=platform%3Aandroid+pkg'); @@ -279,6 +294,7 @@ void main() { }, ); + print('16'); // back button updating the URL and the input text await user.withBrowserPage( (page) async { @@ -291,6 +307,7 @@ void main() { expect(page.url, '$origin/packages?q=pkg'); expect(await page.propertyValue('input[name="q"]', 'value'), 'pkg'); + print('17'); await page.focus('input[name="q"]'); await page.keyboard.press(Key.arrowDown); await page.keyboard.press(Key.backspace); @@ -306,6 +323,7 @@ void main() { }, ); + print('18'); // Clicking on a tag keeps the search context. await user.withBrowserPage((page) async { await page.gotoOrigin('/packages?q=pkg+platform:android'); @@ -315,6 +333,7 @@ void main() { expect( page.url, '$origin/packages?q=platform%3Aandroid+sdk%3Adart+pkg'); }); + print('19'); }); }, timeout: Timeout.factor(testTimeoutFactor)); }