[SailfishDevel] Testing LocalStorage in QtQuick Tests
Oliver Schmidt
oliver.schmidt+ml at orlives.de
Fri Dec 23 16:56:32 UTC 2016
Hi
I'm writing a database migration for a LocalStorage 2.0 database and want to
add a unit test for that. As the app is nearly completely written in QML and
Javascript, I'm using the QtTest QML type for that.
For this testcase I want to open a database with testdata, let the migration
run and check its result. I need to open a certain database file.
Unfortunately LocalStorage.openDatabaseSync() doesn't support opening a
certain file at a give n path, but only to open "the database with the given
name which is lying around somewhere in your QQmlEngine::offlineStoragePath".
Is there a way to open a specified test database, maybe via using a mock for
LocalStorage? Or at least a possibility to get the offlineStoragePath from
QML?
regards, Oliver Schmidt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20161223/aadff5e2/attachment.sig>
More information about the Devel
mailing list