Skip to content
Snippets Groups Projects
Unverified Commit f43fd315 authored by metabase-bot[bot]'s avatar metabase-bot[bot] Committed by GitHub
Browse files

[E2E] Do not hardcode admin id (#31576) (#31577)


We're trying to minimize the amount of hard coded IDs (or any other data) in E2E tests. This change doesn't assume admin's ID is always going to be 1. It fetches the id from the current user instead.

This should make test more resilient to change.

Co-authored-by: default avatarNemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
parent 4e984956
No related branches found
No related tags found
No related merge requests found
...@@ -67,8 +67,11 @@ describe("snapshots", () => { ...@@ -67,8 +67,11 @@ describe("snapshots", () => {
}); });
}, },
); );
// Dismiss `it's ok to play around` modal for admin
cy.request("PUT", `/api/user/1/modal/qbnewb`, {}); cy.request("GET", "/api/user/current").then(({ body: { id } }) => {
// Dismiss `it's ok to play around` modal for admin
cy.request("PUT", `/api/user/${id}/modal/qbnewb`);
});
} }
function updateSettings() { function updateSettings() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment