Expand Dock gallery with account workspace and identity states
This commit is contained in:
1 parent
d2002071e6
commit
c41a5e4276
71 files changed
+2254
-67
No files matched your search
+17
-5
@@ -21,6 +21,8 @@ try {
|
||||
["mobile", 390, 844],
|
||||
]) {
|
||||
await p.setViewportSize({ width, height });
|
||||
await p.goto(`${base}/playground/frame.html?concept=dock&page=identity`);
|
||||
await p.locator("[data-identity=reset]").click();
|
||||
await p.goto(
|
||||
`${base}/playground/frame.html?concept=dock&density=compact&theme=${theme}`,
|
||||
);
|
||||
@@ -73,9 +75,13 @@ try {
|
||||
await p.screenshot({
|
||||
path: `references/dock-revision/${theme}-${device}-account.png`,
|
||||
});
|
||||
await p.locator("#account-menu [data-action=switch-account]").click();
|
||||
await p.locator("#account-menu [data-identity=switch]").click();
|
||||
await p.locator("#dialog").waitFor({ state: "visible" });
|
||||
await p.locator('[data-account="Mikhail Orlov"]').click();
|
||||
await p.locator("[data-identity=confirm-switch]").click();
|
||||
await p.locator("#auth-form [name=email]").fill("mikhail.orlov");
|
||||
await p.locator("#auth-form [name=password]").fill("demo-password");
|
||||
await p.locator("#auth-form [type=submit]").click();
|
||||
await p.locator("#identity-profile").waitFor();
|
||||
assert.equal(
|
||||
await p.locator(".account-identity b").innerText(),
|
||||
"Mikhail Orlov",
|
||||
@@ -118,11 +124,17 @@ try {
|
||||
"false",
|
||||
);
|
||||
passed++;
|
||||
await p.goto(`${base}/playground/frame.html?concept=dock&page=identity`);
|
||||
await p.locator("[data-identity=reset]").click();
|
||||
await p.goto(`${base}/playground/frame.html?concept=dock`);
|
||||
await p.locator(".dock-toggle").waitFor();
|
||||
const brand = await p.locator(".navigation .wordmark").boundingBox();
|
||||
const trigger = await p.locator(".dock-toggle").boundingBox();
|
||||
assert.ok(brand.y < trigger.y, "Brand is above menu trigger");
|
||||
assert.equal(
|
||||
await p
|
||||
.locator(".navigation")
|
||||
.evaluate((el) => el.firstElementChild.classList.contains("dock-brand")),
|
||||
true,
|
||||
);
|
||||
assert.equal(await p.locator(".dock-brand svg").count(), 0);
|
||||
await p.locator(".dock-toggle").hover();
|
||||
await p.waitForTimeout(300);
|
||||
assert.equal(
|
||||
|
||||
Reference in new issue
Block a user