mainly settings button wasnt correcty identified anymore, using better
way of detecting it. also adjust for moved objects
Change-Id: I1de855c37a7fa9bcc0dcd7dbd84aca92a083853f
- Optional "role" parameter is added for POST PUT PATCH.
If "role" is provided then the passed flags are ignored and are applied internally by the server according to the provided role.
If "role" is not provided then the former flags based approach is applied.
Change-Id: Ib6e591ff6dc50122e0ec49a348153ca820fc2e03
* NGCP::Panel::Utils::UserRole::_field_to_name now supports
both hash and object to parse the roles from
* NGCP::Panel::Utils::UserRole::resolve_role_id returns undef
if no roles has been passed or there are no entries for the
role in the database
* Fix NGCP::Panel::Utils::Journals to correctly fetch and set
$journal{$role_id}
* Adjust api-journals.t, remove tx_id, user_id, role_id from
checks
Change-Id: Ieff23bd4291f3b88ba92bbfc2b00b57f66bf76e1
follow up on TT#147151 (fast loading/paging/searching panel
datatables), which broke restapi tests.
Change-Id: I799cb9087b9405c71dec4c690e7a7bab5dfdbdde
the /api/provisionintemplates rail provides the
operations to create, edit and delete "provisioning
templates" know from the "batch provisioning" feature
of admin panel.
these templates can also be defined in config.yml,
while it is however only possible to edit templates
stored in the database.
executing a template and/or uploading a .csv for bulk
execution will be available in a separate part.
Change-Id: If8627327270edfce5bca1be3b1f777c1bd44e90f
Acces reseller details page, check if info is correct and try to edit
reseller and reseller contract from that page
Change-Id: Ibcd8953c241c221bce93e9b013d762aa4d51ae73
* 'webpassword' field is becomes encrypted and will not match the
original result, as well as after PUT/PATCH, the salted password
becomes different
Change-Id: I1b091823f5a2f0c39df16e5770a7f9032bca4963
refractor tests and also add new ones based on already existing tickets
- check if superuser, master, ccare, read-only and active toggles
are working properly (more will be added when more pages get ported
over to JS)
- check that admin cannot give himself higher permissions
Change-Id: I14a0176a890bf75bf1654016ff31371e1ae54033
* 'webpassword' field is changed on every PUT, because the salted hash
is recalculated, even if it is the same plain text password that
is provided in the PUT, therefore api-rest cannot compare the
'webpassword' field obtained on GET with the one that is obtained
after PUT
Change-Id: I7d5108c57bd7ab1b5a59c247836d1357317aaa32
- add new small test: check if the search bar works properly
- move many tests from test_login to test_other
- some formatting and typo fixes
Change-Id: I3b24bbe608f750f50b5940e7e247ff93bc285c40
Only press "Go back to new UI" button when in old ui. Before it would still
try to press the button regardless if in old or new ui
Change-Id: If22484be82c22802f7b930820e782e4514dd6f03
logout function would press the new "change password" button instead
of logout, this should fix it
Change-Id: I629fa1eb1dd13914cf7ff741c97dda0708a0889e
It was close to impossible to read ngcp-panel debug log due to:
* missing clear marker of the start reuqest processing, use '***' once only
* some personal markers (like '+++++++') have been removed as they have no
meaning for other developers. Let's remove the personal markers and work to
make the panel debug log well readable for all developers.
Change-Id: I69faff3ab2258fc156e88c7b8da0edfef14c3e6e
* the endpoint will receive "type" (expires|onetime)
and "expires" (positive integer representing seconds)
* type will define the expiray method for the token;
onetime: the token expires as soon as it's used, or
after "expires" seconds if not used
expires: the token can be used multiple times until
it expires according to the "expires" param value
* login_jwt endpoint for generating the JWT token for
subscribers has been enhanced to accept the "token"
param, containing the token generated using the
/api/authtokens endpoint
* admin_login_jwt endpoint for generating the JWT token
for admins has been enhanced to accept the "token"
param, containing the token generated using the
/api/authtokens endpoint
* login_jwt and amin_login_jwt will respond with 403
"Forbidden" if the token role stored in Redis does
not match the role of the user that generated it
* /api/authtokens is hidden from documentation for now
Change-Id: I4eb76c2b08f2e24774fa84ba0ccf7412ce8670e8
Set Administrator as Superuser while also leaving "Read-Only" enabled
and make sure that Administrator cant read any entries, despite beeing
a superuser
Change-Id: Id4d3cea2b54120dd4bfe39e2b6fbcfbd40dbf492
- Mainly changes that improve readability
- $RC can be called even though it hasnt been defined yet, fixing that
Change-Id: I2046929c65bc043a4840912be618d705c8d63ed8
Domain settings have been adjusted, fixing current tests and add new
ones that werent possible before
Change-Id: I8d0af46f3b4f6868c17eff30d411ad14163bf10d
sometimes test would crash, due to customer status not beeing able
to change, this commit should fix this
Change-Id: I46544eb1f51d75f0eb850e39060fb4cda07155ea
- use function click_js instead of click() when a message box
overlaps with a button
- also scroll to some buttons to be in proper view when clicking
Change-Id: I5e3f365669cc8933eeceac106a8396695a38831b
- rewrite tests in python rather than perl
- support tests with firefox and chrome. chrome tests arent enabled
yet. browser can be chosen on launch with "firefox", "chrome" or "all"
Change-Id: I8bdd616fd0e0127939bff18364efe15e2f02fe31
* Only allow unique values for allowed_clis in
both Admin Panel and API PUT
* In case of PATCH, check only if new clis are
unique, since customers may have systems where
allowed_clis are duplicated already
* Fix tests
Change-Id: I7253271081e7ecc0eae9690a3545ddb5324edac7
* The new endpoint will only accept POSTs
* The request body should have two parameters
called 'new_password' and 'token'
* First, look for the token in redis (for admins),
if not found, look for it in DB (for subscribers),
if neither is found, return
Change-Id: I4163a0d5bd886961317b21aeca20c8ccfdeab0dd
* The new endpoint will only accept POSTs
* The request body should have two parameters
called 'type', 'username' and 'domain'
* 'type' will accept either 'administrator',
in which case only 'username' is needed,
or 'subscriber', in which case 'username'
and 'domain' will be needed
* The regular password reset email will be sent
to either the admin or the subscriber
Change-Id: If1457c8c625a95295e5e93b6637927e3905698d9
TT#76111 introduced new way of handling 'lawful_intercept' admins,
which broke current tests. this commit adds a new check for li admins
and fixes the issue. also fixed a typo when trying to navigate to admin
page
Change-Id: Id45823ec8e18d54558173ba5b5a66dcf21e66a6c
controller_admin.t:
- test admin login with no credentials, wrong credentials, wrong password
and no password
Change-Id: I9b09568ba7c7382f5d74086ee1103c30bf833c07
test would crash, because it would scroll past the option it wants to enable
this commit should fix it
Change-Id: I97ea9164cd9fa22bd1745c976beeb4f92600dbc9
Fixed column xpath descriptions are unnecessary here, since there is only
one column with a checkbox, so now selenium will pick the right column
automatically.
Change-Id: Iceafc34e9b5536971987514037cb4d7480477220
Some pro machines that are used for running tests have cloudpbx enabled and
when trying to create a customer on those it will fail, because it wont
select the product at all. this patch will select basic sip account as product
if cloudpbx is enabled
Change-Id: Ie6a4b5813017b245838b1f1ded875dab4975f52d
- trunk recently changed the behavior on administrators with no permissions.
instead of for example, having a button that says "delete administrator" and
then saying "its not possible", this button has been completley removed. Same
for checking if an admin has permissions for creating domains, etc. So these
tests are getting removed to fix issues in trunk
Change-Id: Ia8bc45c352c17281ed73cc2027e64e20d27fa969
* there is a catch when changing the admin password;
first of all, according to TT#76110 only own admin
users can change the password via PUT/PATCH;
secondly, inside the code, for PATCH to work we need
a dummy 'password' key on the old resource which has
been set to the saltedpass; when updating the admin,
if the password is still equal to saltedpass, no change
is made to the password
Change-Id: I423ebe13988c58b527db65d666f09b73a483422d
* According to TT#78557, webpassword is not returned at
GET request for subscriber so it's now manually added
in test from the content used at creation
Change-Id: I0835d7830bad31ad20451a758a5044e0f40015bf
- removed calls that were redundant, because cached search fields would
fill out the search field anyways
Change-Id: Idde3e799ef4350e0f6b903d1662ecbe0d1965ac4
* PUT updates path of registration and DELETE
with the old path failed; deleting with new
path fixed the problem
Change-Id: Iaaf08a6e2034cb312462c5eafb0fd5daf535a2e7
Otherwise on jenkins in test 'ngcp-panel-test-rest-api-docker':
> not ok 57 - check for 'activesubscriberpreferences' collection in Link
> # Failed test 'check for 'activesubscriberpreferences' collection in Link'
> # at ./t/api-rest/api-root.t line 176.
Change-Id: Ic694f025291490e7c0415e8210180fdd8c6cfe1b
controller_billing.t, controller_profileset.t, controller_timeset.t:
- search field caching caused some problems, where elements would not show
up because cached search would not find elements which the names got updated
Change-Id: I11ae4dca9c07a720f2d491878402cd36650b015d
- Add 'enabled' column to the request content to
mitigate error that appeared after adding the
column
Change-Id: I5de3e52e7fab34c4bad8497630684f0d221f11e4
Allow reusing previously created NGCP::API::TestFramework object for
running a new test scenario, while using previously collected data.
- Save 'retained' variables inside module $self object.
- Move 'unique_id' generation from the module to wrapper script.
- Allow rewriting of 'file_path' object.
Change-Id: Ie961f7d0fb34f71e04353125e026ad00715efe91
Make new 'ngcp-api-testframework' package with module:
NGCP::API::TestFramework
Move the module source from t/api/rest2/lib/ to lib/
Change paths accordingly in module files.
Change-Id: I7a4b08ecac1059533628771ea4faf2eb10dba41f
Modify NGCP API Test Framework:
1. Add support for using variables in deeply nested parameters in yaml
test scenarios, by running vars replacement in recursion.
2. Simplify vars replacement logic in RequestBuilder.pm by deleting
conditions that are relevant to TestExecutor.pm only.
3. Allow passing directory as argument to testrunner in order to run
all yaml tests in that specific directory.
4. Fix the error message of failed 'code' condition.
Change-Id: I05a310609dc1ad15d33e37574e07078dfbe38aa7
FirefoxExtensions.pm:
- add .png file type to screenshots so you can view it directly
in your browser instead of having to download the file
imagine needing 3 commits to get a line of code working properly (:
Change-Id: I864fb06ae7adcd686a9af1fe06ce70d3c90fbba5
FirefoxExtensions.pm:
- screenshots should save in /results instead of wherever he wanted to save
them in the first place
Change-Id: I0ff5a5876636bf14a2b898cb75c7ff8acd0ac259
controller_other.t:
- go to security bans page
- refresh both ip and users ban list
- check if list got refreshed successfully
Change-Id: Id87bf9834cf4a6762e7e9fe92904181ac561d438
FirefoxExtensions.pm:
- take a screenshot when a alert check fails. can store multiple failed alert
checks if needed
Change-Id: I6f14974960bca9b6221af7cf3619bbe808bb207b
controller_header.t:
- ignore trying to change the direction of header rule, since that still
causes crashes and everything else gets changed anyways for the editing
test.
Change-Id: I029745450f089c05b9072f407114a686a0b36d0c
* Add the new fields to the Billing fees form
* Add the new fields to the csv order for
download and upload to work
* Change tests to include the new fees fields
Change-Id: If45bfe4f39ccd0283c72071489f5930eab2c37e9
* announcement_id had a hardcoded value
which was not present in CE; retrieving
existent one fixed the problem
Change-Id: I5dbf7976b9dd5326f855675c2c2a9239640b9777
controller_header.t:
- select value by opening up element list with move_and_click() first,
then select the actual element
Change-Id: Ib7d5d4bd7cf7a793f00877176f7b2b0746c85d97
controller_timeset.t:
- a new warining was added so you cant tye in invalid values anymore in
timeset events (repeat by weekday). now test if invalid values get rejected
and if warning pops up.
Change-Id: Ib4ff3761e1086673eb35e9830760dd353755496a
controller_customer.t:
- first expand all columns in customer details, then check for alerts since
alert messages usually are inside those columns and when they are closed,
selenium cant pick them up
Change-Id: I78cc8ad80784fe734041d4b893575e5b8d71cf6a
FirefoxExtensions.pm:
- prevent crashing the script when select_if_unselected() and
unselect_if_selected() cannot find specified element
Change-Id: I55c1f41f57c77be27020edafd44be474830dc9d1
controller_terminate.t:
- check if edit windows are opened
- create domain with reseller now, since domains with the default reseller
cant be used
- delete domain before deleting reseller
Change-Id: If8aa9f320e92db7ac81d12de56aacfc5c4900e87
some tests would do the "create empty entry" first and then create a new
entry, which is not very efficent when creation of entry is handled by a
function in common.pm. creating element first, then doing the "create empty
element" test after should be a little faster
Change-Id: I802da0a1e082ec881c847585e55115e566f730c0
find_text() is doing stuff a find_element_by_xpath() can do just as well, and
scroll_to_id() was never used. both functions have now been removed.
Change-Id: Iefb1128e6c6db56d5cdee248188f4d0c6b83f42b
controller_subscriber.t:
- create domain with previously created reseller instead of the default one,
because subscribers cant access domains which do not have the same reseller
as the customer
Change-Id: Ia1cb1f63ab21e3d4f2988d4ce275b8f2586832d5
* Only allow to assign domains for subscribers
from the same reseller as subscriber's customer
* Change Subscribers.yaml test to retrieve a
domain for testing from the same reseller
as subscriber's customer
Change-Id: I6c7cc7a9874207cfcd63360a6f87e2fd6841011c
controller_admin.t:
- create a test domain with new admin to check if admin has permissions to
create stuff
- try to delete currently logged in admin to see if attempt gets rejected
Change-Id: Id116c8101e6d81f6afca320245eb637eebaa1837
controller_admin.t:
- added better_scroll_to_element calls
- removed "xpath" arguments in select_if_unselected calls. these are not
necessary
- corrected one xpath check
Change-Id: I7b6ce79d4202327aa9df934e7b14a102a6922fd3
FirefoxExtensions.pm:
- exit function when path is not specified
- is now able to use css and other paths as well. defaults to xpath
Change-Id: I9c47e1ee9ec502c97af25099c09ef6d7a7f007eb
selenium has this "nice" feature where it can crash sometimes on selection
lists with error "cannot scroll element into view", even though element
is visible on crash screenshots. use move_and_click() instad of click() to
try more often to click on selection lists.
Change-Id: I6625d6f426019d7774cafb8eb1c73e0d203c7649
controller_admin.t:
- admin 1/0 value checks now check in the correct spot, previously it would
only check if a 0/1 existed in that column in general, which makes no sense
Change-Id: I678fc82d2d8ce249b60596074d588e77217a72b7
* Add warning system: throw warnings
whenever a variable is wanted but
not present
* Migrate api-journals and api-topupvoucher
Change-Id: Iefb6f4f3ebe7d11f904d21a6d255e7940e8bb07a
remove said functions, because find_element_by_xpath can do the exact same
thing those two functions could. also took to opportunity to clean up the
find_element_by_xpath calls
Change-Id: I25ad1429347b1cfab100f7ed59a04a71e4b885f0
formatting and diag texts were kinda all over the place.
now all files follow a certain scheme i.e how the diag texts are written,
proper capitalization, ' and " no getting used and confused randomly, etc.
Change-Id: Ifc8fe40ac0ed9d8e76a41d4149032aae0fbf9667
controller_peering.t:
- go to peering overview page
- edit peering rule from there
- edit peering group from there
- go back to peering group
- check if peering group got edited
- go to peering rule
- check if peering rule got edited
Change-Id: Ia69a850e98a7f914ee64e9b0a4e97b45a5bc84bd
details tabs are quite a gamble, beeing closed even if they were supposed
not to and sometimes straight up not expanding when you click on them.
now all tabs will be expanded at once and scroll_to_element scrolls to the
right tab, dealing with the inconsistency of tabs
Change-Id: I4e41a67072fc83b7d316ee652b24e4f7ba13f5ff