/
githubmirror
/
code-server
Обзор
Документация
Войти
/
githubmirror
/
code-server
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v4.128.0
test/e2e/github.test.ts
38 строк
2 KB
YONGJAE LEE (이용재)
fix: re-enable skipped Heart tests and make non-asserting checks assert (#7845)
16 июн 2026, 20:58
Не верифицирован
16 июн 2026, 20:58
7dfd685
Код
Авторство
О чём код?
import { test as base } from "@playwright/test" import { describe, expect, test } from "./baseFixture" if (process.env.GITHUB_TOKEN) { describe("GitHub token", ["--disable-workspace-trust"], {}, () => { test("should be logged in to pull requests extension", async ({ codeServerPage }) => { await codeServerPage.exec("git init") await codeServerPage.exec("git remote add origin https://github.com/coder/code-server") await codeServerPage.installExtension("GitHub.vscode-pull-request-github") await codeServerPage.executeCommandViaMenus("View: Show Github") await codeServerPage.page.click("text=Sign in") await codeServerPage.page.click("text=Allow") // It should ask to select an account, one of which will be the one we // pre-injected. await expect(codeServerPage.page.locator("text=Select an account")).not.toBeVisible() }) }) describe("No GitHub token", ["--disable-workspace-trust"], { GITHUB_TOKEN: "" }, () => { test("should not be logged in to pull requests extension", async ({ codeServerPage }) => { await codeServerPage.exec("git init") await codeServerPage.exec("git remote add origin https://github.com/coder/code-server") await codeServerPage.installExtension("GitHub.vscode-pull-request-github") await codeServerPage.executeCommandViaMenus("View: Show Github") await codeServerPage.page.click("text=Sign in") await codeServerPage.page.click("text=Allow") // Since there is no account it will ask directly for the token (because // we are on localhost; otherwise it would initiate the oauth flow). await expect(codeServerPage.page.locator("text=GitHub Personal Access Token")).not.toBeVisible() }) }) } else { base.describe("GitHub token", () => { base.skip("skipped because GITHUB_TOKEN is not set", () => { // Playwright will not show this without a function. }) }) }