mirror of
https://github.com/Sosokker/B2D-Ventures.git
synced 2025-12-18 13:34:06 +01:00
First Test pass
This commit is contained in:
parent
65ad1e2661
commit
8cf74b5e4c
@ -36,7 +36,7 @@ export async function deleteUserByEmail(email: string): Promise<boolean> {
|
||||
console.error(`UID is null`);
|
||||
return false;
|
||||
}
|
||||
// const data = await deleteUser(uid);
|
||||
console.log(`Successfully delete user with email: ${email}`);
|
||||
await deleteUser(uid);
|
||||
console.log(`Successfully delete user with email: ${email} and UID: ${uid}`);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ export const selectFirstOption = async (page: Page, triggerLocator: Locator) =>
|
||||
const optionText = await firstOption.textContent();
|
||||
console.log(`${optionText}`);
|
||||
await firstOption.click();
|
||||
console.log("Selected.");
|
||||
selected = true
|
||||
} catch (error) {
|
||||
console.log("Retrying as the combobox disappeared.");
|
||||
|
||||
@ -1,20 +1,20 @@
|
||||
// import { test, expect } from "@playwright/test";
|
||||
// import { login } from "./helpers/login";
|
||||
// import { selectFirstOption } from "./helpers/dropdownUtils";
|
||||
//
|
||||
// test("test", async ({ page }) => {
|
||||
// await login(page, "user");
|
||||
// await page.getByRole('button', { name: 'Businesses' }).hover();
|
||||
// await page.getByRole("link", { name: "Business Apply to raise on on" }).click();
|
||||
//
|
||||
// await selectFirstOption(page, page.locator("button").filter({ hasText: "Select an industry" }));
|
||||
// await selectFirstOption(page, page.locator("button").filter({ hasText: "Select a country" }));
|
||||
// await page.getByPlaceholder("$").fill("999998");
|
||||
// await page.getByRole("button", { name: "Yes" }).first().click();
|
||||
// await page.getByRole("button", { name: "Yes" }).nth(1).click();
|
||||
// await page.getByRole("button", { name: "Yes" }).nth(2).click();
|
||||
// await page.getByPlaceholder('https:// ').fill('https://www.test.md');
|
||||
// await selectFirstOption(page, page.locator("button").filter({ hasText: "Select" }));
|
||||
// await page.locator("#companyName").fill("kasetsart");
|
||||
// await page.getByRole('button', { name: 'Submit application' }).click();
|
||||
// });
|
||||
import { test } from "@playwright/test";
|
||||
import { login } from "./helpers/login";
|
||||
import { selectFirstOption } from "./helpers/dropdownUtils";
|
||||
|
||||
test("test", async ({ page }) => {
|
||||
await login(page, "user");
|
||||
await page.getByRole('button', { name: 'Businesses' }).hover();
|
||||
await page.getByRole("link", { name: "Business Apply to raise on on" }).click();
|
||||
|
||||
await selectFirstOption(page, page.locator("button").filter({ hasText: "Select an industry" }));
|
||||
await selectFirstOption(page, page.locator("button").filter({ hasText: "Select a country" }));
|
||||
await page.getByPlaceholder("$").fill("999998");
|
||||
await page.getByRole("button", { name: "Yes" }).first().click();
|
||||
await page.getByRole("button", { name: "Yes" }).nth(1).click();
|
||||
await page.getByRole("button", { name: "Yes" }).nth(2).click();
|
||||
await page.getByPlaceholder('https:// ').fill('https://www.test.md');
|
||||
await selectFirstOption(page, page.locator("button").filter({ hasText: "Select" }));
|
||||
await page.locator("#companyName").fill("kasetsart");
|
||||
await page.getByRole('button', { name: 'Submit application' }).click();
|
||||
});
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
// import { test, expect } from '@playwright/test';
|
||||
//
|
||||
// test('test', async ({ page }) => {
|
||||
//
|
||||
// });
|
||||
Loading…
Reference in New Issue
Block a user