@appsemble/e2e 0.36.5-test.5 → 0.36.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/fixtures/test/app/index.d.ts +7 -0
- package/fixtures/test/app/index.js +8 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#  Appsemble End 2 End Tests
|
|
2
2
|
|
|
3
3
|
> Run end 2 end tests on an Appsemble environment and provide Appsemble fixtures
|
|
4
4
|
|
|
5
|
-
[](https://gitlab.com/appsemble/appsemble/-/releases/0.36.5)
|
|
6
6
|
[](https://prettier.io)
|
|
7
7
|
|
|
8
8
|
## Table of Contents
|
|
@@ -102,5 +102,5 @@ When writing end-to-end tests, have a look at the
|
|
|
102
102
|
|
|
103
103
|
## License
|
|
104
104
|
|
|
105
|
-
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.36.5
|
|
105
|
+
[LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.36.5/LICENSE.md) ©
|
|
106
106
|
[Appsemble](https://appsemble.com)
|
|
@@ -53,5 +53,12 @@ export interface AppFixtures {
|
|
|
53
53
|
* @param organizationId ID of the organization that owns the app
|
|
54
54
|
*/
|
|
55
55
|
aliasAppDomain: (appPath: string, organizationId: string) => Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Delete an app member using its email.
|
|
58
|
+
*
|
|
59
|
+
* @param appId ID of the app
|
|
60
|
+
* @param email email of the member to be deleted.
|
|
61
|
+
*/
|
|
62
|
+
deleteAppMember: (appId: number, email: string) => Promise<void>;
|
|
56
63
|
}
|
|
57
64
|
export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & AppFixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
|
|
@@ -54,7 +54,7 @@ export const test = base.extend({
|
|
|
54
54
|
async changeAppMemberRole({ browser }, use) {
|
|
55
55
|
await use(async (appId, role) => {
|
|
56
56
|
const page = await browser.newPage();
|
|
57
|
-
await page.goto(`/en/apps/${appId}/-/
|
|
57
|
+
await page.goto(`/en/apps/${appId}/-/members`);
|
|
58
58
|
const select = page.locator('tr', { hasText: 'It’s you!' }).locator('select[class=""]');
|
|
59
59
|
await select.selectOption(role);
|
|
60
60
|
await page.close();
|
|
@@ -81,6 +81,13 @@ export const test = base.extend({
|
|
|
81
81
|
return (await response.json());
|
|
82
82
|
});
|
|
83
83
|
},
|
|
84
|
+
async deleteAppMember({ request }, use) {
|
|
85
|
+
await use(async (appId, email) => {
|
|
86
|
+
const members = (await (await request.get(`/api/apps/${appId}/members?filter=email+eq+'${email}'`)).json());
|
|
87
|
+
const response = await request.delete(`/api/apps/${appId}/app-members/${members[0].sub}`);
|
|
88
|
+
await expect(response).toBeOK();
|
|
89
|
+
});
|
|
90
|
+
},
|
|
84
91
|
async aliasAppDomain({ baseURL }, use) {
|
|
85
92
|
await use(async (appPath, organizationId) => {
|
|
86
93
|
const appsembleIp = String(execSync("getent hosts appsemble | awk '{ print $1 }'")).trim();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appsemble/e2e",
|
|
3
|
-
"version": "0.36.5
|
|
3
|
+
"version": "0.36.5",
|
|
4
4
|
"description": "End-to-end tests used for testing Appsemble apps in an existing environment.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"app",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"test": "vitest"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@appsemble/lang-sdk": "0.36.5
|
|
42
|
-
"@appsemble/node-utils": "0.36.5
|
|
43
|
-
"@appsemble/types": "0.36.5
|
|
41
|
+
"@appsemble/lang-sdk": "0.36.5",
|
|
42
|
+
"@appsemble/node-utils": "0.36.5",
|
|
43
|
+
"@appsemble/types": "0.36.5",
|
|
44
44
|
"@playwright/test": "1.58.2",
|
|
45
45
|
"strip-indent": "^4.0.0"
|
|
46
46
|
},
|