Ai
25 Star 98 Fork 2

Gitee 极速下载/Django

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/django/django
克隆/下载
navigation.test.js 860 Bytes
一键复制 编辑 原始数据 按行查看 历史
Mariusz Felisiak 提交于 2024-05-06 03:03 +08:00 . Migrated to ESLint 9+.
/* global QUnit, initSidebarQuickFilter */
'use strict';
QUnit.module('admin.sidebar: filter', {
beforeEach: function() {
const $ = django.jQuery;
$('#qunit-fixture').append($('#nav-sidebar-filter').text());
this.navSidebar = $('#nav-sidebar');
this.navFilter = $('#nav-filter');
initSidebarQuickFilter();
}
});
QUnit.test('filter by a model name', function(assert) {
assert.equal(this.navSidebar.find('th[scope=row] a').length, 2);
this.navFilter.val('us'); // Matches 'users'.
this.navFilter[0].dispatchEvent(new Event('change'));
assert.equal(this.navSidebar.find('tr[class^="model-"]:visible').length, 1);
this.navFilter.val('nonexistent');
this.navFilter[0].dispatchEvent(new Event('change'));
assert.equal(this.navSidebar.find('tr[class^="model-"]:visible').length, 0);
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mirrors/django.git
git@gitee.com:mirrors/django.git
mirrors
django
Django
main

搜索帮助