Add manual tests for PC3

Summary:
These were super useful for spotting bugs in PC2.
They show many many issues already.

Visually they should match PC2. They don't

Some API doesn't map directly. Those tests
were removed.

Test Plan:
Opened in qmlscene
Everything binds correctly. Some things look horrible.

Reviewers: #plasma

Subscribers: kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D23827
This commit is contained in:
David Edmundson 2019-09-10 12:35:55 +02:00
parent d60831d650
commit 4ecdbe9622
8 changed files with 490 additions and 0 deletions

View File

@ -0,0 +1,37 @@
import QtQuick 2.0
import org.kde.plasma.components 3.0 as PlasmaComponents
Rectangle {
width: 600
height: 300
color: "white"
Column {
anchors.fill: parent
anchors.margins: 20
spacing: 20
PlasmaComponents.Label {
width: parent.width
wrapMode: Text.WordWrap
text: "When checking and unchecking the checkbox, " +
"the busy indicator should resume where it has " +
"paused and not glitch around"
}
Row {
spacing: 20
PlasmaComponents.BusyIndicator {
running: runningButton.checked
}
PlasmaComponents.CheckBox {
id: runningButton
text: "Running"
}
}
}
}

View File

@ -0,0 +1,93 @@
import QtQuick 2.0
import org.kde.plasma.components 3.0 as PlasmaComponents
import QtQuick.Layouts 1.2
Rectangle
{
width: 500
height: 500
color: "white"
Grid {
anchors.fill: parent
anchors.margins: 20
spacing: 20
columns: 2
Label {
text: "icon + text"
}
PlasmaComponents.Button {
icon.name: "list-remove"
text: "test"
}
Label {
text: "icon alone, should look small and square"
}
PlasmaComponents.Button {
icon.name: "list-remove"
}
Label {
text: "text alone, should be about 12 chars wide"
}
PlasmaComponents.Button {
text: "test"
}
Label {
text: "long text, should expand to fit"
}
PlasmaComponents.Button {
icon.name: "list-remove"
text: "This is a really really really really long button"
}
Label {
text: "long text but constrained, should be 150px and elided"
}
PlasmaComponents.Button {
icon.name: "list-remove"
text: "This is a really really really really long button"
width: 150
}
Label {
text: "button (with or without icon) and textfield should have the same height"
}
RowLayout {
PlasmaComponents.Button {
text: "test"
}
PlasmaComponents.Button {
icon.name: "application-menu"
text: "test"
}
PlasmaComponents.TextField {
}
}
Label {
text: "minimum width property. Should be two letters wide"
}
RowLayout {
PlasmaComponents.Button {
text: "AA"
// implicitWidth: minimumWidth FIXME, there is no equivalent?
}
}
}
}

View File

@ -0,0 +1,67 @@
import QtQuick 2.0
import org.kde.plasma.components 3.0 as PlasmaComponents
import QtQuick.Layouts 1.2
Rectangle
{
width: 500
height: 500
color: "white"
Grid {
anchors.fill: parent
anchors.margins: 20
spacing: 4
columns: 2
Label {
text: "text"
}
PlasmaComponents.CheckBox {
text: "Some awesome checkbox"
}
Label {
text: "focus"
}
PlasmaComponents.CheckBox {
text: "Some awesome checkbox"
focus: true
}
Label {
text: "checked"
}
PlasmaComponents.CheckBox {
text: "Some awesome checkbox"
checkState: Qt.Checked
}
Label {
text: "tri-state"
}
PlasmaComponents.CheckBox {
text: "Some awesome checkbox"
checkState: Qt.PartiallyChecked
}
Label {
text: "disabled"
}
PlasmaComponents.CheckBox {
text: "Some awesome checkbox"
enabled: false
}
Label {
text: "disabled and checked"
}
PlasmaComponents.CheckBox {
text: "Some awesome checkbox"
enabled: false
checkState: Qt.Checked
}
}
}

View File

