Skip to content

Commit

Permalink
Remove log, fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
caalador committed Oct 14, 2024
1 parent 689fd64 commit 535c1c7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export default function Layout() {
location={location}>
{
createMenuItems().filter(({to}) => {
console.log("+++", to);
return to.startsWith("hilla") || to.startsWith("/hilla");
}).map(({ to, icon, title }) => (
<SideNavItem path={to} key={to}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default function Components() {
}

return (
<VerticalLayout theme="padding">
<VerticalLayout theme="padding" id={"components"}>
<Accordion>
<AccordionPanel>
<AccordionHeading slot="summary">summary</AccordionHeading>
Expand Down Expand Up @@ -237,7 +237,7 @@ export default function Components() {

<LoginForm></LoginForm>

<Button onClick={() => openLoginOverlay()}>Open Login
<Button onClick={() => openLoginOverlay()} id={"open-overlay"}>Open Login
Overlay</Button>
<LoginOverlay></LoginOverlay>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.vaadin.flow.component.button.testbench.ButtonElement;
import com.vaadin.flow.component.login.testbench.LoginOverlayElement;
import com.vaadin.flow.component.notification.testbench.NotificationElement;
import com.vaadin.flow.component.orderedlayout.testbench.VerticalLayoutElement;

public class ComponentsIT extends AbstractPlatformTest {

Expand All @@ -42,8 +44,10 @@ public void loadComponents() throws Exception {
$(NotificationElement.class).waitForFirst();

// Do something with the view
WebElement view = $("components-view").first().getWrappedElement();
getCommandExecutor().executeScript("arguments[0].openLoginOverlay()", view);
VerticalLayoutElement mainLayout = $(VerticalLayoutElement.class).id(
"components");
mainLayout.$(ButtonElement.class).id("open-overlay").click();

assertNotNull($(LoginOverlayElement.class).waitForFirst());
}

Expand Down

0 comments on commit 535c1c7

Please sign in to comment.