Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Simplify test #12414

Merged
merged 1 commit into from
Nov 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
package com.vaadin.viteapp;

import com.vaadin.flow.component.html.testbench.ParagraphElement;
import com.vaadin.flow.testutil.ChromeBrowserTest;
import com.vaadin.flow.testutil.DevModeGizmoElement;
import com.vaadin.testbench.TestBenchElement;
import com.vaadin.viteapp.views.empty.MainView;

import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;

import io.github.bonigarcia.wdm.WebDriverManager;

public class BasicsIT extends ViteDevModeIT {

@Test
Expand All @@ -24,8 +19,6 @@ public void applicationStarts() {

@Test
public void imageFromThemeShown() {
getDriver().get(getRootURL());
waitForDevServer();
TestBenchElement img = $("img").id(MainView.PLANT);
waitUntil(driver -> {
String heightString = (String) executeScript(
Expand All @@ -38,8 +31,6 @@ public void imageFromThemeShown() {

@Test
public void applicationUsesVite() {
getDriver().get(getRootURL());
waitForDevServer();
TestBenchElement viteStatus = $(ParagraphElement.class).id("status");
Assert.assertEquals("Vite feature is true", viteStatus.getText());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,19 @@
import java.io.IOException;
import java.nio.charset.StandardCharsets;

import io.github.bonigarcia.wdm.WebDriverManager;
import com.vaadin.testbench.TestBenchElement;

import org.apache.commons.io.FileUtils;
import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import org.openqa.selenium.By;

import com.vaadin.flow.testutil.ChromeBrowserTest;
import com.vaadin.testbench.TestBenchElement;

public class ThemeReloadIT extends ViteDevModeIT {

@Test
@Ignore
public void updateStyle_changeIsReloaded() throws IOException {
getDriver().get(getRootURL());
waitForDevServer();
getCommandExecutor().waitForVaadin();
TestBenchElement header = $("h2").first();
Assert.assertEquals("rgba(0, 0, 255, 1)", header.getCssValue("color"));

Expand Down