@ -0,0 +1,116 @@
import QtQuick 2.0
import org.kde.plasma.components 3.0 as PlasmaComponents
Rectangle {
id: root
color: "white"
width: 900
height: 600
Flow {
anchors.fill: parent
anchors.margins: 20
spacing: 20
Column {
Text {
text: "0%"
}
PlasmaComponents.ProgressBar {
from: 0
to: 100
value: 0
}
}
Column {
Text {
text: "50%"
}
PlasmaComponents.ProgressBar {
from: 0
to: 100
value: 50
}
}
Column {
Text {
text: "100%"
}
PlasmaComponents.ProgressBar {
from: 0
to: 100
value: 100
}
}
Column {
Text {
text: "Make sure the bar does\nnot leak outside"
}
PlasmaComponents.ProgressBar {
from: 0
to: 200
value: 1
}
}
Column {
Text {
text: "should look like 100%"
}
PlasmaComponents.ProgressBar {
from: 0
to: 100
value: 110
}
}
Column {
Text {
text: "QA Style 50%"
}
PlasmaComponents.ProgressBar {
from: -100
to: 100
value: 0
}
}
Column {
Text {
text: "should look like 0%"
}
PlasmaComponents.ProgressBar {
from: 0
to: 100
value: -10
}
}
Column {
Text {
text: "should be a continuous movement,<br>from one end to the other and back"
}
PlasmaComponents.ProgressBar {
indeterminate: indeterminateCheckBox.checked
value: 0.5
}
}
Column {
Text {
text: "Checking and unchecking should not break the layout,<br>should look like 50% if unchecked"
}
PlasmaComponents.CheckBox {
id: indeterminateCheckBox
text: "Indeterminate"
checked: true
}
}
}
}

View File

@ -0,0 +1,59 @@
import QtQuick 2.0
import org.kde.plasma.components 2.0 as PlasmaComponents
import QtQuick.Layouts 1.2
Rectangle
{
width: 500
height: 500
color: "white"
Grid {
anchors.fill: parent
anchors.margins: 20
spacing: 4
columns: 2
Label {
text: "text"
}
PlasmaComponents.RadioButton {
text: "Some awesome radiobutton"
}
Label {
text: "focus"
}
PlasmaComponents.RadioButton {
text: "Some awesome radiobutton"
focus: true
}
Label {
text: "checked"
}
PlasmaComponents.RadioButton {
text: "Some awesome radiobutton"
checked: true
}
Label {
text: "disabled"
}
PlasmaComponents.RadioButton {
text: "Some awesome radiobutton"
enabled: false
}
Label {
text: "disabled and checked"
}
PlasmaComponents.RadioButton {
text: "Some awesome radiobutton"
enabled: false
checked: true
}
}
}

View File

@ -0,0 +1,38 @@
import QtQuick 2.0
import org.kde.plasma.components 3.0 as PlasmaComponents
Rectangle {
id: root
color: "white"
width: 800
height: 300
property string longText: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed at volutpat nibh, non elementum nulla. Nunc sem magna, semper sit amet sollicitudin et, vestibulum sed metus. Fusce tempor dolor purus, non posuere urna sodales in. Aenean eu erat ipsum. Fusce egestas pulvinar nisi. Mauris vel enim tincidunt, elementum diam sed, tincidunt nulla. Maecenas tempus vitae ligula et convallis. Nullam justo velit, dignissim a nisl at, blandit posuere leo. Maecenas ac scelerisque odio, eget placerat ipsum. Ut iaculis, tortor et ullamcorper fringilla, mauris neque dapibus arcu, eget suscipit libero libero ut nunc. Sed maximus enim a ligula facilisis, non efficitur dolor blandit. Curabitur venenatis mattis erat ac gravida."
Flow {
anchors.fill: parent
anchors.margins: 20
spacing: 20
PlasmaComponents.TextArea {
placeholderText: "CHEESE"
width: 150
height: 100
}
PlasmaComponents.TextArea {
text: root.longText
width: 150
height: 100
}
PlasmaComponents.TextArea {
text: root.longText
wrapMode: Text.Wrap
width: 150
height: 100
}
}
}

View File

@ -0,0 +1,36 @@
import QtQuick 2.0
import org.kde.plasma.components 3.0 as PlasmaComponents
Rectangle {
id: root
color: "white"
width: 800
height: 300
property string longText: "This is a longer sentence"
Flow {
anchors.fill: parent
anchors.margins: 20
spacing: 20
PlasmaComponents.TextField {
placeholderText: longText
}
PlasmaComponents.TextField {
text: root.longText
}
PlasmaComponents.TextField {
width: 400
placeholderText: longText
}
PlasmaComponents.TextField {
text: root.longText
echoMode: TextInput.Password
}
}
}

View File

@ -0,0 +1,44 @@
import QtQuick 2.0
import org.kde.plasma.components 3.0 as PlasmaComponents
Rectangle
{
width: 500
height: 300
color: "white"
Flow {
anchors.fill: parent
anchors.margins: 20
spacing: 20
PlasmaComponents.ToolButton {
icon.name: "list-remove"
text: "test"
flat: true
}
PlasmaComponents.ToolButton {
icon.name: "list-remove"
flat: true
}
PlasmaComponents.ToolButton {
text: "test"
flat: true
}
PlasmaComponents.ToolButton {
icon.name: "list-remove"
text: "test"
flat: false
}
PlasmaComponents.ToolButton {
icon.name: "list-remove"
flat: false
}
PlasmaComponents.ToolButton {
text: "test"
flat: false
}
}
}