Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
web-apps
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
web-apps
Commits
abd400c9
Commit
abd400c9
authored
Jan 11, 2017
by
Maxim Kadushkin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/new-mobile'
parents
39c28168
1aac3e78
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
238 additions
and
0 deletions
+238
-0
.gitignore
.gitignore
+5
-0
apps/documenteditor/mobile/test/nightwatch.json
apps/documenteditor/mobile/test/nightwatch.json
+34
-0
apps/documenteditor/mobile/test/tests/de-mobile-edit-tablet-ios.js
...menteditor/mobile/test/tests/de-mobile-edit-tablet-ios.js
+117
-0
apps/documenteditor/mobile/test/utils.js
apps/documenteditor/mobile/test/utils.js
+82
-0
No files found.
.gitignore
View file @
abd400c9
...
...
@@ -18,3 +18,8 @@ apps/presentationeditor/mobile/document
apps/spreadsheeteditor/embed/offlinedocs
apps/spreadsheeteditor/main/offlinedocs
apps/spreadsheeteditor/mobile/offlinedocs
# tests
selenium-debug.log
**/test/bin
**/test/reports
\ No newline at end of file
apps/documenteditor/mobile/test/nightwatch.json
0 → 100644
View file @
abd400c9
{
"src_folders"
:
[
"tests"
],
"output_folder"
:
"reports"
,
"custom_commands_path"
:
""
,
"custom_assertions_path"
:
""
,
"page_objects_path"
:
""
,
"globals_path"
:
""
,
"selenium"
:
{
"start_process"
:
true
,
"server_path"
:
"./bin/selenium-server-standalone-2.53.1.jar"
,
"log_path"
:
""
,
"port"
:
4444
,
"cli_args"
:
{
"webdriver.chrome.driver"
:
"./bin/chromedriver"
}
},
"test_settings"
:
{
"default"
:
{
"launch_url"
:
"http://localhost"
,
"selenium_port"
:
4444
,
"selenium_host"
:
"localhost"
,
"silent"
:
true
,
"screenshots"
:
{
"enabled"
:
true
,
"path"
:
"reports/screens"
},
"desiredCapabilities"
:
{
"browserName"
:
"chrome"
}
}
}
}
\ No newline at end of file
apps/documenteditor/mobile/test/tests/de-mobile-edit-tablet-ios.js
0 → 100644
View file @
abd400c9
/*
*
* (c) Copyright Ascensio System Limited 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* de-mobile-edit-tablet-ios.js
*
* Created by Alexander Yuzhin on 1/10/17
* Copyright (c) 2017 Ascensio System SIA. All rights reserved.
*
*/
var
Utils
=
require
(
'
../utils
'
);
module
.
exports
=
{
before
:
function
(
browser
)
{
Utils
.
init
(
browser
);
browser
.
resizeWindow
(
800
,
600
);
},
'
Launch Document Editor
'
:
function
(
browser
)
{
Utils
.
openEditor
(
'
http://local:3000/editor?type=mobile&mode=edit&fileName=sample.docx
'
);
},
'
Text settings
'
:
function
(
browser
)
{
Utils
.
canvasClick
(
280
,
280
)
.
click
(
'
#toolbar-edit
'
)
.
pause
(
500
);
Utils
.
isPresent
(
'
div.edit-root-view
'
);
Utils
.
isPresent
(
'
#edit-text
'
);
Utils
.
isPresent
(
'
#edit-paragraph
'
);
// Text tap
Utils
.
hasClass
(
'
#edit-text
'
,
'
active
'
);
browser
.
expect
.
element
(
'
#font-fonts .item-title
'
).
text
.
to
.
equal
(
'
Arial
'
);
browser
.
expect
.
element
(
'
#font-fonts .item-after span:first-child
'
).
text
.
to
.
equal
(
'
11 pt
'
);
Utils
.
hasClass
(
'
#font-bold
'
,
'
active
'
);
Utils
.
hasNoClass
(
'
#font-italic
'
,
'
active
'
);
Utils
.
hasNoClass
(
'
#font-underline
'
,
'
active
'
);
Utils
.
hasNoClass
(
'
#font-strikethrough
'
,
'
active
'
);
Utils
.
hasClass
(
'
#font-left
'
,
'
active
'
);
Utils
.
hasNoClass
(
'
#font-center
'
,
'
active
'
);
Utils
.
hasNoClass
(
'
#font-right
'
,
'
active
'
);
Utils
.
hasNoClass
(
'
#font-just
'
,
'
active
'
);
// Fonts view
browser
.
click
(
'
#font-fonts
'
)
.
waitForElementVisible
(
'
.page[data-page=edit-text-font-page]
'
,
1000
)
.
pause
(
500
);
browser
.
expect
.
element
(
'
#font-size .item-after label
'
).
text
.
to
.
equal
(
'
11 pt
'
);
browser
.
elements
(
'
css selector
'
,
'
#font-list li
'
,
function
(
result
)
{
browser
.
assert
.
ok
(
result
.
value
.
length
>
1
,
'
Font name list is not empty
'
);
});
browser
.
click
(
'
.navbar-on-center a.back
'
)
.
pause
(
500
);
// Paragraph tap
browser
.
click
(
'
.categories a[href*=edit-paragraph]
'
)
.
pause
(
500
);
Utils
.
hasClass
(
'
#edit-paragraph
'
,
'
active
'
);
browser
.
elements
(
'
css selector
'
,
'
#paragraph-list li
'
,
function
(
result
)
{
browser
.
assert
.
ok
(
result
.
value
.
length
>
1
,
'
Paragraph style list is not empty
'
);
});
},
'
Exit from Document Editor
'
:
function
(
browser
)
{
var
delay
=
3000
;
Utils
.
isPresent
(
'
.view-main
'
);
console
.
log
(
'
Finish testing after delay
'
,
delay
,
'
ms.
'
);
browser
.
pause
(
delay
)
.
frame
(
null
)
// Exit from iframe
.
end
();
// Close browser
}
};
\ No newline at end of file
apps/documenteditor/mobile/test/utils.js
0 → 100644
View file @
abd400c9
/*
*
* (c) Copyright Ascensio System Limited 2010-2017
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
* EU, LV-1021.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
/**
* utils.js
*
* Created by Alexander Yuzhin on 1/11/17
* Copyright (c) 2017 Ascensio System SIA. All rights reserved.
*
*/
var
browser
;
module
.
exports
=
{
init
:
function
(
client
)
{
browser
=
client
;
},
openEditor
:
function
(
url
)
{
browser
.
url
(
url
)
.
waitForElementVisible
(
'
body
'
,
1000
)
.
frame
(
0
)
// Deep into editor iframe
.
waitForElementPresent
(
'
.modal-preloader
'
,
1000
)
.
waitForElementNotPresent
(
'
.modal-preloader
'
,
10000
);
// .frame(null); // Exit from iframe
// .end(); // Close browser
return
browser
;
},
canvasClick
:
function
(
x
,
y
)
{
browser
.
moveToElement
(
'
#area_id_main
'
,
x
,
y
)
.
mouseButtonDown
(
'
left
'
)
.
mouseButtonUp
(
'
left
'
);
return
browser
;
},
isPresent
:
function
(
selector
)
{
return
browser
.
expect
.
element
(
selector
).
to
.
be
.
present
;
},
hasClass
:
function
(
selector
,
className
)
{
return
browser
.
expect
.
element
(
selector
).
to
.
have
.
attribute
(
'
class
'
).
which
.
contains
(
className
);
},
hasNoClass
:
function
(
selector
,
className
)
{
return
browser
.
expect
.
element
(
selector
).
to
.
not
.
have
.
attribute
(
'
class
'
).
which
.
contains
(
className
);
}
};
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment