-
Notifications
You must be signed in to change notification settings - Fork 9
Add tests for canvas #342
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
base: develop
Are you sure you want to change the base?
Add tests for canvas #342
Changes from 1 commit
b69cbfa
1fedf97
ab10919
b54d45c
815a96b
eed1aa4
a51282f
2af24ac
2499bcf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,40 +37,34 @@ final class CanvasTests: DesignerTests { | |
| XCTAssertTrue(app.staticTexts["Add your screenshot"].exists) | ||
| assertNavigatorElements(count: 0) | ||
|
|
||
| let menuBarsQuery = app.menuBars | ||
| let editMenuBarItem = menuBarsQuery.menuBarItems["Edit"] | ||
| editMenuBarItem.click() | ||
| menuBarsQuery.menuItems["Undo"].click() | ||
| statusBar | ||
| .clickEdit() | ||
| .clickUndoMenu() | ||
| XCTAssertFalse(app.staticTexts["Add your screenshot"].exists) | ||
|
||
| assertNavigatorElements(count: 1) | ||
|
||
| //editMenuBarItem.click() | ||
| //menuBarsQuery.menuItems["Redo"].click() | ||
| //XCTAssertTrue(app.staticTexts["Add your screenshot"].exists) | ||
| /*statusBar | ||
| .clickEdit() | ||
| .clickRedoMenu() | ||
| XCTAssertTrue(app.staticTexts["Add your screenshot"].exists)*/ | ||
|
|
||
| } | ||
|
|
||
| func testDragUndoRedo() { | ||
| let from = CGVector(dx: 0.45, dy: 0.45) | ||
| let to = CGVector(dx: 0.5, dy: 0.5) | ||
|
|
||
| let window = app.windows.firstMatch | ||
| let start = window.coordinate(withNormalizedOffset: from) | ||
| let finish = window.coordinate(withNormalizedOffset: to) | ||
|
|
||
| start.press(forDuration: 0.01, thenDragTo: finish) | ||
| canvas | ||
| .drag(from: 0.45, to: 0.5) | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. После перетаскивания нужен ассерт |
||
| let menuBarsQuery = app.menuBars | ||
| let editMenuBarItem = menuBarsQuery.menuBarItems["Edit"] | ||
| editMenuBarItem.click() | ||
| menuBarsQuery.menuItems["Undo"].click() | ||
| editMenuBarItem.click() | ||
| menuBarsQuery.menuItems["Redo"].click() | ||
| statusBar | ||
| .clickEdit() | ||
| .clickUndoMenu() | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. После анду нужен ассерт
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done |
||
| .clickEdit() | ||
| .clickRedoMenu() | ||
|
|
||
|
||
|
|
||
| } | ||
|
|
||
| func testCreateOneElementContainer() { | ||
| //Разворачиваем приложение на весь экран | ||
| XCUIApplication().buttons[XCUIIdentifierFullScreenWindow].click() | ||
| statusBar.openInFullScreen() | ||
| XCUIApplication().buttons["Group in Container"].click() | ||
|
|
||
| //assertLabel(text: "Container") | ||
|
|
@@ -113,13 +107,9 @@ final class CanvasTests: DesignerTests { | |
|
|
||
| private func createNewFile() { | ||
| // Создаем новый документ | ||
| let menuBarsQuery = app.menuBars | ||
|
|
||
| let fileMenu = menuBarsQuery.menuBarItems["File"] | ||
| fileMenu.click() | ||
|
|
||
| let fileNewMenu = menuBarsQuery.menuItems["New"] | ||
| fileNewMenu.click() | ||
| statusBar | ||
| .clickFile() | ||
| .clickFileNew() | ||
| } | ||
|
|
||
| func drawRectangle() { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Тоже в пейдж навигатор