mirror of
https://github.com/inventree/InvenTree.git
synced 2025-11-14 03:46:44 +00:00
[UI] More actions (#10719)
* Add more spotlight actions: - Open user settings - Open system settings * Add some actions * Multiple attempts in test code
This commit is contained in:
@@ -336,12 +336,29 @@ test('Settings - Admin - Barcode History', async ({ browser }) => {
|
||||
|
||||
for (let i = 0; i < barcodes.length; i++) {
|
||||
const barcode = barcodes[i];
|
||||
await api.post('barcode/', {
|
||||
data: {
|
||||
barcode: barcode
|
||||
},
|
||||
timeout: 5000
|
||||
});
|
||||
|
||||
let attempts = 5;
|
||||
|
||||
while (attempts > 0) {
|
||||
let result = false;
|
||||
|
||||
await api
|
||||
.post('barcode/', {
|
||||
data: {
|
||||
barcode: barcode
|
||||
},
|
||||
timeout: 5000
|
||||
})
|
||||
.then(() => {
|
||||
result = true;
|
||||
});
|
||||
|
||||
if (result) {
|
||||
break;
|
||||
} else {
|
||||
attempts -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await page.getByRole('button', { name: 'admin' }).click();
|
||||
|
||||
Reference in New Issue
Block a user