Skip to content

Commit

Permalink
Reload issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sergesoroka committed May 28, 2024
1 parent 4ce44c2 commit 7ede3bd
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 7 deletions.
8 changes: 1 addition & 7 deletions src/pages/HomePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,10 @@ export default function HomePage() {
const uuidParams = queryParams.get("uuid");
const wizardParams = queryParams.get("wizard");

// if (uuidParams) {
// setUUID(uuidParams);
// }

console.log("home", UUID);

return (
<>
{wizardParams && <WizardPage />}
{UUID ? <TemplatePage uuid={UUID} /> : null}
{uuidParams || UUID ? <TemplatePage uuid={UUID} /> : null}
{!uuidParams && !wizardParams && <StartScreenComp />}
</>
);
Expand Down
46 changes: 46 additions & 0 deletions test/other_tests/create-and-find.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* eslint-disable no-undef */
const { Builder, Browser, By } = require("selenium-webdriver");

describe("Create New Template and Find it in Table", function () {
let driver;

const templateNme = "Template for testing1";

before(async function () {
driver = await new Builder().forBrowser(Browser.CHROME).build();
});

it("should create a New Template", async function () {
await driver.get("https://enm-dev.adma.ai/designer");

await driver.findElement(By.className("createNewBtn")).click();

await driver.findElement(By.id("name")).sendKeys(templateNme);

await driver
.findElement(By.id("author"))
.sendKeys("Selenium Testing: Author");

await driver
.findElement(By.id("template_acknowledgment"))
.sendKeys("Selenium Testing: Acknowledgment");

await driver.findElement(By.id("create_new")).click();

await driver.sleep(5000);

await driver.findElement(By.className("logoWrap")).click();
});

it("should find a New Template in Table", async function () {
await driver
.findElement(By.className("search"))
.sendKeys(templateNme, Key.RETURN);

await driver.sleep(5000);
});

after(async function () {
await driver.quit();
});
});

0 comments on commit 7ede3bd

Please sign in to comment.