工具生成版本

This commit is contained in:
ShaoHua
2025-12-29 00:41:26 +08:00
commit e2fc6b5d61
244 changed files with 20445 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
import { AppPage } from "./app.po";
import { browser, logging } from "protractor";
describe("workspace-project App", () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
it("should display welcome message", () => {
page.navigateTo();
expect(page.getTitleText()).toEqual("Demo app is running!");
});
afterEach(async () => {
// Assert that there are no errors emitted from the browser
const logs = await browser
.manage()
.logs()
.get(logging.Type.BROWSER);
expect(logs).not.toContain(
jasmine.objectContaining({
level: logging.Level.SEVERE
} as logging.Entry)
);
});
});
+11
View File
@@ -0,0 +1,11 @@
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}
getTitleText(): Promise<string> {
return element(by.css('app-root .content span')).getText() as Promise<string>;
}
}