Skip to content

Commit 9b5c17c

Browse files
authored
Updated failing UI tests in console (#3236)
Updated failing tests in console Signed-off-by: Benjamin Perez <benjamin@bexsoft.net>
1 parent 23e01b2 commit 9b5c17c

File tree

3 files changed

+34
-9
lines changed

3 files changed

+34
-9
lines changed

web-app/src/screens/Console/Buckets/ListBuckets/UploadFilesButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ const UploadFilesButton = ({
148148
open={uploadOptionsOpen}
149149
anchorEl={anchorEl}
150150
anchorOrigin={"end"}
151-
useAnchorWidth={false}
151+
useAnchorWidth
152152
/>
153153
</Fragment>
154154
);

web-app/tests/permissions-B/bucketWritePrefixOnly.ts

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,17 @@ test
3131
.useRole(roles.bucketWritePrefixOnly)
3232
.navigateTo("http://localhost:9090/browser/testcafe")
3333
.click(uploadButton)
34-
.expect(Selector("li").withText("Upload File").hasClass("disabled"))
34+
.expect(
35+
Selector("div")
36+
.withAttribute("label", "Upload File")
37+
.hasClass("disabled"),
38+
)
3539
.ok()
36-
.expect(Selector("li").withText("Upload Folder").hasClass("disabled"))
40+
.expect(
41+
Selector("div")
42+
.withAttribute("label", "Upload Folder")
43+
.hasClass("disabled"),
44+
)
3745
.notOk();
3846
},
3947
)
@@ -48,9 +56,17 @@ test
4856
.useRole(roles.bucketWritePrefixOnly)
4957
.navigateTo("http://localhost:9090/browser/testcafe/d3JpdGU=")
5058
.click(uploadButton)
51-
.expect(Selector("li").withText("Upload File").hasClass("disabled"))
59+
.expect(
60+
Selector("div")
61+
.withAttribute("label", "Upload File")
62+
.hasClass("disabled"),
63+
)
5264
.notOk()
53-
.expect(Selector("li").withText("Upload Folder").hasClass("disabled"))
65+
.expect(
66+
Selector("div")
67+
.withAttribute("label", "Upload Folder")
68+
.hasClass("disabled"),
69+
)
5470
.notOk();
5571
},
5672
)

web-app/tests/utils/elements.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,18 @@ export const deleteAllVersions =
6363
export const bucketNameInput = Selector("#bucket-name-select");
6464
export const bucketsPrefixInput = Selector("#prefix");
6565
export const bucketsAccessInput = Selector("div.selectContainer");
66-
export const bucketsAccessReadOnlyInput = Selector("li").withText("readonly");
67-
export const bucketsAccessWriteOnlyInput = Selector("li").withText("writeonly");
68-
export const bucketsAccessReadWriteInput = Selector("li").withText("readwrite");
66+
export const bucketsAccessReadOnlyInput = Selector("div").withAttribute(
67+
"label",
68+
"readonly",
69+
);
70+
export const bucketsAccessWriteOnlyInput = Selector("div").withAttribute(
71+
"label",
72+
"writeonly",
73+
);
74+
export const bucketsAccessReadWriteInput = Selector("div").withAttribute(
75+
"label",
76+
"readwrite",
77+
);
6978
export const uploadInput = Selector("input").withAttribute("type", "file");
7079
export const createPolicyName = Selector("#policy-name");
7180
export const createPolicyTextfield = Selector(".w-tc-editor-text");
@@ -86,7 +95,7 @@ export const groupUserCheckbox = Selector(".ReactVirtualized__Table__row input")
8695
// Dropdowns and options
8796
//----------------------------------------------------
8897
export const bucketDropdownOptionFor = (modifier) => {
89-
return Selector("#bucket-name-options-selector li").withText(
98+
return Selector("#bucket-name-options-selector div").withText(
9099
`${constants.TEST_BUCKET_NAME}-${modifier}`,
91100
);
92101
};

0 commit comments

Comments
 (0)