Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-21 15:13:58 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-21 15:13:58 +0300
commitc0a3d287c0d613cc439a31683d06dd70f3411f8c (patch)
tree67852660a05456dd7960453f33d7f60650a21cbc /spec/frontend/token_access
parent0cb932429fb8b8d93d677f0f375f527e9d9a4c9b (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/token_access')
-rw-r--r--spec/frontend/token_access/token_access_spec.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/frontend/token_access/token_access_spec.js b/spec/frontend/token_access/token_access_spec.js
index 024e7dfff8c..e6aef41cc8b 100644
--- a/spec/frontend/token_access/token_access_spec.js
+++ b/spec/frontend/token_access/token_access_spec.js
@@ -40,7 +40,7 @@ describe('TokenAccess component', () => {
const findLoadingIcon = () => wrapper.findComponent(GlLoadingIcon);
const findAddProjectBtn = () => wrapper.findByRole('button', { name: 'Add project' });
const findRemoveProjectBtn = () => wrapper.findByRole('button', { name: 'Remove access' });
- const findTokenSection = () => wrapper.find('[data-testid="token-section"]');
+ const findTokenDisabledAlert = () => wrapper.findByTestId('token-disabled-alert');
const createMockApolloProvider = (requestHandlers) => {
return createMockApollo(requestHandlers);
@@ -80,7 +80,7 @@ describe('TokenAccess component', () => {
});
describe('toggle', () => {
- it('the toggle should be enabled and the token section should show', async () => {
+ it('the toggle is on and the alert is hidden', async () => {
createComponent([
[getCIJobTokenScopeQuery, enabledJobTokenScopeHandler],
[getProjectsWithCIJobTokenScopeQuery, getProjectsWithScope],
@@ -89,10 +89,10 @@ describe('TokenAccess component', () => {
await waitForPromises();
expect(findToggle().props('value')).toBe(true);
- expect(findTokenSection().exists()).toBe(true);
+ expect(findTokenDisabledAlert().exists()).toBe(false);
});
- it('the toggle should be disabled and the token section should show', async () => {
+ it('the toggle is off and the alert is visible', async () => {
createComponent([
[getCIJobTokenScopeQuery, disabledJobTokenScopeHandler],
[getProjectsWithCIJobTokenScopeQuery, getProjectsWithScope],
@@ -101,7 +101,7 @@ describe('TokenAccess component', () => {
await waitForPromises();
expect(findToggle().props('value')).toBe(false);
- expect(findTokenSection().exists()).toBe(true);
+ expect(findTokenDisabledAlert().exists()).toBe(true);
});
});