Skip to content

Commit d8f809f

Browse files
authored
fix pkg_admin_page_test.dart for forks (#7750)
1 parent 116f762 commit d8f809f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pkg/pub_integration/test/pkg_admin_page_test.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
import 'dart:convert';
66

7+
import 'dart:io' show Platform;
8+
79
import 'package:http/http.dart' as http;
810
import 'package:pub_integration/src/fake_test_context_provider.dart';
911
import 'package:pub_integration/src/pub_puppeteer_helpers.dart';
@@ -44,6 +46,9 @@ void main() {
4446
final user =
4547
await fakeTestScenario.createTestUser(email: '[email protected]');
4648

49+
final githubRepository =
50+
Platform.environment['GITHUB_REPOSITORY'] ?? 'dart-lang/pub-dev';
51+
4752
// github publishing
4853
await user.withBrowserPage((page) async {
4954
await page.gotoOrigin('/packages/test_pkg/admin');
@@ -54,14 +59,14 @@ void main() {
5459
'#-pkg-admin-automated-github-tagpattern',
5560
]);
5661
await page.waitFocusAndType(
57-
'#-pkg-admin-automated-github-repository', 'dart-lang/pub-dev');
62+
'#-pkg-admin-automated-github-repository', githubRepository);
5863
await page.waitAndClick('#-pkg-admin-automated-button',
5964
waitForOneResponse: true);
6065
await page.waitAndClickOnDialogOk();
6166
await page.reload();
6267
final value = await page.propertyValue(
6368
'#-pkg-admin-automated-github-repository', 'value');
64-
expect(value, 'dart-lang/pub-dev');
69+
expect(value, githubRepository);
6570
});
6671
});
6772
},

0 commit comments

Comments
 (0)