Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
7634fad6
Unverified
Commit
7634fad6
authored
1 year ago
by
Nicolò Pretto
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
remove `@flaky` tag for a test that is not failing anymore (#37859)
parent
f774267f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
e2e/test/scenarios/embedding/embedding-smoketests.cy.spec.js
+79
-83
79 additions, 83 deletions
e2e/test/scenarios/embedding/embedding-smoketests.cy.spec.js
with
79 additions
and
83 deletions
e2e/test/scenarios/embedding/embedding-smoketests.cy.spec.js
+
79
−
83
View file @
7634fad6
...
...
@@ -137,111 +137,107 @@ describe("scenarios > embedding > smoke tests", { tags: "@OSS" }, () => {
dashboard
:
ORDERS_DASHBOARD_ID
,
};
[
"
question
"
,
"
dashboard
"
].
forEach
(
object
=>
{
it
(
`should be able to publish/embed and then unpublish a
${
object
}
without filters`
,
{
tags
:
"
@flaky
"
},
()
=>
{
const
embeddableObject
=
object
===
"
question
"
?
"
card
"
:
"
dashboard
"
;
const
objectName
=
object
===
"
question
"
?
"
Orders
"
:
"
Orders in a dashboard
"
;
cy
.
intercept
(
"
PUT
"
,
`/api/
${
embeddableObject
}
/
${
ids
[
object
]}
`
).
as
(
"
embedObject
"
,
);
cy
.
intercept
(
"
GET
"
,
`/api/
${
embeddableObject
}
/embeddable`
).
as
(
"
currentlyEmbeddedObject
"
,
);
it
(
`should be able to publish/embed and then unpublish a
${
object
}
without filters`
,
()
=>
{
const
embeddableObject
=
object
===
"
question
"
?
"
card
"
:
"
dashboard
"
;
const
objectName
=
object
===
"
question
"
?
"
Orders
"
:
"
Orders in a dashboard
"
;
visitAndEnableSharing
(
object
);
cy
.
intercept
(
"
PUT
"
,
`/api/
${
embeddableObject
}
/
${
ids
[
object
]}
`
).
as
(
"
embedObject
"
,
);
cy
.
intercept
(
"
GET
"
,
`/api/
${
embeddableObject
}
/embeddable`
).
as
(
"
currentlyEmbeddedObject
"
,
);
modal
().
within
(()
=>
{
cy
.
findByRole
(
"
tab
"
,
{
name
:
"
Appearance
"
}).
click
();
visitAndEnableSharing
(
object
);
cy
.
findByText
(
"
Background
"
);
cy
.
findByText
(
"
Dashboard title
"
);
cy
.
findByText
(
"
Border
"
);
cy
.
findByText
(
(
_
,
element
)
=>
element
.
textContent
===
"
You can change the font with a paid plan.
"
,
);
cy
.
findByText
(
"
Download data
"
).
should
(
"
not.exist
"
);
modal
().
within
(()
=>
{
cy
.
findByRole
(
"
tab
"
,
{
name
:
"
Appearance
"
}).
click
();
cy
.
findByRole
(
"
tab
"
,
{
name
:
"
Parameters
"
}).
click
();
cy
.
findByText
(
"
Background
"
);
cy
.
findByText
(
"
Dashboard title
"
);
cy
.
findByText
(
"
Border
"
);
cy
.
findByText
(
(
_
,
element
)
=>
element
.
textContent
===
"
You can change the font with a paid plan.
"
,
);
cy
.
findByText
(
"
Download data
"
).
should
(
"
not.exist
"
);
cy
.
findByText
(
`This
${
object
}
doesn't have any parameters to configure yet.`
,
);
cy
.
findByRole
(
"
tab
"
,
{
name
:
"
Parameters
"
}).
click
();
cy
.
findByText
(
`You will need to publish this
${
object
}
before you can embed it in another application
.`
,
);
cy
.
findByText
(
`This
${
object
}
doesn't have any parameters to configure yet
.`
,
);
cy
.
button
(
"
Publish changes
"
).
click
();
cy
.
findByText
(
`You will need to publish this
${
object
}
before you can embed it in another application.`
,
);
cy
.
wait
(
"
@embedObject
"
);
});
cy
.
button
(
"
Publish changes
"
).
click
();
visitIframe
();
cy
.
wait
(
"
@embedObject
"
);
});
cy
.
findByTestId
(
"
embed-frame
"
).
within
(()
=>
{
cy
.
findByRole
(
"
heading
"
,
{
name
:
objectName
});
cy
.
get
(
"
.cellData
"
).
contains
(
"
37.65
"
);
});
visitIframe
();
cy
.
findByRole
(
"
contentinfo
"
).
within
(()
=>
{
cy
.
findByRole
(
"
link
"
)
.
should
(
"
have.text
"
,
"
Powered by Metabase
"
)
.
and
(
"
have.attr
"
,
"
href
"
)
.
and
(
"
eq
"
,
"
https://metabase.com/
"
);
});
cy
.
findByTestId
(
"
embed-frame
"
).
within
(()
=>
{
cy
.
findByRole
(
"
heading
"
,
{
name
:
objectName
});
cy
.
get
(
"
.cellData
"
).
contains
(
"
37.65
"
);
});
cy
.
log
(
`Make sure the
${
object
}
shows up in the standalone embeds page`
,
)
;
cy
.
signInAsAdmin
();
cy
.
visit
(
standalonePath
);
cy
.
wait
(
"
@currentlyEmbeddedObject
"
);
cy
.
findByRole
(
"
contentinfo
"
).
within
(()
=>
{
cy
.
findByRole
(
"
link
"
)
.
should
(
"
have.text
"
,
"
Powered by Metabase
"
)
.
and
(
"
have.attr
"
,
"
href
"
)
.
and
(
"
eq
"
,
"
https://metabase.com/
"
);
}
);
const
sectionTestId
=
{
dashboard
:
"
-embedded-dashboards-setting
"
,
question
:
"
-embedded-questions-setting
"
,
}[
object
];
cy
.
log
(
`Make sure the
${
object
}
shows up in the standalone embeds page`
,
);
cy
.
signInAsAdmin
();
cy
.
visit
(
standalonePath
);
cy
.
wait
(
"
@currentlyEmbeddedObject
"
);
cy
.
findByTestId
(
sectionTestId
)
.
find
(
"
tbody tr
"
)
.
should
(
"
have.length
"
,
1
)
.
and
(
"
contain
"
,
object
Name
)
;
const
sectionTestId
=
{
dashboard
:
"
-embedded-dashboards-setting
"
,
question
:
"
-embedded-questions-setting
"
,
}[
object
]
;
cy
.
log
(
`Unpublish
${
object
}
`
);
visitAndEnableSharing
(
object
);
cy
.
findByTestId
(
sectionTestId
)
.
find
(
"
tbody tr
"
)
.
should
(
"
have.length
"
,
1
)
.
and
(
"
contain
"
,
objectName
);
modal
().
within
(()
=>
{
cy
.
findByText
(
`This
${
object
}
is published and ready to be embedded.`
,
);
cy
.
button
(
"
Unpublish
"
).
click
();
cy
.
log
(
`Unpublish
${
object
}
`
);
visitAndEnableSharing
(
object
);
cy
.
wait
(
"
@embedObject
"
);
modal
().
within
(()
=>
{
cy
.
findByText
(
`This
${
object
}
is published and ready to be embedded.`
,
);
cy
.
button
(
"
Unpublish
"
).
click
();
cy
.
findByRole
(
"
tab
"
,
{
name
:
"
Parameters
"
}).
click
();
});
cy
.
wait
(
"
@embedObject
"
);
visitIframe
();
cy
.
findByRole
(
"
tab
"
,
{
name
:
"
Parameters
"
}).
click
();
});
cy
.
findByTestId
(
"
embed-frame
"
).
findByText
(
"
Embedding is not enabled for this object.
"
,
);
visitIframe
();
cy
.
signInAsAdmin
();
cy
.
visit
(
standalonePath
);
cy
.
wait
(
"
@currentlyEmbeddedObject
"
);
cy
.
findByTestId
(
"
embed-frame
"
).
findByText
(
"
Embedding is not enabled for this object.
"
,
);
mainPage
()
.
findAllByText
(
/No
(
questions|dashboards
)
have been embedded yet./
)
.
should
(
"
have.length
"
,
2
);
},
);
cy
.
signInAsAdmin
();
cy
.
visit
(
standalonePath
);
cy
.
wait
(
"
@currentlyEmbeddedObject
"
);
mainPage
()
.
findAllByText
(
/No
(
questions|dashboards
)
have been embedded yet./
)
.
should
(
"
have.length
"
,
2
);
});
});
it
(
"
should regenerate embedding token and invalidate previous embed url
"
,
()
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment