Skip to content

Commit

Permalink
test: Simplify test (#12414)
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur- authored Nov 22, 2021
1 parent e43db2a commit 895f640
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
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

0 comments on commit 895f640

Please sign in to comment.