From 4fb288e82c0ba13fc3224c6185dca25d638fbc3f Mon Sep 17 00:00:00 2001 From: archmans <13521010@std.stei.itb.ac.id> Date: Wed, 19 Apr 2023 17:39:56 +0700 Subject: [PATCH] add : test plan --- src/test_plan.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 src/test_plan.py diff --git a/src/test_plan.py b/src/test_plan.py new file mode 100644 index 0000000..7a0e5c3 --- /dev/null +++ b/src/test_plan.py @@ -0,0 +1,19 @@ +import pytest + +from PyQt6.QtCore import Qt, pyqtSignal +from PyQt6.QtGui import QPixmap, QCursor, QFont, QIcon +from PyQt6.QtWidgets import QApplication, QWidget, QLabel, QHBoxLayout, QVBoxLayout, QPushButton, QScrollArea + +from plan import plan + +@pytest.fixture +def app(): + app = plan() + yield app + +def test_window(app,qtbot): + # cek window title + assert app.windowTitle() == "FitU - Plan" + assert app.height() == 720 + assert app.width() == 1280 + assert len(app.findChildren(QPushButton)) == 10 \ No newline at end of file -- GitLab