Polish PR template picker (#151415)

* 🔨 Set ignoreFocusOut to true on PR template selection

Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>

* 🔨 Translate PR template paths to relative in quick pick list

Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>

* 💄 Shorten line length

Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>

* ⚗️ Update tests with latest required args

Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>

* ⚗️ Update GitHub extension unit tests

Signed-off-by: Babak K. Shandiz <babak.k.shandiz@gmail.com>

Co-authored-by: João Moreno <joao.moreno@microsoft.com>
This commit is contained in:
Babak K. Shandiz
2022-06-10 12:54:37 +00:00
committed by GitHub
parent 85323c12b4
commit 766743629d
2 changed files with 18 additions and 16 deletions

View File

@@ -18,15 +18,15 @@ suite('github smoke test', function () {
test('should find all templates', async function () {
const expectedValuesSorted = [
'/PULL_REQUEST_TEMPLATE/a.md',
'/PULL_REQUEST_TEMPLATE/b.md',
'/docs/PULL_REQUEST_TEMPLATE.md',
'/docs/PULL_REQUEST_TEMPLATE/a.md',
'/docs/PULL_REQUEST_TEMPLATE/b.md',
'/.github/PULL_REQUEST_TEMPLATE.md',
'/.github/PULL_REQUEST_TEMPLATE/a.md',
'/.github/PULL_REQUEST_TEMPLATE/b.md',
'/PULL_REQUEST_TEMPLATE.md'
'PULL_REQUEST_TEMPLATE/a.md',
'PULL_REQUEST_TEMPLATE/b.md',
'docs/PULL_REQUEST_TEMPLATE.md',
'docs/PULL_REQUEST_TEMPLATE/a.md',
'docs/PULL_REQUEST_TEMPLATE/b.md',
'.github/PULL_REQUEST_TEMPLATE.md',
'.github/PULL_REQUEST_TEMPLATE/a.md',
'.github/PULL_REQUEST_TEMPLATE/b.md',
'PULL_REQUEST_TEMPLATE.md'
];
expectedValuesSorted.sort();
@@ -43,7 +43,7 @@ suite('github smoke test', function () {
const template1 = Uri.file("some-imaginary-template-1");
const templates = [template0, template1];
const pick = pickPullRequestTemplate(templates);
const pick = pickPullRequestTemplate(Uri.file("/"), templates);
await commands.executeCommand('workbench.action.quickOpenSelectNext');
await commands.executeCommand('workbench.action.quickOpenSelectNext');
@@ -55,7 +55,7 @@ suite('github smoke test', function () {
test('selecting first quick-pick item should return undefined', async () => {
const templates = [Uri.file("some-imaginary-file")];
const pick = pickPullRequestTemplate(templates);
const pick = pickPullRequestTemplate(Uri.file("/"), templates);
await commands.executeCommand('workbench.action.quickOpenSelectNext');
await commands.executeCommand('workbench.action.acceptSelectedQuickOpenItem');